Nux

Merge lp:~unity-team/nux/nux.key-focus-dead-keys into lp:nux/2.0

Proposed by Brandon Schaefer
Status: Merged
Approved by: Jay Taoko
Approved revision: 601
Merged at revision: 593
Proposed branch: lp:~unity-team/nux/nux.key-focus-dead-keys
Merge into: lp:nux/2.0
Diff against target: 70 lines (+13/-1)
1 file modified
Nux/TextEntry.cpp (+13/-1)
To merge this branch: bzr merge lp:~unity-team/nux/nux.key-focus-dead-keys
Reviewer Review Type Date Requested Status
Jay Taoko (community) Approve
Review via email: mp+96854@code.launchpad.net

Commit message

* When you lose/get key focus make sure you reset the bool value

UNBLOCK

To post a comment you must log in.
Revision history for this message
Jay Taoko (jaytaoko) wrote :

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Nux/TextEntry.cpp'
2--- Nux/TextEntry.cpp 2012-03-09 06:55:00 +0000
3+++ Nux/TextEntry.cpp 2012-03-10 01:46:18 +0000
4@@ -291,6 +291,7 @@
5 {
6 bool retval = FALSE;
7
8+#if defined(NUX_OS_LINUX)
9 if (dead_key_mode_ && keysym == XK_space)
10 {
11 dead_key_mode_ = false;
12@@ -307,7 +308,8 @@
13 {
14 return;
15 }
16-
17+#endif
18+
19 if (event_type == NUX_KEYDOWN)
20 text_input_mode_ = true;
21
22@@ -543,6 +545,7 @@
23 {
24 key_nav_mode_ = true;
25 text_input_mode_ = false;
26+ dead_key_mode_ = false;
27 composition_mode_ = false;
28 composition_string_.clear();
29
30@@ -553,6 +556,7 @@
31 {
32 key_nav_mode_ = false;
33 text_input_mode_ = false;
34+ dead_key_mode_ = false;
35 composition_mode_ = false;
36 composition_string_.clear();
37
38@@ -602,6 +606,7 @@
39
40 bool TextEntry::HandledDeadKeys(int keysym, int state, const char* character)
41 {
42+#if defined(NUX_OS_LINUX)
43 /* Checks if the keysym between the first and last dead key */
44 if ((keysym >= XK_dead_grave) && (keysym <= XK_dead_stroke) && !dead_key_mode_)
45 {
46@@ -627,10 +632,14 @@
47 dead_key_mode_ = false;
48 }
49 return false;
50+#else
51+ return false;
52+#endif
53 }
54
55 bool TextEntry::HandledComposition(int keysym, const char* character)
56 {
57+#if defined(NUX_OS_LINUX)
58 if (keysym == XK_Multi_key)
59 {
60 if (composition_mode_)
61@@ -683,6 +692,9 @@
62 }
63 }
64 return false;
65+#else
66+ return false;
67+#endif
68 }
69
70 void TextEntry::SetText(const char* text)

Subscribers

People subscribed via source and target branches

to all changes: