aboutsummaryrefslogtreecommitdiff
path: root/nxcompshad/X11.cpp
diff options
context:
space:
mode:
authorReinhard Tartler <siretart@tauware.de>2011-11-13 09:53:12 +0100
committerReinhard Tartler <siretart@tauware.de>2011-11-13 09:53:12 +0100
commitbf85c6e696693ef5a277c0334c01493dedf4fadd (patch)
tree5ac4177ce4fef7e250a041727f8d4456127bac41 /nxcompshad/X11.cpp
parentc70adf725d3fea94eabdde467b8b8b106a796c0a (diff)
downloadnx-libs-bf85c6e696693ef5a277c0334c01493dedf4fadd.tar.gz
nx-libs-bf85c6e696693ef5a277c0334c01493dedf4fadd.tar.bz2
nx-libs-bf85c6e696693ef5a277c0334c01493dedf4fadd.zip
Imported nxcompshad-3.5.0-2.tar.gznxcompshad/3.5.0-2nxcompshad
Summary: Imported nxcompshad-3.5.0-2.tar.gz Keywords: Imported nxcompshad-3.5.0-2.tar.gz into Git repository
Diffstat (limited to 'nxcompshad/X11.cpp')
-rw-r--r--nxcompshad/X11.cpp28
1 files changed, 18 insertions, 10 deletions
diff --git a/nxcompshad/X11.cpp b/nxcompshad/X11.cpp
index cb8f55fc5..2d1140f11 100644
--- a/nxcompshad/X11.cpp
+++ b/nxcompshad/X11.cpp
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMPSHAD, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -981,6 +981,7 @@ void Poller::handleKeyboardEvent(Display *display, XEvent *event)
Bool isKeyPress = False;
Bool isModifier = False;
+ Bool isShiftComb = False;
Bool skip = False;
if (event -> type == KeyPress)
@@ -1048,19 +1049,26 @@ void Poller::handleKeyboardEvent(Display *display, XEvent *event)
(!modeSwitchOn && !level3ShiftOn && !altROn) &&
!skip)
{
- keysym = keymapKeycodeToKeysym(event -> xkey.keycode, shadowKeysyms,
- shadowMinKey, shadowMapWidth, 1);
- }
+ KeySym tempKeysym = keymapKeycodeToKeysym(event -> xkey.keycode, shadowKeysyms,
+ shadowMinKey, shadowMapWidth, 1);
- if ((!leftShiftOn && !rightShiftOn) &&
- (modeSwitchOn || level3ShiftOn || altROn))
+ if (tempKeysym == 0)
+ {
+ isShiftComb = True;
+ }
+ else
+ {
+ keysym = tempKeysym;
+ }
+ }
+ else if ((!leftShiftOn && !rightShiftOn) &&
+ (modeSwitchOn || level3ShiftOn || altROn))
{
keysym = keymapKeycodeToKeysym(event -> xkey.keycode, shadowKeysyms,
shadowMinKey, shadowMapWidth, 2);
}
-
- if ((leftShiftOn || rightShiftOn) &&
- (modeSwitchOn || level3ShiftOn || altROn))
+ else if ((leftShiftOn || rightShiftOn) &&
+ (modeSwitchOn || level3ShiftOn || altROn))
{
keysym = keymapKeycodeToKeysym(event -> xkey.keycode, shadowKeysyms,
shadowMinKey, shadowMapWidth, 3);
@@ -1103,7 +1111,7 @@ void Poller::handleKeyboardEvent(Display *display, XEvent *event)
* Send fake modifier events.
*/
- if (!isModifier)
+ if (!isModifier && isShiftComb == False)
{
sendFakeModifierEvents(col, ((keysym >> 8) == 0) && (keysym >= XK_A) && (keysym <= XK_Z));
}