summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qapplication_x11.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2009-07-22 15:37:19 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2009-07-22 15:37:19 (GMT)
commitd63f3c4c3940b4293c8763d5bfc01ed430075efb (patch)
treeab648417305e42ffb65f86d272ffccb023a152f1 /src/gui/kernel/qapplication_x11.cpp
parent3597a5b82610752cf95372a5a5f7b33afc8d30b9 (diff)
parent7a208874ae5d69d2b70b08f03675ef8f0c843a7f (diff)
downloadQt-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.cpp35
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);