gdk: Don't leak discarded window state event

When compressing window state events, we didn't free the discarded
event after removing it from the queue, causing us to leak it. This
commit makes sure to free the discarded event after unqueuing it.

https://bugzilla.gnome.org/show_bug.cgi?id=762468
This commit is contained in:
Jonas Ådahl 2016-03-11 13:13:31 +08:00 committed by Matthias Clasen
parent 1d19065979
commit f8bbbbf684

View File

@ -2201,6 +2201,7 @@ _gdk_set_window_state (GdkWindow *window,
{
old = window->old_state;
_gdk_event_queue_remove_link (display, pending_event_link);
gdk_event_free (pending_event_link->data);
g_list_free_1 (pending_event_link);
}
else