Nux

Merge lp:~brandontschaefer/nux/fix-lp.1205713 into lp:nux

Proposed by Brandon Schaefer
Status: Merged
Approved by: Christopher Townsend
Approved revision: 812
Merged at revision: 812
Proposed branch: lp:~brandontschaefer/nux/fix-lp.1205713
Merge into: lp:nux
Diff against target: 32 lines (+9/-2)
1 file modified
NuxGraphics/GraphicsDisplayX11.cpp (+9/-2)
To merge this branch: bzr merge lp:~brandontschaefer/nux/fix-lp.1205713
Reviewer Review Type Date Requested Status
Christopher Townsend Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+182528@code.launchpad.net

Commit message

Use a temp buf to poke for the size of string vs passing nullptr. For some reason this was working for most cases, but not greek. Using a temp buf allows us to poke the greeks chars and others that werent working.

Description of the change

Use a temp buf to poke for the size of string vs passing nullptr. For some reason this was working for most cases, but not greek. Using a temp buf allows us to poke the greeks chars and others that werent working.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Christopher Townsend (townsend) wrote :

LGTM. Greek letters are now getting outputted in the Dash.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'NuxGraphics/GraphicsDisplayX11.cpp'
2--- NuxGraphics/GraphicsDisplayX11.cpp 2013-07-18 23:07:45 +0000
3+++ NuxGraphics/GraphicsDisplayX11.cpp 2013-08-28 01:37:40 +0000
4@@ -1724,13 +1724,14 @@
5 if (!skip)
6 {
7 int num_char_stored = 0;
8+
9 if (m_xim_controller->IsXICValid())
10 {
11 delete[] m_pEvent->dtext;
12 m_pEvent->dtext = nullptr;
13
14- num_char_stored = XmbLookupString(m_xim_controller->GetXIC(), &xevent.xkey, nullptr,
15- 0, (KeySym*) &m_pEvent->x11_keysym, nullptr);
16+ num_char_stored = XmbLookupString(m_xim_controller->GetXIC(), &xevent.xkey, buffer,
17+ NUX_EVENT_TEXT_BUFFER_SIZE, (KeySym*) &m_pEvent->x11_keysym, nullptr);
18
19 if (num_char_stored > 0)
20 {
21@@ -1754,6 +1755,12 @@
22 }
23 }
24
25+ if (m_pEvent->dtext == nullptr)
26+ {
27+ m_pEvent->dtext = new char[NUX_EVENT_TEXT_BUFFER_SIZE];
28+ m_pEvent->dtext[0] = 0;
29+ }
30+
31 break;
32 }
33

Subscribers

People subscribed via source and target branches