mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
CtrlCore: Another attempt at SCIM fix...
git-svn-id: svn://ultimatepp.org/upp/trunk@1303 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
d6746e1859
commit
65de58b00d
2 changed files with 15 additions and 10 deletions
|
|
@ -51,6 +51,7 @@ void TopWindow::EventProc(XWindow& w, XEvent *event)
|
|||
TakeFocus();
|
||||
return;
|
||||
}
|
||||
LLOG("Unknown WM_PROTOCOLS: " << XAtomName(a));
|
||||
}
|
||||
}
|
||||
if(this_) Ctrl::EventProc(w, event);
|
||||
|
|
|
|||
|
|
@ -210,8 +210,10 @@ void Ctrl::ProcessEvent(XEvent *event)
|
|||
&& event->type != MotionNotify)
|
||||
for(XEventMap *m = sXevent; m->ID; m++)
|
||||
if(m->ID == event->type) {
|
||||
if(!s_starttime)
|
||||
s_starttime = GetTickCount();
|
||||
int t = GetTickCount() - s_starttime;
|
||||
VppLog() << Format("%d.%03d", t / 1000, t % 1000);
|
||||
VppLog() << Format("%d.%01d", t / 1000, t % 1000);
|
||||
VppLog() << " EVENT " << Format("%-20.20s", m->name);
|
||||
VppLog() << "[window: " << event->xany.window << "] ";
|
||||
if(q >= 0)
|
||||
|
|
@ -414,18 +416,9 @@ void Ctrl::Create0(Ctrl *owner, bool redirect, bool savebits)
|
|||
cw.exposed = false;
|
||||
cw.owner = owner;
|
||||
|
||||
/*
|
||||
cw.xic = xim ? XCreateIC(xim,
|
||||
XNInputStyle, XIMPreeditNothing|XIMStatusNothing,
|
||||
XNClientWindow, w,
|
||||
XNFocusWindow, w,
|
||||
NULL)
|
||||
: NULL;
|
||||
*/
|
||||
// This seems to fix SCIM problem
|
||||
cw.xic = xim ? XCreateIC((XIM)xim,
|
||||
XNInputStyle, XIMPreeditNothing|XIMStatusNothing,
|
||||
XNClientWindow, Xroot,
|
||||
NULL)
|
||||
: NULL;
|
||||
|
||||
|
|
@ -488,8 +481,18 @@ void Ctrl::WndDestroy0()
|
|||
top->window = None;
|
||||
Xwindow()[i].ctrl = NULL;
|
||||
}
|
||||
|
||||
if(revertfocus && owner)
|
||||
owner->TakeFocus();
|
||||
|
||||
if(focusWindow) {
|
||||
int q = Xwindow().Find(focusWindow);
|
||||
if(q >= 0) {
|
||||
XIC xic = Xwindow()[q].xic;
|
||||
XSetICFocus(xic);
|
||||
}
|
||||
}
|
||||
|
||||
delete top;
|
||||
top = NULL;
|
||||
}
|
||||
|
|
@ -709,6 +712,7 @@ void ClearKbdState_();
|
|||
|
||||
void Ctrl::TakeFocus()
|
||||
{
|
||||
LLOG("TAKE_FOCUS0 " << Name());
|
||||
GuiLock __;
|
||||
if(IsChild()) {
|
||||
Ctrl *w = GetTopCtrl();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue