diff options
author | Sebastian Keller <skeller@gnome.org> | 2022-05-13 19:12:52 +0200 |
---|---|---|
committer | Florian Müllner <fmuellner@gnome.org> | 2022-05-28 14:15:30 +0200 |
commit | f998a917577fff89462fd621307b2c51844fd06d (patch) | |
tree | 95e53c0e0a9895e2a0aa551aeb76a65d462d07c9 /src | |
parent | a28b9f86a288b28eb35b55de6b3ba2beccb0d217 (diff) | |
download | mutter-f998a917577fff89462fd621307b2c51844fd06d.tar.gz |
window: Ensure window-visibility-updated is emitted when flushing queue
Currently the signal is getting emitted accidentally, because even when
removing a window from the queue, the later handler of that queue will
still get run due to a bug. This bug is going to get fixed in the next
commit, but some things might depend on the signal getting emitted when
the visibility of a window has changed.
This change affects the behavior in two ways. First the signal is now
emitted immediately rather than from an idle. And second it now
correctly includes the window in the should_show or should_hide list.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2414>
(cherry picked from commit b289c8f01e97e65dffaf512844f3a769cc4e8ea0)
Diffstat (limited to 'src')
-rw-r--r-- | src/core/window.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/core/window.c b/src/core/window.c index e22bd5a0e..95ea18f2c 100644 --- a/src/core/window.c +++ b/src/core/window.c @@ -1800,11 +1800,13 @@ meta_window_flush_calc_showing (MetaWindow *window) { MetaWindowPrivate *priv = meta_window_get_instance_private (window); - if (priv->queued_types & META_QUEUE_CALC_SHOWING) - { - meta_window_unqueue (window, META_QUEUE_CALC_SHOWING); - meta_window_update_visibility (window); - } + if (!(priv->queued_types & META_QUEUE_CALC_SHOWING)) + return; + + meta_display_flush_queued_window (window->display, window, + META_QUEUE_CALC_SHOWING); + + priv->queued_types &= ~META_QUEUE_CALC_SHOWING; } void |