display: Properly store later ID when adding window to queue
The code is already trying to avoid creating new laters when there already is one for the queue type, but this wasn't working because the ID of the later was never stored after creating a new one. This would then result in as many laters as meta_display_queue_window() was called and all of them would run the handler function, even if only the first one had a non-empty window queue. Similarly this was causing the later to not be removed if the window queue got empty after meta_display_unqueue_window(). Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2414>
This commit is contained in:
parent
b289c8f01e
commit
bc9762eebb
@ -4108,6 +4108,7 @@ meta_display_queue_window (MetaDisplay *display,
|
||||
run_data = g_new0 (MetaQueueRunData, 1);
|
||||
run_data->display = display;
|
||||
run_data->queue_idx = queue_idx;
|
||||
priv->queue_later_ids[queue_idx] =
|
||||
meta_laters_add (laters,
|
||||
window_queue_later_when[queue_idx],
|
||||
window_queue_run_later_func,
|
||||
|
Loading…
Reference in New Issue
Block a user