diff options
author | Pierre Ossman <ossman@cendio.se> | 2014-07-21 16:17:23 +0200 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2014-07-21 16:17:23 +0200 |
commit | 7b8bff630ce2d98b87ffbf4843e71ca2c97df717 (patch) | |
tree | 58bf286f61ebab3a74c6d7b28defa3e20c4e6bb9 /vncviewer/Viewport.cxx | |
parent | b662ffd4ac9b18ffacebb26d5a57680dd49788b2 (diff) | |
download | tigervnc-7b8bff630ce2d98b87ffbf4843e71ca2c97df717.tar.gz tigervnc-7b8bff630ce2d98b87ffbf4843e71ca2c97df717.zip |
Use NoSymbol as the error code
This is how the X11 API does things, so it's clearer if we use
the same principle.
Diffstat (limited to 'vncviewer/Viewport.cxx')
-rw-r--r-- | vncviewer/Viewport.cxx | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/vncviewer/Viewport.cxx b/vncviewer/Viewport.cxx index cd8b1bc3..7d551682 100644 --- a/vncviewer/Viewport.cxx +++ b/vncviewer/Viewport.cxx @@ -39,6 +39,10 @@ #include <rfb/XF86keysym.h> #endif +#ifndef NoSymbol +#define NoSymbol 0 +#endif + #include "Viewport.h" #include "CConn.h" #include "OptionsDialog.h" @@ -702,7 +706,7 @@ rdr::U32 Viewport::translateKeyEvent(int keyCode, int origKeyCode, const char *k // Unknown special key? if (keyText[0] == '\0') { vlog.error(_("Unknown FLTK key code %d (0x%04x)"), keyCode, keyCode); - return XK_VoidSymbol; + return NoSymbol; } // Look up the symbol the key produces and translate that from Unicode @@ -710,7 +714,7 @@ rdr::U32 Viewport::translateKeyEvent(int keyCode, int origKeyCode, const char *k if (fl_utf_nb_char((const unsigned char*)keyText, strlen(keyText)) != 1) { vlog.error(_("Multiple characters given for key code %d (0x%04x): '%s'"), keyCode, keyCode, keyText); - return XK_VoidSymbol; + return NoSymbol; } ucs = fl_utf8decode(keyText, NULL, NULL); @@ -754,7 +758,7 @@ void Viewport::handleKeyEvent(int keyCode, int origKeyCode, const char *keyText, } keySym = translateKeyEvent(keyCode, origKeyCode, keyText); - if (keySym == XK_VoidSymbol) + if (keySym == NoSymbol) return; #ifdef WIN32 |