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,10 +4108,11 @@ meta_display_queue_window (MetaDisplay *display,
|
|||||||
run_data = g_new0 (MetaQueueRunData, 1);
|
run_data = g_new0 (MetaQueueRunData, 1);
|
||||||
run_data->display = display;
|
run_data->display = display;
|
||||||
run_data->queue_idx = queue_idx;
|
run_data->queue_idx = queue_idx;
|
||||||
meta_laters_add (laters,
|
priv->queue_later_ids[queue_idx] =
|
||||||
window_queue_later_when[queue_idx],
|
meta_laters_add (laters,
|
||||||
window_queue_run_later_func,
|
window_queue_later_when[queue_idx],
|
||||||
run_data, g_free);
|
window_queue_run_later_func,
|
||||||
|
run_data, g_free);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user