diff options
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 4cb71a5..203cb39 100644 --- a/src/kernel/qapplication_x11.cpp +++ b/src/kernel/qapplication_x11.cpp @@ -3746,7 +3746,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) { @@ -3759,7 +3759,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) { @@ -4174,7 +4174,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 ); } @@ -5310,7 +5310,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; @@ -5323,6 +5323,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. @@ -5384,11 +5385,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; } } @@ -5709,8 +5710,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; |