Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 May 2010 17:11:22 GMT
From:      Tom Russo <russo@bogodyn.org>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/146380: Xastir grabs mouse pointer and won't let go with Xorg-server 1.7.5
Message-ID:  <201005071711.o47HBM3R047204@www.freebsd.org>
Resent-Message-ID: <201005071720.o47HK2Lv087775@freefall.freebsd.org>

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

>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
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri May 07 17:20:01 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:
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.

https://bugs.freedesktop.org/show_bug.cgi?id=25400

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.
>How-To-Repeat:
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.
>Fix:
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",
             al,
             ac);
+#if XmVersion >= 2000
+    XtVaSetValues(right_menu_popup, XmNpopupEnabled, XmPOPUP_DISABLED, NULL);
+    XtUngrabButton(da, AnyButton, AnyModifier);
+#else
+    XtVaSetValues(right_menu_popup, XmNpopupEnabled, False, NULL);
+#endif
     //XtVaSetValues(right_menu_popup, XmNwhichButton, 3, NULL);
 
     ac = 0;



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



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