FVWM: Timing bug in FvwmPager

From: Grant McDorman <grant_at_isgtec.com>
Date: Tue, 06 Feb 1996 11:47:42 EST

Discovered a timing bug in the FvwmPager on Solaris 2.4, with both OpenWindows
and the Consortium X11R6 server.

FvwmPager, when moving a window to the current desk, does an XReparentWindow
followed by an XSetInputFocus. The XSetInputFocus can get the following error:


  X Error of failed request: BadMatch (invalid parameter attributes)
  Major opcode of failed request: 42 (X_SetInputFocus)
  Serial number of failed request: 5232
  Current serial number in output stream: 5247

By adding a XSync, a "sleep_a_little(50000)", and another XSync just before
the XSetInputFocus the problem goes away. The patch is attached.

50 ms may be a bit long for the sleep; I haven't tried shorter periods, though.

Grant McDorman <grant_at_isgtec.com>
                                ISG Technologies, Inc.


*** x_pager.c.orig Wed Nov 15 16:10:31 1995
--- x_pager.c Tue Feb 6 11:53:39 1996
***************
*** 1427,1432 ****
--- 1427,1435 ----
          }
        if(Scr.CurrentDesk == t->desk)
        {
+ XSync(dpy,0);
+ sleep_a_little(50000);
+ XSync(dpy,0);
            if(t->flags & ICONIFIED)
              XSetInputFocus (dpy, t->icon_w, RevertToParent, Event->xbutton.time);
            else

End of MIME message
--
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_hpc.uh.edu.
To report problems, send mail to fvwm-owner_at_hpc.uh.edu.
Received on Tue Feb 06 1996 - 11:02:38 GMT

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:58 BST