mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
*ide, CtrlCore: fixed crashing of assist popup on mouse click
git-svn-id: svn://ultimatepp.org/upp/trunk@3814 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
d868626d91
commit
65a46e5efc
2 changed files with 11 additions and 5 deletions
|
|
@ -861,7 +861,7 @@ void Ctrl::KillFocus(Window window)
|
|||
if(q < 0)
|
||||
return;
|
||||
XWindow& w = Xwindow()[q];
|
||||
if(w.ctrl)
|
||||
if(w.ctrl)
|
||||
w.ctrl->KillFocusWnd();
|
||||
}
|
||||
|
||||
|
|
@ -873,10 +873,13 @@ void Ctrl::SetWndFocus0(bool *b)
|
|||
if(top && top->window != focusWindow && IsEnabled() && IsVisible()) {
|
||||
LLOG("Setting focus... ");
|
||||
LTIMING("XSetInfputFocus");
|
||||
Ptr<Ctrl> _this = this;
|
||||
KillFocus(focusWindow);
|
||||
XSetInputFocus(Xdisplay, top->window, RevertToParent, CurrentTime);
|
||||
focusWindow = top->window;
|
||||
SetFocusWnd();
|
||||
if(_this && top) {
|
||||
XSetInputFocus(Xdisplay, top->window, RevertToParent, CurrentTime);
|
||||
focusWindow = top->window;
|
||||
SetFocusWnd();
|
||||
}
|
||||
*b = true;
|
||||
}
|
||||
}
|
||||
|
|
@ -1003,8 +1006,10 @@ void Ctrl::SetWndForeground0()
|
|||
w->last_active->SetWndForeground();
|
||||
}
|
||||
else {
|
||||
Ptr<Ctrl> _this = this;
|
||||
SetWndFocus();
|
||||
XRaiseWindow(Xdisplay, top->window);
|
||||
if(_this && top)
|
||||
XRaiseWindow(Xdisplay, top->window);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ AssistEditor::AssistEditor()
|
|||
assist.NoHeader();
|
||||
assist.NoGrid();
|
||||
assist.AddColumn().Margin(0).SetDisplay(Single<CppItemInfoDisplay>());
|
||||
assist.NoWantFocus();
|
||||
assist.WhenLeftClick = THISBACK(AssistInsert);
|
||||
type.NoHeader();
|
||||
type.NoGrid();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue