ports/146380: Xastir grabs mouse pointer and won't let go with Xorg-server 1.7.5

Tom Russo russo at bogodyn.org
Fri May 7 17:20:02 UTC 2010

>Number:         146380
>Category:       ports
>Synopsis:       Xastir grabs mouse pointer and won't let go with Xorg-server 1.7.5
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri May 07 17:20:01 UTC 2010
>Originator:     Tom Russo
>Release:        7.2-STABLE
FreeBSD winston.sandia.gov 7.2-STABLE FreeBSD 7.2-STABLE #0: Fri Nov 20 12:39:58 MST 2009     tvrusso at winston.sandia.gov:/usr/src/sys/i386/compile/WINSTON  i386
With the recent bump of xorg-server to version 1.7.5, all programs that use Motif and which use XmCreatePopupMenu suffer from an issue where the mouse cursor is grabbed and confined to the bounds of the parent widget.  This is a known bug in xorg-server 1.7.5 and is apparently fixed in a recent patch.


Xastir, a port in the comms tree, uses Motif and is now exhibiting this cursor-grabbing behavior.  

The Xastir CVS tree has a workaround that allows Xastir to work even with the broken xorg-server 1.7.5 version.

Note that the change in X server has actually impacted all Motif programs, this issue is not isolated to Xastir.
Update xorg-server to 1.7.5,1 (the version in ports as of 6 May 2010).

Install Xastir.  Start it.  Right-click in the map window.  The mouse cursor will switch to one that points right, and it will be confined to the bounds of the Xastir map window.  The only way to get the desktop responsive again is to switch to a non-X virtual TTY and kill the Xastir process and the X server.
The work-around is simply the patch that was made in the Xastir source tree today.  It should still work even in the release-version code that is currently used by the port.

The patch from main.c revisions 1.792 to 1.793 is attached here as patch-src_main.c.txt

A better "fix" would be to incorporate a patch to the xorg server that fixes the broken handling of passive grabs, since that will fix *all* motif-based programs, but apparently there is still some work to be done to get that patch right.  See the discussion in the freedesktop.org site.

Patch attached with submission follows:

--- src/main.c      11 Mar 2010 04:03:58 -0000      1.792
+++ src/main.c      7 May 2010 16:23:16 -0000       1.793
@@ -1,5 +1,5 @@
 /* -*- c-basic-offset: 4; indent-tabs-mode: nil -*-
- * $Id: main.c,v 1.792 2010/03/11 04:03:58 chicoreus Exp $
+ * $Id: main.c,v 1.793 2010/05/07 16:23:16 tvrusso Exp $
  * XASTIR, Amateur Station Tracking and Information Reporting
  * Copyright (C) 1999,2000  Frank Giannandrea
@@ -9018,6 +9018,12 @@
             "create_appshell Menu Popup",
+#if XmVersion >= 2000
+    XtVaSetValues(right_menu_popup, XmNpopupEnabled, XmPOPUP_DISABLED, NULL);
+    XtUngrabButton(da, AnyButton, AnyModifier);
+    XtVaSetValues(right_menu_popup, XmNpopupEnabled, False, NULL);
     //XtVaSetValues(right_menu_popup, XmNwhichButton, 3, NULL);
     ac = 0;


More information about the freebsd-ports-bugs mailing list