From: Mikael Magnusson Date: Wed, 28 Mar 2007 19:47:19 +0000 (+0000) Subject: merge r5716,r5717 from trunk X-Git-Tag: openbox-3_3_991-RELEASE~262 X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=005cbb6ca6adf3987276e440f571e1ea6810d5fd;p=dana%2Fopenbox.git merge r5716,r5717 from trunk --- diff --git a/openbox/grab.c b/openbox/grab.c index 991956da..e92722a6 100644 --- a/openbox/grab.c +++ b/openbox/grab.c @@ -41,8 +41,16 @@ static Time grab_time = CurrentTime; static Time ungrab_time() { Time t = event_curtime; - if (!(t == 0 || event_time_after(t, grab_time))) - t = grab_time; + if (!(t == CurrentTime || event_time_after(t, grab_time))) + /* When the time moves backward on the server, then we can't use + the grab time because that will be in the future. So instead we + have to use CurrentTime. + + "XUngrabPointer does not release the pointer if the specified time + is earlier than the last-pointer-grab time or is later than the + current X server time." + */ + t = CurrentTime; /*grab_time;*/ return t; }