diff options
-rw-r--r-- | nxcompshad/CHANGELOG | 11 | ||||
-rw-r--r-- | nxcompshad/Core.cpp | 2 | ||||
-rw-r--r-- | nxcompshad/Core.h | 2 | ||||
-rw-r--r-- | nxcompshad/Input.cpp | 2 | ||||
-rw-r--r-- | nxcompshad/Input.h | 2 | ||||
-rw-r--r-- | nxcompshad/LICENSE | 2 | ||||
-rw-r--r-- | nxcompshad/Logger.cpp | 2 | ||||
-rw-r--r-- | nxcompshad/Logger.h | 2 | ||||
-rw-r--r--[-rwxr-xr-x] | nxcompshad/Makefile.in | 2 | ||||
-rw-r--r-- | nxcompshad/Manager.cpp | 2 | ||||
-rw-r--r-- | nxcompshad/Manager.h | 2 | ||||
-rw-r--r-- | nxcompshad/Misc.h | 2 | ||||
-rw-r--r-- | nxcompshad/Poller.h | 2 | ||||
-rw-r--r-- | nxcompshad/Regions.h | 2 | ||||
-rw-r--r-- | nxcompshad/Shadow.cpp | 2 | ||||
-rw-r--r-- | nxcompshad/Shadow.cpp.orig | 461 | ||||
-rw-r--r-- | nxcompshad/Shadow.h | 2 | ||||
-rw-r--r-- | nxcompshad/Updater.cpp | 2 | ||||
-rw-r--r-- | nxcompshad/Updater.h | 2 | ||||
-rw-r--r-- | nxcompshad/VERSION | 2 | ||||
-rw-r--r-- | nxcompshad/Win.cpp | 2 | ||||
-rw-r--r-- | nxcompshad/Win.h | 2 | ||||
-rw-r--r-- | nxcompshad/X11.cpp | 28 | ||||
-rw-r--r-- | nxcompshad/X11.h | 2 |
24 files changed, 50 insertions, 492 deletions
diff --git a/nxcompshad/CHANGELOG b/nxcompshad/CHANGELOG index ea1ff455c..3472a4afe 100644 --- a/nxcompshad/CHANGELOG +++ b/nxcompshad/CHANGELOG @@ -1,5 +1,16 @@ ChangeLog: +nxcompshad-3.5.0-2 + +- Fixed TR03G02189. Now key combinations involving the Shift keys + are recognized correctly. + +nxcompshad-3.5.0-1 + +- Opened the 3.5.0 branch based on nxcompshad-3.4.0-3. + +- Updated copyright to year 2011. + nxcompshad-3.4.0-3 - Updated copyright to year 2010. diff --git a/nxcompshad/Core.cpp b/nxcompshad/Core.cpp index 6052de6cc..6f9449387 100644 --- a/nxcompshad/Core.cpp +++ b/nxcompshad/Core.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 */ diff --git a/nxcompshad/Core.h b/nxcompshad/Core.h index b0a994329..9bc8a645b 100644 --- a/nxcompshad/Core.h +++ b/nxcompshad/Core.h @@ -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 */ diff --git a/nxcompshad/Input.cpp b/nxcompshad/Input.cpp index 09e77a8ef..f9bf1810d 100644 --- a/nxcompshad/Input.cpp +++ b/nxcompshad/Input.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 */ diff --git a/nxcompshad/Input.h b/nxcompshad/Input.h index 764508e03..6250e790b 100644 --- a/nxcompshad/Input.h +++ b/nxcompshad/Input.h @@ -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 */ diff --git a/nxcompshad/LICENSE b/nxcompshad/LICENSE index 99d6e5cbc..2c7f95a2d 100644 --- a/nxcompshad/LICENSE +++ b/nxcompshad/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2001, 2010 NoMachine - http://www.nomachine.com/. +Copyright (c) 2001, 2011 NoMachine - http://www.nomachine.com/. NXCOMPSHAD and NX extensions to X are copyright of NoMachine. diff --git a/nxcompshad/Logger.cpp b/nxcompshad/Logger.cpp index 47e5e6391..c367c5d7f 100644 --- a/nxcompshad/Logger.cpp +++ b/nxcompshad/Logger.cpp @@ -1,6 +1,6 @@ /**************************************************************************/ /* */ -/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ +/* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */ /* */ /* NXCOMP, NX protocol compression and NX extensions to this software */ /* are copyright of NoMachine. Redistribution and use of the present */ diff --git a/nxcompshad/Logger.h b/nxcompshad/Logger.h index 0a9cad95f..94e4da857 100644 --- a/nxcompshad/Logger.h +++ b/nxcompshad/Logger.h @@ -1,6 +1,6 @@ /**************************************************************************/ /* */ -/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */ +/* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */ /* */ /* NXCOMP, NX protocol compression and NX extensions to this software */ /* are copyright of NoMachine. Redistribution and use of the present */ diff --git a/nxcompshad/Makefile.in b/nxcompshad/Makefile.in index eaf5cabcf..1580a3594 100755..100644 --- a/nxcompshad/Makefile.in +++ b/nxcompshad/Makefile.in @@ -1,6 +1,6 @@ ############################################################################ # # -# Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. # +# Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. # # # # NXCOMP, NX protocol compression and NX extensions to this software # # are copyright of NoMachine. Redistribution and use of the present # diff --git a/nxcompshad/Manager.cpp b/nxcompshad/Manager.cpp index 38b92c20c..ba9260a13 100644 --- a/nxcompshad/Manager.cpp +++ b/nxcompshad/Manager.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 */ diff --git a/nxcompshad/Manager.h b/nxcompshad/Manager.h index 6f87cdccf..267754906 100644 --- a/nxcompshad/Manager.h +++ b/nxcompshad/Manager.h @@ -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 */ diff --git a/nxcompshad/Misc.h b/nxcompshad/Misc.h index 3bcb26653..6dc86359f 100644 --- a/nxcompshad/Misc.h +++ b/nxcompshad/Misc.h @@ -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 */ diff --git a/nxcompshad/Poller.h b/nxcompshad/Poller.h index 914ba1d07..4435b5bba 100644 --- a/nxcompshad/Poller.h +++ b/nxcompshad/Poller.h @@ -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 */ diff --git a/nxcompshad/Regions.h b/nxcompshad/Regions.h index 8ea41ad1d..b9303dcb7 100644 --- a/nxcompshad/Regions.h +++ b/nxcompshad/Regions.h @@ -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 */ diff --git a/nxcompshad/Shadow.cpp b/nxcompshad/Shadow.cpp index 6f2856ce1..f9525adcf 100644 --- a/nxcompshad/Shadow.cpp +++ b/nxcompshad/Shadow.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 */ diff --git a/nxcompshad/Shadow.cpp.orig b/nxcompshad/Shadow.cpp.orig deleted file mode 100644 index 206eb2eaf..000000000 --- a/nxcompshad/Shadow.cpp.orig +++ /dev/null @@ -1,461 +0,0 @@ -/**************************************************************************/ -/* */ -/* Copyright (c) 2001, 2010 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 */ -/* software is allowed according to terms specified in the file LICENSE */ -/* which comes in the source distribution. */ -/* */ -/* Check http://www.nomachine.com/licensing.html for applicability. */ -/* */ -/* NX and NoMachine are trademarks of Medialogic S.p.A. */ -/* */ -/* All rights reserved. */ -/* */ -/**************************************************************************/ - -#include <signal.h> -#include <string.h> - -#define PANIC -#define WARNING -#undef TEST -#undef DEBUG - -#include "Logger.h" -#include "Shadow.h" -#include "Poller.h" -#include "Manager.h" - -typedef struct { - KeySym *map; - KeyCode minKeyCode, - maxKeyCode; - int mapWidth; -} KeySymsRec, *KeySymsPtr; - -KeySymsPtr NXShadowKeymap = NULL; - -ShadowOptions NXShadowOptions = {1, 1, -1}; - -static int mirrorException = 0; - -static UpdateManager *updateManager; -static Poller *poller; -static Input *input; - -int NXShadowRemoveAllUpdaters(); - -inline bool NXShadowNotInitialized() -{ - // - // updateManager depends on input and poller. - // So this test seem redundant. - // - // return (input == NULL) || (poller == NULL) || (updateManager == NULL); - // - - return (updateManager == NULL); -} - -#ifdef NEED_SIGNAL_HANDLER -static void NXSignalHandler(int signal) -{ - logTest("NXSignalHandler", "Got signal [%d]", signal); - - if (signal == SIGINT) - { - mirrorException = 1; - } - else if (signal == SIGTERM) - { - mirrorException = 1; - } -} - -static int NXInitSignal() -{ - logTrace("NXInitSignal"); - - struct sigaction sa; - - sa.sa_handler = NXSignalHandler; - sigfillset(&sa.sa_mask); - sa.sa_flags = 0; - - int res; - - while ((res = sigaction(SIGINT, &sa, NULL)) == -1 && - errno == EINTR); - - if (res == -1) - { - logError("NXInitSignal", EGET()); - - return -1; - } - - return 1; -} -#endif - -static void NXHandleException() -{ - if (mirrorException) - { - mirrorException = 0; - - NXShadowRemoveAllUpdaters(); - } -} - -static int NXCreateInput(char *keymap, char *shadowDisplayName) -{ - logTrace("NXCreateInput"); - - input = new Input; - - if (input == NULL) - { - logError("NXCreateInput", ESET(ENOMEM)); - - return -1; - } - - input -> setKeymap(keymap); - - input -> setShadowDisplayName(shadowDisplayName); - - return 1; -} - -static int NXCreatePoller(Display *display, Display **shadowDisplay) -{ - logTrace("NXCreatePoller"); - - if (input == NULL) - { - logError("NXCreatePoller", ESET(EBADFD)); - - return -1; - } - - poller = new Poller(input,display); - - if (poller == NULL) - { - logError("NXCreatePoller", ESET(ENOMEM)); - - return -1; - } - - if (poller -> init() == -1) - { - logTest("NXCreatePoller", "Failed to initialize poller."); - - return -1; - } - - *shadowDisplay = poller -> getShadowDisplay(); - - logTest("NXCreatePoller", "Poller geometry [%d, %d], ShadowDisplay[%p].", poller -> width(), - poller -> height(), (Display *) *shadowDisplay); - - return 1; -} - -static int NXCreateUpdateManager() -{ - logTrace("NXCreateUpdateManager"); - - if (input == NULL || poller == NULL) - { - logError("NXCreateUpdateManager", ESET(EBADFD)); - - return -1; - } - - updateManager = new UpdateManager(poller -> width(), poller -> height(), - poller -> getFrameBuffer(), input); - - if (updateManager == NULL) - { - logError("NXCreateUpdateManager", ESET(ENOMEM)); - - return -1; - } - - return 1; -} - -void NXShadowResetOptions() -{ - NXShadowOptions.optionShmExtension = 1; - NXShadowOptions.optionDamageExtension = 1; -} - -// -// Exported functions. -// - -int NXShadowHasUpdaters() -{ - logTrace("NXShadowHasUpdaters"); - - return (updateManager && updateManager -> numberOfUpdaters()) ? 1 : 0; -} - -int NXShadowRemoveAllUpdaters() -{ - logTrace("NXShadowRemoveAllUpdaters"); - - return updateManager ? updateManager -> removeAllUpdaters() : 0; -} - -int NXShadowRemoveUpdater(UpdaterHandle handle) -{ - logTrace("NXShadowRemoveUpdater"); - - return updateManager ? updateManager -> removeUpdater(handle) : 0; -} - -UpdaterHandle NXShadowAddUpdater(char *displayName) -{ - logTrace("NXShadowAddUpdater"); - - return updateManager ? updateManager -> addUpdater(displayName, NULL) : NULL; -} - -int NXShadowAddUpdaterDisplay(void *dpy, int *w, int *h, unsigned char *d) -{ - Display *display = reinterpret_cast<Display*>(dpy); - - logTrace("NXShadowAddUpdaterDisplay"); - - if ((updateManager ? updateManager -> addUpdater(NULL, display) : NULL) == NULL) - { - logTest("NXShadowAddUpdaterDisplay", "Error"); - - return 0; - } - - *w = updateManager -> getWidth(); - *h = updateManager -> getHeight(); - *d = poller -> depth(); - - return 1; -} - -int NXShadowCreate(void *dpy, char *keymap, char* shadowDisplayName, void **shadowDpy) -{ - logTrace("NXShadowCreate"); - - Display *display = reinterpret_cast<Display*>(dpy); - Display **shadowDisplay = reinterpret_cast<Display**>(shadowDpy); - -/* if (NXInitSignal() != 1) - { - logError("NXShadowCreate", EGET()); - - return -1; - }*/ - - if (NXCreateInput(keymap, shadowDisplayName) != 1) - { - logError("NXShadowCreate", EGET()); - - return -1; - } - - if (NXCreatePoller(display, shadowDisplay) != 1) - { - logTest("NXShadowCreate", "NXCreatePoller failed."); - - return -1; - } - - if (NXCreateUpdateManager() != 1) - { - logError("NXShadowCreate", EGET()); - - return -1; - } - - return 1; -} - -#if !defined(__CYGWIN32__) && !defined(WIN32) - -void NXShadowSetDisplayUid(int uid) -{ - NXShadowOptions.optionShadowDisplayUid = uid; -} - -void NXShadowDisableShm(void) -{ - logUser("NXShadowDisableShm: Disabling SHM.\n"); - - NXShadowOptions.optionShmExtension = 0; -} - -void NXShadowDisableDamage(void) -{ - NXShadowOptions.optionDamageExtension = 0; -} - -#endif - -void NXShadowDestroy() -{ - if (poller) - { - delete poller; - - poller = NULL; - } - - if (updateManager) - { - delete updateManager; - - updateManager = NULL; - } - - if (input) - { - delete input; - - input = NULL; - } -} - -void NXShadowHandleInput() -{ - logTrace("NXShadowHandleInput"); - - if (NXShadowNotInitialized()) - { - logError("NXShadowHandleInput - NXShadow not properly initialized.", ESET(EBADFD)); - - return; - } - - NXHandleException(); - - updateManager -> handleInput(); - - poller -> handleInput(); -} - -int NXShadowHasChanged(int (*callback)(void *), void *arg, int *suspended) -{ - int result; - - logTrace("NXShadowHasChanged"); - - if (NXShadowNotInitialized()) - { - logError("NXShadowHasChanged - NXShadow not properly initialized.", ESET(EBADFD)); - - return -1; - } - - // - // FIXME - //updateManager -> destroyUpdateManagerRegion(); - // - - updateManager -> newRegion(); - -#if !defined(__CYGWIN32__) && !defined(WIN32) - poller -> getEvents(); -#endif - - result = poller -> isChanged(callback, arg, suspended); - - if (result == 1) - { - updateManager -> addRegion(poller -> lastUpdatedRegion()); - - return 1; - } - else if (result == -1) - { - logTest("NXShadowHasChanged", "Scanline error."); - return -1; - } - - return 0; -} - -void NXShadowExportChanges(long *numRects, char **pBox) -{ - Region pReg; - - logTrace("NXShadowExportChanges"); - - if (NXShadowNotInitialized()) - { - logError("NXShadowExportChanges - NXShadow not properly initialized.", ESET(EBADFD)); - } - - updateManager -> update(); - pReg = updateManager -> getUpdateManagerRegion(); - *numRects = pReg -> numRects; - *pBox = (char *)pReg -> rects; - - logTest("NXShadowExportChanges", "numRects [%ld] pBox[%p], pReg->numRects[%ld], rects[%p], size[%lu]", - *numRects, *pBox, pReg -> numRects, &(pReg -> rects -> x2), - (unsigned long) sizeof(pReg -> rects -> x2)); -} - -void NXShadowEvent(Display *display, XEvent event) -{ - poller -> handleEvent(display, &event); -} - -void NXShadowWebKeyEvent(KeySym keysym, Bool isKeyPress) -{ - poller -> handleWebKeyEvent(keysym, isKeyPress); -} - -#ifdef __CYGWIN32__ - -int NXShadowCaptureCursor(unsigned int wnd, void *vis) -{ - Window window = (Window)wnd; - Visual *visual = reinterpret_cast<Visual*>(vis); - - logTrace("NXShadowCaptureCursor"); - - logTest("NXShadowCaptureCursor","Init"); - - return poller -> updateCursor(window, visual); -} - -#endif - -void NXShadowUpdateBuffer(void **buffer) -{ - char **fBuffer = reinterpret_cast<char **>(buffer); - - if (*fBuffer != NULL) - { - poller -> destroyFrameBuffer(); - - poller -> init(); - } - - *fBuffer = poller -> getFrameBuffer(); - - logTest("NXShadowUpdateBuffer","New frame buffer [0x%p]", (void *)*fBuffer); -} - -void NXShadowInitKeymap(void *keysyms) -{ - NXShadowKeymap = (KeySymsPtr) keysyms; - - logTest("NXShadowInitKeymap","KeySyms pointer [0x%p] mapWidth [%d]", - (void *)NXShadowKeymap, NXShadowKeymap -> mapWidth); -} diff --git a/nxcompshad/Shadow.h b/nxcompshad/Shadow.h index ef65c0b2a..e1eddb95c 100644 --- a/nxcompshad/Shadow.h +++ b/nxcompshad/Shadow.h @@ -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 */ diff --git a/nxcompshad/Updater.cpp b/nxcompshad/Updater.cpp index f1761ba66..245c6ce31 100644 --- a/nxcompshad/Updater.cpp +++ b/nxcompshad/Updater.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 */ diff --git a/nxcompshad/Updater.h b/nxcompshad/Updater.h index 4bcaa9176..daa26c10b 100644 --- a/nxcompshad/Updater.h +++ b/nxcompshad/Updater.h @@ -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 */ diff --git a/nxcompshad/VERSION b/nxcompshad/VERSION index 18091983f..1545d9665 100644 --- a/nxcompshad/VERSION +++ b/nxcompshad/VERSION @@ -1 +1 @@ -3.4.0 +3.5.0 diff --git a/nxcompshad/Win.cpp b/nxcompshad/Win.cpp index 3f1e489e2..481cbcac0 100644 --- a/nxcompshad/Win.cpp +++ b/nxcompshad/Win.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 */ diff --git a/nxcompshad/Win.h b/nxcompshad/Win.h index 72566b8f4..fe591ff02 100644 --- a/nxcompshad/Win.h +++ b/nxcompshad/Win.h @@ -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 */ 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)); } diff --git a/nxcompshad/X11.h b/nxcompshad/X11.h index d34fd3dba..21275420c 100644 --- a/nxcompshad/X11.h +++ b/nxcompshad/X11.h @@ -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 */ |