compositor: Only disconnect/connect top-window signals if it changed
If the stack changed but the top window didn't, there's no need to disconnect the signal and connect it again. https://gitlab.gnome.org/GNOME/mutter/merge_requests/660
This commit is contained in:
parent
f1837b785b
commit
7645c51c54
@ -1034,6 +1034,7 @@ void
|
||||
meta_compositor_sync_stack (MetaCompositor *compositor,
|
||||
GList *stack)
|
||||
{
|
||||
MetaWindowActor *top_window_actor;
|
||||
GList *old_stack;
|
||||
|
||||
/* This is painful because hidden windows that we are in the process
|
||||
@ -1117,12 +1118,17 @@ meta_compositor_sync_stack (MetaCompositor *compositor,
|
||||
|
||||
sync_actor_stacking (compositor);
|
||||
|
||||
top_window_actor = get_top_visible_window_actor (compositor);
|
||||
|
||||
if (compositor->top_window_actor == top_window_actor)
|
||||
return;
|
||||
|
||||
if (compositor->top_window_actor)
|
||||
g_signal_handlers_disconnect_by_func (compositor->top_window_actor,
|
||||
on_top_window_actor_destroyed,
|
||||
compositor);
|
||||
|
||||
compositor->top_window_actor = get_top_visible_window_actor (compositor);
|
||||
compositor->top_window_actor = top_window_actor;
|
||||
|
||||
if (compositor->top_window_actor)
|
||||
g_signal_connect (compositor->top_window_actor, "destroy",
|
||||
|
Loading…
Reference in New Issue
Block a user