diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2009-07-22 15:37:19 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2009-07-22 15:37:19 (GMT) |
commit | d63f3c4c3940b4293c8763d5bfc01ed430075efb (patch) | |
tree | ab648417305e42ffb65f86d272ffccb023a152f1 /src/gui/kernel/qapplication_x11.cpp | |
parent | 3597a5b82610752cf95372a5a5f7b33afc8d30b9 (diff) | |
parent | 7a208874ae5d69d2b70b08f03675ef8f0c843a7f (diff) | |
download | Qt-d63f3c4c3940b4293c8763d5bfc01ed430075efb.zip Qt-d63f3c4c3940b4293c8763d5bfc01ed430075efb.tar.gz Qt-d63f3c4c3940b4293c8763d5bfc01ed430075efb.tar.bz2 |
Merge branch '4.5'
Diffstat (limited to 'src/gui/kernel/qapplication_x11.cpp')
-rw-r--r-- | src/gui/kernel/qapplication_x11.cpp | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/src/gui/kernel/qapplication_x11.cpp b/src/gui/kernel/qapplication_x11.cpp index 76138f8..4016563 100644 --- a/src/gui/kernel/qapplication_x11.cpp +++ b/src/gui/kernel/qapplication_x11.cpp @@ -3246,48 +3246,43 @@ int QApplication::x11ProcessEvent(XEvent* event) #ifdef ALIEN_DEBUG //qDebug() << "QApplication::x11ProcessEvent:" << event->type; #endif - Time time = 0, userTime = 0; switch (event->type) { case ButtonPress: pressed_window = event->xbutton.window; - userTime = event->xbutton.time; + X11->userTime = event->xbutton.time; // fallthrough intended case ButtonRelease: - time = event->xbutton.time; + X11->time = event->xbutton.time; break; case MotionNotify: - time = event->xmotion.time; + X11->time = event->xmotion.time; break; case XKeyPress: - userTime = event->xkey.time; + X11->userTime = event->xkey.time; // fallthrough intended case XKeyRelease: - time = event->xkey.time; + X11->time = event->xkey.time; break; case PropertyNotify: - time = event->xproperty.time; + X11->time = event->xproperty.time; break; case EnterNotify: case LeaveNotify: - time = event->xcrossing.time; + X11->time = event->xcrossing.time; break; case SelectionClear: - time = event->xselectionclear.time; + X11->time = event->xselectionclear.time; break; default: -#ifndef QT_NO_XFIXES - if (X11->use_xfixes && event->type == (X11->xfixes_eventbase + XFixesSelectionNotify)) { - XFixesSelectionNotifyEvent *req = - reinterpret_cast<XFixesSelectionNotifyEvent *>(event); - time = req->selection_timestamp; - } -#endif break; } - if (time > X11->time) - X11->time = time; - if (userTime > X11->userTime) - X11->userTime = userTime; +#ifndef QT_NO_XFIXES + if (X11->use_xfixes && event->type == (X11->xfixes_eventbase + XFixesSelectionNotify)) { + XFixesSelectionNotifyEvent *req = + reinterpret_cast<XFixesSelectionNotifyEvent *>(event); + X11->time = req->selection_timestamp; + } +#endif QETWidget *widget = (QETWidget*)QWidget::find((WId)event->xany.window); |