Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 May 2010 17:43:08 GMT
From:      Tom Russo <russo@bogodyn.org>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/146383: port math/grace seizes mouse cursor on right-click with Xorg-server 1.7.5
Message-ID:  <201005071743.o47Hh8EO084309@www.freebsd.org>
Resent-Message-ID: <201005071750.o47Ho6bS013326@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         146383
>Category:       ports
>Synopsis:       port math/grace seizes mouse cursor on right-click with Xorg-server 1.7.5
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri May 07 17:50:06 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Tom Russo
>Release:        7.2-STABLE
>Organization:
>Environment:
FreeBSD winston.sandia.gov 7.2-STABLE FreeBSD 7.2-STABLE #0: Fri Nov 20 12:39:58 MST 2009     tvrusso@winston.sandia.gov:/usr/src/sys/i386/compile/WINSTON  i386

>Description:
Due to a documented bug in xorg-server 1.7.5 (https://bugs.freedesktop.org/show_bug.cgi?id=25400), motif applications that use XmCreatePopupMenu can seize the mouse cursor and not let go.

The port math/grace is one such program.  In Debian, maintainers have come up with a patch to work around the broken X server behavior.  The behavior is documented in:

https://bugs.launchpad.net/ubuntu/+source/grace/+bug/552681

>How-To-Repeat:
Install Xorg-server 1.7.5,1 (current in ports as of 6 May 2010)
Install math/grace
Start xmgrace
Choose "Data Set Operations" under the data menu.
Right-click in the scroll box under "Data Sets."

The mouse cursor will now be confined to the bounds of the box, with no way to release it other than to kill xmgrace in a separate terminal (virtual terminal or remote login, as the X display will now be useless).

>Fix:
The Debian maintainers of the grace package have come up with a patch:

http://patch-tracker.debian.org/patch/series/view/grace/1:5.1.22-5/motiflockup.diff

I have attached a version of this patch suitable for dropping directly into the ports/math/grace/files directory.  With this patch, xmgrace no longer grabs the cursor on right-click.



Patch attached with submission follows:

--- src/motifutils.c.orig	2010-03-15 20:05:12.742336241 -0700
+++ src/motifutils.c	2010-03-15 20:12:53.885346709 -0700
@@ -118,7 +118,6 @@
 
 extern unsigned long xvlibcolors[];
 
-
 static OptionItem *color_option_items = NULL;
 static int ncolor_option_items = 0;
 static OptionStructure **color_selectors = NULL;
@@ -1621,6 +1620,12 @@
     graph_popup_menu = xmalloc(sizeof(GraphPopupMenu));
 
     popup = XmCreatePopupMenu(listp->list, "graphPopupMenu", NULL, 0);
+#if XmVersion >= 2000
+    XtVaSetValues(popup, XmNpopupEnabled, XmPOPUP_DISABLED, NULL);
+    XtUngrabButton(listp->list, AnyButton, AnyModifier);
+#else
+    XtVaSetValues(popup, XmNpopupEnabled, False, NULL);
+#endif
     graph_popup_menu->popup = popup;
     
     graph_popup_menu->label_item = CreateMenuLabel(popup, "Selection:");
@@ -2243,6 +2248,12 @@
     
     set_popup_menu = xmalloc(sizeof(SetPopupMenu));
     popup = XmCreatePopupMenu(listp->list, "setPopupMenu", NULL, 0);
+#if XmVersion >= 2000
+    XtVaSetValues(popup, XmNpopupEnabled, XmPOPUP_DISABLED, NULL);
+    XtUngrabButton(listp->list, AnyButton, AnyModifier);
+#else
+    XtVaSetValues(popup, XmNpopupEnabled, False, NULL);
+#endif
     set_popup_menu->popup = popup;
     
     set_popup_menu->label_item = CreateMenuLabel(popup, "Selection:");


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201005071743.o47Hh8EO084309>