From 045104c0c1c3859e9144f1a39313c4c03367e09c Mon Sep 17 00:00:00 2001 From: fredkiefer Date: Tue, 21 Aug 2007 13:37:20 +0000 Subject: [PATCH] Use CurrentTime instead of generic.lastTime. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@25405 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 7 +++++++ Source/x11/XGServerWindow.m | 13 ++++++------- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 519a632..cfd27bb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2007-08-21 Fred Kiefer + + * Source/x11/XGServerWindow.m (-_setupRootWindow): Revert last + change. + * Source/x11/XGServerWindow.m (-setinputfocus:): Use CurrentTime + instead of generic.lastTime. + 2007-08-21 Fred Kiefer * Source/x11/XGServerEvent.m (-processEvent:): Made handling of diff --git a/Source/x11/XGServerWindow.m b/Source/x11/XGServerWindow.m index 96930af..685bb83 100644 --- a/Source/x11/XGServerWindow.m +++ b/Source/x11/XGServerWindow.m @@ -1346,12 +1346,9 @@ _get_next_prop_new_event(Display *display, XEvent *event, char *arg) * Initialize time of last events to be the start of time - not * the current time! */ - if (CurrentTime == 0) - { - generic.lastClick = 1; - generic.lastMotion = 1; - } - generic.lastTime = CurrentTime; + generic.lastClick = 1; + generic.lastMotion = 1; + generic.lastTime = 1; /* * Set up standard atoms. @@ -3552,7 +3549,9 @@ static BOOL didCreatePixmaps; NSDebugLLog(@"Focus", @"Setting focus to %d", window->number); generic.desiredFocusWindow = win; generic.focusRequestNumber = XNextRequest(dpy); - XSetInputFocus(dpy, window->ident, RevertToParent, generic.lastTime); + // In the case of activation via DO the lastTime is outdated and cannot be used. +// XSetInputFocus(dpy, window->ident, RevertToParent, generic.lastTime); + XSetInputFocus(dpy, window->ident, RevertToParent, CurrentTime); [inputServer ximFocusICWindow: window]; }