window: Merge got_focus/lost_focus to a new function

Make it a static function for now, but this will be a private
function soon, replacing meta_window_lost_focus. This should
contain no functional changes, only cosmetic indentation changes,
so best viewed with ignorews=1 or -w or -b, you know the drill.

https://bugzilla.gnome.org/show_bug.cgi?id=647706
This commit is contained in:
Jasper St. Pierre 2012-12-16 21:24:32 -05:00
parent f6dd081acd
commit 696d9d2fa9

View File

@ -7209,7 +7209,10 @@ meta_window_propagate_focus_appearance (MetaWindow *window,
}
static void
meta_window_got_focus (MetaWindow *window)
meta_window_set_focused_internal (MetaWindow *window,
gboolean focused)
{
if (focused)
{
if (window != window->display->focus_window)
{
@ -7282,9 +7285,7 @@ meta_window_got_focus (MetaWindow *window)
meta_window_propagate_focus_appearance (window, TRUE);
}
}
void
meta_window_lost_focus (MetaWindow *window)
else
{
if (window == window->display->focus_window)
{
@ -7318,6 +7319,13 @@ meta_window_lost_focus (MetaWindow *window)
meta_display_grab_focus_window_button (window->display, window);
}
}
}
void
meta_window_lost_focus (MetaWindow *window)
{
meta_window_set_focused_internal (window, FALSE);
}
gboolean
meta_window_notify_focus (MetaWindow *window,
@ -7395,8 +7403,10 @@ meta_window_notify_focus (MetaWindow *window,
g_object_notify (G_OBJECT (window->display), "focus-window");
return FALSE;
}
meta_window_got_focus (window);
else
{
meta_window_set_focused_internal (window, TRUE);
}
}
else if (event->evtype == XI_FocusOut)
{
@ -7410,7 +7420,7 @@ meta_window_notify_focus (MetaWindow *window,
}
else
{
meta_window_lost_focus (window);
meta_window_set_focused_internal (window, FALSE);
}
}