diff options
author | Darrell Anderson <[email protected]> | 2012-08-03 08:49:35 -0500 |
---|---|---|
committer | Darrell Anderson <[email protected]> | 2012-08-03 08:49:35 -0500 |
commit | 92b8aca467ad650f9b77a5b6a0f56c27ecbfe80a (patch) | |
tree | 3de07468347367bdef8e6c0d765bdb209585a189 /src/kernel/qapplication_x11.cpp | |
parent | da067173fd2ab6bca5943294a439c4992323227a (diff) | |
parent | ebcb1d80bf517aceb69778e1e9f67e5f4da8c484 (diff) | |
download | qt3-92b8aca467ad650f9b77a5b6a0f56c27ecbfe80a.tar.gz qt3-92b8aca467ad650f9b77a5b6a0f56c27ecbfe80a.zip |
Merge branch 'master' of http://scm.trinitydesktop.org/scm/git/qt3
Diffstat (limited to 'src/kernel/qapplication_x11.cpp')
-rw-r--r-- | src/kernel/qapplication_x11.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/kernel/qapplication_x11.cpp b/src/kernel/qapplication_x11.cpp index 990f437..cd1573b 100644 --- a/src/kernel/qapplication_x11.cpp +++ b/src/kernel/qapplication_x11.cpp @@ -3772,7 +3772,7 @@ int QApplication::x11ProcessEvent( XEvent* event ) case SelectionClear: { XSelectionClearEvent *req = &event->xselectionclear; // don't deliver dnd events to the clipboard, it gets confused - if (! req || qt_xdnd_selection && req->selection == qt_xdnd_selection) + if (! req || ( qt_xdnd_selection && req->selection ) == qt_xdnd_selection) break; if (qt_clipboard) { @@ -3785,7 +3785,7 @@ int QApplication::x11ProcessEvent( XEvent* event ) case SelectionNotify: { XSelectionEvent *req = &event->xselection; // don't deliver dnd events to the clipboard, it gets confused - if (! req || qt_xdnd_selection && req->selection == qt_xdnd_selection) + if (! req || ( qt_xdnd_selection && req->selection ) == qt_xdnd_selection) break; if (qt_clipboard) { @@ -4200,7 +4200,7 @@ bool QETWidget::translateMouseEvent( const XEvent *event ) // backward rotation respectively. int btn = event->xbutton.button; delta *= 120 * ( (btn == Button4 || btn == 6) ? 1 : -1 ); - bool hor = ( (btn == Button4 || btn == Button5) && (state&AltButton) || + bool hor = ( ( (btn == Button4 || btn == Button5) && (state&AltButton) ) || (btn == 6 || btn == 7) ); translateWheelEvent( globalPos.x(), globalPos.y(), delta, state, (hor)?Horizontal:Vertical ); } @@ -5336,7 +5336,7 @@ bool QETWidget::translateKeyEventInternal( const XEvent *event, int& count, // (to figure out whether the Ctrl modifier is held while Shift is pressed, // or Shift is held while Ctrl is pressed) since the 'state' doesn't tell // us whether the modifier held is Left or Right. - if ( qt_use_rtl_extensions && type == QEvent::KeyPress && statefulTranslation ) + if ( qt_use_rtl_extensions && type == QEvent::KeyPress && statefulTranslation ) { if (key == XK_Control_L || key == XK_Control_R || key == XK_Shift_L || key == XK_Shift_R) { if (!directionKeyEvent) { directionKeyEvent = key; @@ -5349,6 +5349,7 @@ bool QETWidget::translateKeyEventInternal( const XEvent *event, int& count, // if any other key was pressed. directionKeyEvent = Key_Space; } + } // Commentary in X11/keysymdef says that X codes match ASCII, so it // is safe to use the locale functions to process X codes in ISO8859-1. @@ -5410,11 +5411,11 @@ bool QETWidget::translateKeyEventInternal( const XEvent *event, int& count, if ( qt_use_rtl_extensions && type == QEvent::KeyPress && statefulTranslation ) { if ( directionKeyEvent && lastWinId == winId() ) { - if ( key == XK_Shift_L && directionKeyEvent == XK_Control_L || - key == XK_Control_L && directionKeyEvent == XK_Shift_L ) { + if ( ( key == XK_Shift_L && directionKeyEvent == XK_Control_L ) || + ( key == XK_Control_L && directionKeyEvent == XK_Shift_L ) ) { directionKeyEvent = Key_Direction_L; - } else if ( key == XK_Shift_R && directionKeyEvent == XK_Control_R || - key == XK_Control_R && directionKeyEvent == XK_Shift_R ) { + } else if ( ( key == XK_Shift_R && directionKeyEvent == XK_Control_R ) || + ( key == XK_Control_R && directionKeyEvent == XK_Shift_R ) ) { directionKeyEvent = Key_Direction_R; } } @@ -5735,8 +5736,8 @@ static Bool isPaintOrScrollDoneEvent( Display *, XEvent *ev, XPointer a ) { PaintEventInfo *info = (PaintEventInfo *)a; if ( ev->type == Expose || ev->type == GraphicsExpose - || ev->type == ClientMessage - && ev->xclient.message_type == qt_qt_scrolldone ) + || ( ev->type == ClientMessage + && ev->xclient.message_type == qt_qt_scrolldone ) ) { if ( ev->xexpose.window == info->window ) return True; |