mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 08:00:42 -05:00
window: Clean up the set_focused_internal function
Move things out of an indentation layer, and reshuffle things around. https://bugzilla.gnome.org/show_bug.cgi?id=647706
This commit is contained in:
parent
696d9d2fa9
commit
e430e051b7
@ -7214,8 +7214,9 @@ meta_window_set_focused_internal (MetaWindow *window,
|
||||
{
|
||||
if (focused)
|
||||
{
|
||||
if (window != window->display->focus_window)
|
||||
{
|
||||
if (window == window->display->focus_window)
|
||||
return;
|
||||
|
||||
meta_topic (META_DEBUG_FOCUS,
|
||||
"* Focus --> %s\n", window->desc);
|
||||
window->display->focus_window = window;
|
||||
@ -7284,20 +7285,12 @@ meta_window_set_focused_internal (MetaWindow *window,
|
||||
|
||||
meta_window_propagate_focus_appearance (window, TRUE);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (window == window->display->focus_window)
|
||||
{
|
||||
meta_topic (META_DEBUG_FOCUS,
|
||||
"%s is now the previous focus window due to being focused out or unmapped\n",
|
||||
window->desc);
|
||||
|
||||
meta_topic (META_DEBUG_FOCUS,
|
||||
"* Focus --> NULL (was %s)\n", window->desc);
|
||||
if (window != window->display->focus_window)
|
||||
return;
|
||||
|
||||
meta_window_propagate_focus_appearance (window, FALSE);
|
||||
|
||||
window->display->focus_window = NULL;
|
||||
g_object_notify (G_OBJECT (window->display), "focus-window");
|
||||
window->has_focus = FALSE;
|
||||
@ -7319,7 +7312,6 @@ meta_window_set_focused_internal (MetaWindow *window,
|
||||
meta_display_grab_focus_window_button (window->display, window);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
meta_window_lost_focus (MetaWindow *window)
|
||||
|
Loading…
Reference in New Issue
Block a user