diff options
author | Thomas Lübking <thomas.luebking@gmail.com> | 2016-09-03 22:08:04 (GMT) |
---|---|---|
committer | Mathias Gumz <akira@fluxbox.org> | 2016-09-11 07:56:33 (GMT) |
commit | cdd6861aff5cd06f84c9d23456b5a92b4202e423 (patch) | |
tree | a517c8a2638fe146c2db4af075dbf05f7db1e917 /src/FbTk/App.cc | |
parent | 2047b1a2ba9ea5d3df77c8de9b4e2b3fd3a40a6d (diff) | |
download | fluxbox-cdd6861aff5cd06f84c9d23456b5a92b4202e423.zip fluxbox-cdd6861aff5cd06f84c9d23456b5a92b4202e423.tar.bz2 |
Support editing utf-8 text in TextBox
aka "Flüxbøx"
βµγ, pardon,
BUG: 720
Diffstat (limited to 'src/FbTk/App.cc')
-rw-r--r-- | src/FbTk/App.cc | 8 |
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 | ||
64 | App::~App() { | 72 | App::~App() { |