workaround to at least one "failing grab" problem

svn path=/trunk/kdebase/kwin/; revision=108475
This commit is contained in:
Matthias Ettrich 2001-07-30 10:48:12 +00:00
parent 3c80134766
commit 413eda6fcb

View file

@ -43,6 +43,7 @@ Options* options;
Atoms* atoms; Atoms* atoms;
extern Time qt_x_time; // workaround for Qt < 2.3.2
Time kwin_time = CurrentTime; Time kwin_time = CurrentTime;
int kwin_screen_number = -1; int kwin_screen_number = -1;
@ -103,6 +104,7 @@ void kwin_updateTime()
XEvent ev; XEvent ev;
XWindowEvent( qt_xdisplay(), w->winId(), PropertyChangeMask, &ev ); XWindowEvent( qt_xdisplay(), w->winId(), PropertyChangeMask, &ev );
kwin_time = ev.xproperty.time; kwin_time = ev.xproperty.time;
qt_x_time = kwin_time;
} }
@ -147,20 +149,25 @@ bool Application::x11EventFilter( XEvent *e )
case ButtonPress: case ButtonPress:
case ButtonRelease: case ButtonRelease:
kwin_time = e->xbutton.time; kwin_time = e->xbutton.time;
qt_x_time = kwin_time; // workaround for Qt < 2.3.2
break; break;
case MotionNotify: case MotionNotify:
kwin_time = e->xmotion.time; kwin_time = e->xmotion.time;
qt_x_time = kwin_time; // workaround for Qt < 2.3.2
break; break;
case KeyPress: case KeyPress:
case KeyRelease: case KeyRelease:
kwin_time = e->xkey.time; kwin_time = e->xkey.time;
qt_x_time = kwin_time; // workaround for Qt < 2.3.2
break; break;
case PropertyNotify: case PropertyNotify:
kwin_time = e->xproperty.time; kwin_time = e->xproperty.time;
qt_x_time = kwin_time; // workaround for Qt < 2.3.2
break; break;
case EnterNotify: case EnterNotify:
case LeaveNotify: case LeaveNotify:
kwin_time = e->xcrossing.time; kwin_time = e->xcrossing.time;
qt_x_time = kwin_time; // workaround for Qt < 2.3.2
default: default:
break; break;
} }