workaround to at least one "failing grab" problem
svn path=/trunk/kdebase/kwin/; revision=108475
This commit is contained in:
parent
3c80134766
commit
413eda6fcb
1 changed files with 8 additions and 1 deletions
9
main.cpp
9
main.cpp
|
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -221,7 +228,7 @@ int kdemain( int argc, char * argv[] )
|
||||||
// one for each screen...
|
// one for each screen...
|
||||||
QCString multiHead = getenv("KDE_MULTIHEAD");
|
QCString multiHead = getenv("KDE_MULTIHEAD");
|
||||||
if (multiHead.lower() == "true") {
|
if (multiHead.lower() == "true") {
|
||||||
|
|
||||||
Display* dpy = XOpenDisplay( NULL );
|
Display* dpy = XOpenDisplay( NULL );
|
||||||
if ( !dpy ) {
|
if ( !dpy ) {
|
||||||
fprintf(stderr, "%s: FATAL ERROR while trying to open display %s\n",
|
fprintf(stderr, "%s: FATAL ERROR while trying to open display %s\n",
|
||||||
|
|
Loading…
Reference in a new issue