gdkdisplay-wayland: only remove one monitor
authorTimm Bäder <mail@baedert.org>
Wed, 20 May 2020 13:50:17 +0000 (15:50 +0200)
committerTimm Bäder <mail@baedert.org>
Wed, 20 May 2020 13:51:11 +0000 (15:51 +0200)
Ids here are unique, so break out of the loop once we found the monitor
with the given ID.

gdk/wayland/gdkdisplay-wayland.c

index f323a732f6439d75369e80132266248c5ac66a46..1b65c46bded280228516edc18ed7afeff3a01663 100644 (file)
@@ -2530,6 +2530,8 @@ gdk_wayland_display_remove_output (GdkWaylandDisplay *self,
           g_list_store_remove (self->monitors, i);
           gdk_monitor_invalidate (GDK_MONITOR (monitor));
           update_scale (GDK_DISPLAY (self));
+          g_object_unref (monitor);
+          break;
         }
 
       g_object_unref (monitor);