mirror of
https://github.com/brl/mutter.git
synced 2025-02-16 21:34:09 +00: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 (focused)
|
||||||
{
|
{
|
||||||
if (window != window->display->focus_window)
|
if (window == window->display->focus_window)
|
||||||
{
|
return;
|
||||||
|
|
||||||
meta_topic (META_DEBUG_FOCUS,
|
meta_topic (META_DEBUG_FOCUS,
|
||||||
"* Focus --> %s\n", window->desc);
|
"* Focus --> %s\n", window->desc);
|
||||||
window->display->focus_window = window;
|
window->display->focus_window = window;
|
||||||
@ -7284,20 +7285,12 @@ meta_window_set_focused_internal (MetaWindow *window,
|
|||||||
|
|
||||||
meta_window_propagate_focus_appearance (window, TRUE);
|
meta_window_propagate_focus_appearance (window, TRUE);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (window == window->display->focus_window)
|
if (window != window->display->focus_window)
|
||||||
{
|
return;
|
||||||
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);
|
|
||||||
|
|
||||||
meta_window_propagate_focus_appearance (window, FALSE);
|
meta_window_propagate_focus_appearance (window, FALSE);
|
||||||
|
|
||||||
window->display->focus_window = NULL;
|
window->display->focus_window = NULL;
|
||||||
g_object_notify (G_OBJECT (window->display), "focus-window");
|
g_object_notify (G_OBJECT (window->display), "focus-window");
|
||||||
window->has_focus = FALSE;
|
window->has_focus = FALSE;
|
||||||
@ -7319,7 +7312,6 @@ meta_window_set_focused_internal (MetaWindow *window,
|
|||||||
meta_display_grab_focus_window_button (window->display, window);
|
meta_display_grab_focus_window_button (window->display, window);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
meta_window_lost_focus (MetaWindow *window)
|
meta_window_lost_focus (MetaWindow *window)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user