summaryrefslogtreecommitdiffstats
path: root/src/kernel/qapplication_x11.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/qapplication_x11.cpp')
-rw-r--r--src/kernel/qapplication_x11.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/kernel/qapplication_x11.cpp b/src/kernel/qapplication_x11.cpp
index 7816325cd..abf1e9538 100644
--- a/src/kernel/qapplication_x11.cpp
+++ b/src/kernel/qapplication_x11.cpp
@@ -3772,7 +3772,7 @@ int TQApplication::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 (tqt_clipboard) {
@@ -3785,7 +3785,7 @@ int TQApplication::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 (tqt_clipboard) {
@@ -4200,7 +4200,7 @@ bool TQETWidget::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 TQETWidget::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 == TQEvent::KeyPress && statefulTranslation )
+ if ( qt_use_rtl_extensions && type == TQEvent::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 TQETWidget::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 TQETWidget::translateKeyEventInternal( const XEvent *event, int& count,
if ( qt_use_rtl_extensions && type == TQEvent::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;