mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
*CtrlCore: Gtk fixed issue with delayed activatation (#411)
git-svn-id: svn://ultimatepp.org/upp/trunk@5707 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
ce8ae7ae57
commit
04df76330e
3 changed files with 7 additions and 22 deletions
|
|
@ -124,11 +124,13 @@ gboolean Ctrl::GtkEvent(GtkWidget *widget, GdkEvent *event, gpointer user_data)
|
|||
case GDK_DELETE:
|
||||
break;
|
||||
case GDK_FOCUS_CHANGE:
|
||||
if(p)
|
||||
if(p) {
|
||||
if(((GdkEventFocus *)event)->in)
|
||||
gtk_im_context_focus_in(p->top->im_context);
|
||||
else
|
||||
gtk_im_context_focus_in(p->top->im_context);
|
||||
AddEvent(user_data, EVENT_NONE, value);
|
||||
}
|
||||
return false;
|
||||
case GDK_LEAVE_NOTIFY:
|
||||
EventMouseValid = false;
|
||||
|
|
@ -461,9 +463,6 @@ void Ctrl::Proc()
|
|||
}
|
||||
return;
|
||||
}
|
||||
// case GDK_FOCUS_CHANGE:
|
||||
// ProcessFocusEvent(CurrentEvent);
|
||||
// return;
|
||||
case GDK_CONFIGURE: {
|
||||
Rect rect = CurrentEvent.value;
|
||||
if(GetRect() != rect)
|
||||
|
|
@ -477,21 +476,6 @@ void Ctrl::Proc()
|
|||
_this->PostInput();
|
||||
}
|
||||
|
||||
void Ctrl::ProcessFocusEvent(const Event& e)
|
||||
{
|
||||
LLOG("FocusChange in: " << (bool)e.value << ", focusCtrlWnd " << Upp::Name(focusCtrlWnd));
|
||||
if((bool)e.value) {
|
||||
gtk_im_context_focus_in(top->im_context);
|
||||
if(this != focusCtrlWnd) {
|
||||
LLOG("Activate " << Name());
|
||||
SetFocusWnd();
|
||||
}
|
||||
}
|
||||
else {
|
||||
gtk_im_context_focus_out(top->im_context);
|
||||
KillFocusWnd();
|
||||
}
|
||||
}
|
||||
|
||||
bool Ctrl::ProcessEvent0(bool *quit, bool fetch)
|
||||
{
|
||||
|
|
@ -526,11 +510,12 @@ bool Ctrl::ProcessEvent0(bool *quit, bool fetch)
|
|||
FocusSync();
|
||||
if(w)
|
||||
w->Proc();
|
||||
FocusSync();
|
||||
r = true;
|
||||
}
|
||||
if(quit)
|
||||
*quit = IsEndSession();
|
||||
FocusSync();
|
||||
SyncCaret();
|
||||
return r;
|
||||
}
|
||||
|
||||
|
|
@ -540,7 +525,7 @@ bool Ctrl::ProcessEvent(bool *quit)
|
|||
}
|
||||
|
||||
gboolean Ctrl::TimeHandler(GtkWidget *)
|
||||
{
|
||||
{ // we only need timer to periodically break blocking g_main_context_iteration
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue