aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/App.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbTk/App.cc')
-rw-r--r--src/FbTk/App.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/FbTk/App.cc b/src/FbTk/App.cc
index a3e806a..c90f7c8 100644
--- a/src/FbTk/App.cc
+++ b/src/FbTk/App.cc
@@ -45,6 +45,9 @@ App::App(const char *displayname):m_done(false), m_display(0) {
45 if (s_app != 0) 45 if (s_app != 0)
46 throw std::string("Can't create more than one instance of FbTk::App"); 46 throw std::string("Can't create more than one instance of FbTk::App");
47 s_app = this; 47 s_app = this;
48 // with recent versions of X11 one needs to specify XSetLocaleModifiers,
49 // otherwise no extra events won't be generated.
50 const bool setmodifiers = XSetLocaleModifiers("@im=none");
48 // this allows the use of std::string.c_str(), which returns 51 // this allows the use of std::string.c_str(), which returns
49 // a blank string, rather than a null string, so we make them equivalent 52 // a blank string, rather than a null string, so we make them equivalent
50 if (displayname != 0 && displayname[0] == '\0') 53 if (displayname != 0 && displayname[0] == '\0')
@@ -59,6 +62,11 @@ App::App(const char *displayname):m_done(false), m_display(0) {
59 } 62 }
60 63
61 FbStringUtil::init(); 64 FbStringUtil::init();
65
66 m_xim = 0;
67 if (setmodifiers && FbStringUtil::haveUTF8()) {
68 m_xim = XOpenIM(m_display, NULL, NULL, NULL);
69 }
62} 70}
63 71
64App::~App() { 72App::~App() {