|
|
@ -37,7 +37,7 @@ void Keyboard::pressedKeys(bool &shiftPressed, bool &controlPressed)
|
|
|
|
Window child;
|
|
|
|
Window child;
|
|
|
|
int root_x, root_y, win_x, win_y;
|
|
|
|
int root_x, root_y, win_x, win_y;
|
|
|
|
uint keybstate;
|
|
|
|
uint keybstate;
|
|
|
|
XQueryPointer( qt_xdisplay(), qt_xrootwin(), &root, &child,
|
|
|
|
XQueryPointer( tqt_xdisplay(), tqt_xrootwin(), &root, &child,
|
|
|
|
&root_x, &root_y, &win_x, &win_y, &keybstate );
|
|
|
|
&root_x, &root_y, &win_x, &win_y, &keybstate );
|
|
|
|
|
|
|
|
|
|
|
|
shiftPressed = keybstate & ShiftMask;
|
|
|
|
shiftPressed = keybstate & ShiftMask;
|
|
|
@ -54,7 +54,7 @@ bool Keyboard::shiftPressed()
|
|
|
|
Window child;
|
|
|
|
Window child;
|
|
|
|
int root_x, root_y, win_x, win_y;
|
|
|
|
int root_x, root_y, win_x, win_y;
|
|
|
|
uint keybstate;
|
|
|
|
uint keybstate;
|
|
|
|
XQueryPointer( qt_xdisplay(), qt_xrootwin(), &root, &child,
|
|
|
|
XQueryPointer( tqt_xdisplay(), tqt_xrootwin(), &root, &child,
|
|
|
|
&root_x, &root_y, &win_x, &win_y, &keybstate );
|
|
|
|
&root_x, &root_y, &win_x, &win_y, &keybstate );
|
|
|
|
|
|
|
|
|
|
|
|
return (keybstate & ShiftMask) != 0;
|
|
|
|
return (keybstate & ShiftMask) != 0;
|
|
|
@ -72,7 +72,7 @@ bool Keyboard::controlPressed()
|
|
|
|
Window child;
|
|
|
|
Window child;
|
|
|
|
int root_x, root_y, win_x, win_y;
|
|
|
|
int root_x, root_y, win_x, win_y;
|
|
|
|
uint keybstate;
|
|
|
|
uint keybstate;
|
|
|
|
XQueryPointer( qt_xdisplay(), qt_xrootwin(), &root, &child,
|
|
|
|
XQueryPointer( tqt_xdisplay(), tqt_xrootwin(), &root, &child,
|
|
|
|
&root_x, &root_y, &win_x, &win_y, &keybstate );
|
|
|
|
&root_x, &root_y, &win_x, &win_y, &keybstate );
|
|
|
|
|
|
|
|
|
|
|
|
return (keybstate & ControlMask) != 0;
|
|
|
|
return (keybstate & ControlMask) != 0;
|
|
|
@ -90,7 +90,7 @@ bool Keyboard::altPressed()
|
|
|
|
Window child;
|
|
|
|
Window child;
|
|
|
|
int root_x, root_y, win_x, win_y;
|
|
|
|
int root_x, root_y, win_x, win_y;
|
|
|
|
uint keybstate;
|
|
|
|
uint keybstate;
|
|
|
|
XQueryPointer( qt_xdisplay(), qt_xrootwin(), &root, &child,
|
|
|
|
XQueryPointer( tqt_xdisplay(), tqt_xrootwin(), &root, &child,
|
|
|
|
&root_x, &root_y, &win_x, &win_y, &keybstate );
|
|
|
|
&root_x, &root_y, &win_x, &win_y, &keybstate );
|
|
|
|
|
|
|
|
|
|
|
|
return (keybstate & Mod1Mask) != 0;
|
|
|
|
return (keybstate & Mod1Mask) != 0;
|
|
|
@ -120,7 +120,7 @@ uint KApplication::keyboardModifiers()
|
|
|
|
Window child;
|
|
|
|
Window child;
|
|
|
|
int root_x, root_y, win_x, win_y;
|
|
|
|
int root_x, root_y, win_x, win_y;
|
|
|
|
uint keybstate;
|
|
|
|
uint keybstate;
|
|
|
|
XQueryPointer( qt_xdisplay(), qt_xrootwin(), &root, &child,
|
|
|
|
XQueryPointer( tqt_xdisplay(), tqt_xrootwin(), &root, &child,
|
|
|
|
&root_x, &root_y, &win_x, &win_y, &keybstate );
|
|
|
|
&root_x, &root_y, &win_x, &win_y, &keybstate );
|
|
|
|
return keybstate & 0x00ff;
|
|
|
|
return keybstate & 0x00ff;
|
|
|
|
}
|
|
|
|
}
|
|
|
|