]> source.dussan.org Git - tigervnc.git/commitdiff
Protect the optional IM disabling calls with #ifdef:s
authorPierre Ossman <ossman@cendio.se>
Thu, 11 Sep 2014 08:46:12 +0000 (10:46 +0200)
committerPierre Ossman <ossman@cendio.se>
Thu, 11 Sep 2014 08:46:12 +0000 (10:46 +0200)
CMakeLists.txt
config.h.in
vncviewer/Viewport.cxx

index f5a016ace3e22c8c617994d802e35667b9669601..a3e0931a797747087e8f8f3fdfae47668bca64b0 100644 (file)
@@ -303,6 +303,9 @@ if(FLTK_FOUND)
   # FLTK STR #xxxx
   check_cxx_source_compiles("#include <FL/Fl.H>\nint main(int c, char** v) { Fl::add_xhandler(NULL, NULL); return 0; }" HAVE_FLTK_XHANDLERS)
 
+  # FLTK STR #xxxx
+  check_cxx_source_compiles("#include <FL/Fl.H>\nint main(int c, char** v) { Fl::disable_im(); return 0; }" HAVE_FLTK_IM)
+
   set(CMAKE_REQUIRED_INCLUDES)
   set(CMAKE_REQUIRED_LIBRARIES)
 endif()
index bac626b7f60c61735d94ecc3976ef9f8e70be881..a50e723d1f9346fcd1637ca969a6226f90c7428c 100644 (file)
@@ -18,6 +18,7 @@
 #cmakedefine HAVE_FLTK_WORK_AREA
 #cmakedefine HAVE_FLTK_ICONS
 #cmakedefine HAVE_FLTK_XHANDLERS
+#cmakedefine HAVE_FLTK_IM
 #cmakedefine HAVE_ACTIVE_DESKTOP_H
 #cmakedefine HAVE_ACTIVE_DESKTOP_L
 #cmakedefine ENABLE_NLS 1
index ec48b02ee14ef96bbeba21da314c0671f8ef9473..595a4aa8548ca50dc0d789736ba0e8db8beed6fb 100644 (file)
@@ -410,7 +410,9 @@ int Viewport::handle(int event)
     return 1;
 
   case FL_FOCUS:
+#ifdef HAVE_FLTK_IM
     Fl::disable_im();
+#endif
     // Yes, we would like some focus please!
     return 1;
 
@@ -419,7 +421,9 @@ int Viewport::handle(int event)
     // sense (e.g. Alt+Tab where we only see the Alt press)
     while (!downKeySym.empty())
       handleKeyRelease(downKeySym.begin()->first);
+#ifdef HAVE_FLTK_IM
     Fl::enable_im();
+#endif
     return 1;
 
   case FL_KEYDOWN: