aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2011-04-11 11:59:31 +0000
committerPierre Ossman <ossman@cendio.se>2011-04-11 11:59:31 +0000
commit89f868a44fa28d9daeb4070faa0f25d47db91fb1 (patch)
treec03b710f71c3c7a57125fe1910dbe80ce28c3cb9
parentc583c044c9cc4b89b36d43dd3795a52c1ef93ef4 (diff)
downloadtigervnc-89f868a44fa28d9daeb4070faa0f25d47db91fb1.tar.gz
tigervnc-89f868a44fa28d9daeb4070faa0f25d47db91fb1.zip
Handle dead keys more properly (through some fixing in FLTK).
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4365 3789f03b-4d11-0410-bbf8-ca57d06f2519
-rw-r--r--CMakeLists.txt8
-rw-r--r--vncviewer/DesktopWindow.cxx9
-rw-r--r--vncviewer/keysym2ucs.c17
3 files changed, 32 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b8507ab0..498c6148 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,6 +8,7 @@ include(CheckIncludeFiles)
include(CheckFunctionExists)
include(CheckTypeSize)
include(CheckCSourceCompiles)
+include(CheckCXXSourceCompiles)
project(TigerVNC)
set(VERSION 1.0.90)
@@ -136,6 +137,13 @@ if(BUILD_NEW_VNCVIEWER)
set(FLTK_SKIP_FLUID TRUE)
set(FLTK_SKIP_OPENGL TRUE)
find_package(FLTK COMPONENTS REQUIRED)
+
+ # FLTK STR #2599
+ set(CMAKE_REQUIRED_INCLUDES ${FLTK_INCLUDE_DIR})
+ set(CMAKE_REQUIRED_LIBRARIES ${FLTK_LIBRARIES})
+ check_cxx_source_compiles("#include <FL/Fl.H>\nint main(int c, char** v) { Fl::event_compose_symbol(); return 0; }" HAVE_FLTK_DEAD_KEYS)
+ set(CMAKE_REQUIRED_INCLUDES)
+ set(CMAKE_REQUIRED_LIBRARIES)
endif()
# Check for GNUTLS library
diff --git a/vncviewer/DesktopWindow.cxx b/vncviewer/DesktopWindow.cxx
index a621e405..113b8801 100644
--- a/vncviewer/DesktopWindow.cxx
+++ b/vncviewer/DesktopWindow.cxx
@@ -38,6 +38,11 @@
#include "parameters.h"
#include "keysym2ucs.h"
+// FLTK STR #2599 must be fixed for proper dead keys support
+#ifndef HAVE_FLTK_DEAD_KEYS
+#define event_compose_symbol event_text
+#endif
+
using namespace rfb;
extern void exit_vncviewer();
@@ -210,11 +215,11 @@ int DesktopWindow::handle(int event)
return 1;
case FL_KEYDOWN:
- handleKeyEvent(Fl::event_key(), Fl::event_text(), true);
+ handleKeyEvent(Fl::event_key(), Fl::event_compose_symbol(), true);
return 1;
case FL_KEYUP:
- handleKeyEvent(Fl::event_key(), Fl::event_text(), false);
+ handleKeyEvent(Fl::event_key(), Fl::event_compose_symbol(), false);
return 1;
}
diff --git a/vncviewer/keysym2ucs.c b/vncviewer/keysym2ucs.c
index 2e6711fb..d12eb491 100644
--- a/vncviewer/keysym2ucs.c
+++ b/vncviewer/keysym2ucs.c
@@ -810,6 +810,23 @@ struct codepair {
{ 0x13bd, 0x0153 }, /* oe œ LATIN SMALL LIGATURE OE */
{ 0x13be, 0x0178 }, /* Ydiaeresis Ÿ LATIN CAPITAL LETTER Y WITH DIAERESIS */
{ 0x20ac, 0x20ac }, /* EuroSign € EURO SIGN */
+ { 0xfe50, 0x0300 }, /* COMBINING GRAVE ACCENT */
+ { 0xfe51, 0x0301 }, /* COMBINING ACUTE ACCENT */
+ { 0xfe52, 0x0302 }, /* COMBINING CIRCUMFLEX ACCENT */
+ { 0xfe53, 0x0303 }, /* COMBINING TILDE */
+ { 0xfe54, 0x0304 }, /* COMBINING MACRON */
+ { 0xfe55, 0x0306 }, /* COMBINING BREVE */
+ { 0xfe56, 0x0307 }, /* COMBINING DOT ABOVE */
+ { 0xfe57, 0x0308 }, /* COMBINING DIAERESIS */
+ { 0xfe58, 0x030a }, /* COMBINING RING ABOVE */
+ { 0xfe59, 0x030b }, /* COMBINING DOUBLE ACUTE ACCENT */
+ { 0xfe5a, 0x030c }, /* COMBINING CARON */
+ { 0xfe5b, 0x0327 }, /* COMBINING CEDILLA */
+ { 0xfe5c, 0x0328 }, /* COMBINING OGONEK */
+ { 0xfe5d, 0x1da5 }, /* MODIFIER LETTER SMALL IOTA */
+ { 0xfe5e, 0x3099 }, /* COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK */
+ { 0xfe5f, 0x309a }, /* COMBINING KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK */
+ { 0xfe60, 0x0323 }, /* COMBINING DOT BELOW */
};
unsigned keysym2ucs(unsigned keysym)