mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-21 22:04:56 -06:00
*CtrCore: Fixed X11 Key_UP regression
git-svn-id: svn://ultimatepp.org/upp/trunk@3423 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
2289fcc667
commit
8d2a697fcb
1 changed files with 18 additions and 19 deletions
|
|
@ -174,27 +174,26 @@ void Ctrl::EventProc(XWindow& w, XEvent *event)
|
|||
KeySym keysym;
|
||||
int chr = 0;
|
||||
WString wtext;
|
||||
if(pressed)
|
||||
if(w.xic) {
|
||||
Status status;
|
||||
int len = Xutf8LookupString(w.xic, &event->xkey, buff, sizeof(buff), &keysym, &status);
|
||||
buff[len] = 0;
|
||||
if(status == XLookupChars || status == XLookupBoth) {
|
||||
chr = FromUtf8(buff, len)[0];
|
||||
if(status == XLookupChars)
|
||||
wtext = FromUtf8(buff, len);
|
||||
}
|
||||
else
|
||||
if(status != XLookupKeySym && status != XLookupBoth)
|
||||
keysym = 0;
|
||||
}
|
||||
else {
|
||||
int len = XLookupString(&event->xkey, buff, sizeof(buff), &keysym, NULL);
|
||||
buff[len] = 0;
|
||||
if(pressed && w.xic) {
|
||||
Status status;
|
||||
int len = Xutf8LookupString(w.xic, &event->xkey, buff, sizeof(buff), &keysym, &status);
|
||||
buff[len] = 0;
|
||||
if(status == XLookupChars || status == XLookupBoth) {
|
||||
chr = FromUtf8(buff, len)[0];
|
||||
if(len > 1)
|
||||
if(status == XLookupChars)
|
||||
wtext = FromUtf8(buff, len);
|
||||
}
|
||||
else
|
||||
if(status != XLookupKeySym && status != XLookupBoth)
|
||||
keysym = 0;
|
||||
}
|
||||
else {
|
||||
int len = XLookupString(&event->xkey, buff, sizeof(buff), &keysym, NULL);
|
||||
buff[len] = 0;
|
||||
chr = FromUtf8(buff, len)[0];
|
||||
if(len > 1)
|
||||
wtext = FromUtf8(buff, len);
|
||||
}
|
||||
if(keysym == XK_Control_L || keysym == XK_Control_R) {
|
||||
keysym = XK_Control_L;
|
||||
if(pressed)
|
||||
|
|
@ -286,7 +285,7 @@ void Ctrl::EventProc(XWindow& w, XEvent *event)
|
|||
if(chr && pressed) {
|
||||
DispatchKey(chr, count);
|
||||
for(int ii = 1; ii < wtext.GetLength(); ii++)
|
||||
DispatchKey(wtext[ii], 1);
|
||||
DispatchKey(wtext[ii], count);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue