« Return to Thread: Bug Report: Locking X11 with FOX

Re: Bug Report: Locking X11 with FOX

by Jeroen van der Zijp :: Rate this Message:

Reply to Author | View in Thread

On Wednesday 10 June 2009, you wrote:

> Concerning the bug I reported about FOX hanging X11 by leaving the
> pointer grabbed when heavily loaded, I have found the following about
> the "FXChore" hang example:
>
>    1. In FXWindow::grab():
>           * XGrabPointer(...,getApp()->event.time) is returning 2
>             (GrabInvalidTime) so it then tries (as an error handling step?)
>           * XGrabPointer(...,CurrentTime) which returns 0.
>    2. In FXWindow::ungrab():
>           * Changing
>             XUngrabPointer(DISPLAY(getApp()),getApp()->event.time) to
>             XUngrabPointer(DISPLAY(getApp()),CurrentTime) prevents the
>             problem. (I'm not suggest this the fix.)
>
> The docs on XUngrabPointer() say it will NOT release the pointer if the
> specified time is earlier than the last-pointer-grab time or ...
> I think what is happening is that with FOX way behind the XServer, the
> XGrabPointer(...,CurrentTime) sets the grab time to a larger time value
> than the time value of the event that FOX  (eventually) is processing
> when it does the XUngrabPointer(). Thus the time specified in the
> XUngrabPointer() is earlier than the grab time. Therefore the pointer is
> left grabbed.

Hmm, so what it seems like is we need to remember which way we actually
succeeded with the XGrabPointer...

Perhaps we should just use CurrentTime in both cases?  Can you check if
that make the problem go away?

> What I have no explanation for at this time is just why
> XGrabPointer(...,getApp()->event.time) returns  GrabInvalidTime. The
> docs say "If the specified time is earlier than the last-pointer-grab
> time or later than the current X server time, it fails and returns
> GrabInvalidTime." Since this is the first grab, the first clause doesn't
> seem to apply, and since FOX seems to be using the time from the last
> XEvent containing a time, the time should not be ahead of the X server.
> Maybe somebody sees something I don't.

Yes, I don't understand why this happened either.  But one possibility
is that perhaps event.time is made invalid some place.

Please try the CurrentTime idea and see if that works....



                        - Jeroen




------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Foxgui-users mailing list
Foxgui-users@...
https://lists.sourceforge.net/lists/listinfo/foxgui-users

 « Return to Thread: Bug Report: Locking X11 with FOX