From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Dec 16 06:46:38 2014 Return-Path: Delivered-To: freebsd-ports-bugs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 21254D07 for ; Tue, 16 Dec 2014 06:46:38 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 020EEE94 for ; Tue, 16 Dec 2014 06:46:38 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id sBG6kbPn015228 for ; Tue, 16 Dec 2014 06:46:37 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [Bug 196012] New: patches fixing two math/xgraph bugs: XWindow re-size and command line Geometry option Date: Tue, 16 Dec 2014 06:46:37 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports Tree X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: jguojun@sbcglobal.net X-Bugzilla-Status: New X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: sanpei@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter flagtypes.name attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Dec 2014 06:46:38 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196012 Bug ID: 196012 Summary: patches fixing two math/xgraph bugs: XWindow re-size and command line Geometry option Product: Ports Tree Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Many People Priority: --- Component: Individual Port(s) Assignee: sanpei@FreeBSD.org Reporter: jguojun@sbcglobal.net Flags: maintainer-feedback?(sanpei@FreeBSD.org) Assignee: sanpei@FreeBSD.org Created attachment 150624 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=150624&action=edit enhanced FULL patch of patch-ab: original + new patch P1 and P2 math/xgraph has two historical bug and I just got sometime to debug and made fixes. Problem 1: xgraph never had window re-size implemented. When re-size xgraph window, new drawing overlaps old draws. Append patch (P1) gets XWindow re_size implemented. Problem 2: command geometry option -- =WxH+X0+Y0 generally does not work. In most cases, it only takes W, and ignore the H; It is not clear what the original designer tried to code for. Sent email to xgraph but do not get response. It looks like this project has been discontinued since Y2K. Append patch (P2) to fix the compiler directive to separate Bogus formula if USE_GEOMETRY is defined. Also, a combined patch -- patch-ab is also attached. Do not confuse: patch-ab is a FULL patch that combines P1, P2 and original patch-ab. This is not third patch. Since only one file can be attached, so only the full patch -- patch-ab is in attachment file. P1 and P2 are pasted below: --------- patch P1: implementing xgraph XWindow re-size ------------ --- xgraph.c.orig 2000-09-10 07:05:47.000000000 -0700 +++ xgraph.c 2014-12-15 22:32:58.000000000 -0800 @@ -403,6 +402,7 @@ fg_color = PM_COLOR("Foreground"); bg_color = PM_COLOR("Background"); XRecolorCursor(disp, zoomCursor, &fg_color, &bg_color); + init_X(win_info->dev_info.user_state); Num_Windows = 1; while (Num_Windows > 0) { @@ -415,6 +415,12 @@ continue; } switch (theEvent.type) { + case ConfigureNotify: + win_info->dev_info.area_w = theEvent.xconfigure.width; + win_info->dev_info.area_h = theEvent.xconfigure.height; + XClearArea(disp, theEvent.xany.window, 1, 1, win_info->dev_info.area_w, win_info->dev_info.area_h, 0); + DrawWindow(win_info); + break; case Expose: if (theEvent.xexpose.count <= 0) { XWindowAttributes win_attr; @@ -422,7 +428,7 @@ XGetWindowAttributes(disp, theEvent.xany.window, &win_attr); win_info->dev_info.area_w = win_attr.width; win_info->dev_info.area_h = win_attr.height; - init_X(win_info->dev_info.user_state); + XClearArea(disp, theEvent.xany.window, 1, 1, win_info->dev_info.area_w, win_info->dev_info.area_h, 0); DrawWindow(win_info); } break; @@ -789,7 +796,7 @@ new_info->flags = 0; XSelectInput(disp, new_window, - ExposureMask|KeyPressMask|ButtonPressMask); + ExposureMask|KeyPressMask|ButtonPressMask|StructureNotifyMask); if (!theCursor) { theCursor = XCreateFontCursor(disp, XC_top_left_arrow); fg_color = PM_COLOR("Foreground"); ---------- Patch P2 for fixing =WxH+X0+Y0 command option ------ --- xgraph.c.orig 2000-09-10 07:05:47.000000000 -0700 +++ xgraph.c 2014-12-15 22:32:58.000000000 -0800 @@ -715,7 +721,7 @@ if (sizehints.x<0) sizehints.x = 0; sizehints.y += 25; } -#endif +#else /* Aspect ratio computation */ if (asp < 1.0) { @@ -723,6 +729,7 @@ } else { height = ((int) (((double) NORMSIZE) / asp)); } +#endif height = MAX(MINDIM, height); width = MAX(MINDIM, width); --- Comment #1 from Bugzilla Automation --- Auto-assigned to maintainer sanpei@FreeBSD.org -- You are receiving this mail because: You are the assignee for the bug.