summaryrefslogtreecommitdiff
path: root/openbox/grab.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2007-03-28 19:41:41 +0000
committerDana Jansens <danakj@orodu.net>2007-03-28 19:41:41 +0000
commit2876f22088bc29d3a70a5a2e3295bad64171ba8d (patch)
tree3d34ed99f885dfea3b899c8f5d88000ff3fb9ff6 /openbox/grab.c
parent58be283e94c062377c86e23beb4d3ac51dc57fb8 (diff)
use CurrentTime when time gets moved backwards
Diffstat (limited to 'openbox/grab.c')
-rw-r--r--openbox/grab.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/openbox/grab.c b/openbox/grab.c
index 991956da..36817b16 100644
--- a/openbox/grab.c
+++ b/openbox/grab.c
@@ -42,7 +42,15 @@ static Time ungrab_time()
{
Time t = event_curtime;
if (!(t == 0 || event_time_after(t, grab_time)))
- 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;
}