Free monitor name on finalize
This commit is contained in:
parent
19b515dcd8
commit
adce74bc28
@ -94,9 +94,21 @@ gdk_x11_monitor_init (GdkX11Monitor *monitor)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_x11_monitor_finalize (GObject *gobject)
|
||||
{
|
||||
GdkX11Monitor *self = GDK_X11_MONITOR (gobject);
|
||||
|
||||
g_free (self->name);
|
||||
|
||||
G_OBJECT_CLASS (gdk_x11_monitor_parent_class)->finalize (gobject);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
gdk_x11_monitor_class_init (GdkX11MonitorClass *class)
|
||||
{
|
||||
G_OBJECT_CLASS (class)->finalize = gdk_x11_monitor_finalize;
|
||||
GDK_MONITOR_CLASS (class)->get_workarea = gdk_x11_monitor_get_workarea;
|
||||
}
|
||||
|
||||
|
@ -470,7 +470,7 @@ check_is_composited (GdkDisplay *display,
|
||||
|
||||
static GdkX11Monitor *
|
||||
find_monitor_by_name (GdkX11Display *x11_display,
|
||||
char *name)
|
||||
char *name)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -651,7 +651,7 @@ init_randr15 (GdkScreen *screen, gboolean *changed)
|
||||
monitor->remove = FALSE;
|
||||
else
|
||||
{
|
||||
monitor = g_object_new (gdk_x11_monitor_get_type (),
|
||||
monitor = g_object_new (GDK_TYPE_X11_MONITOR,
|
||||
"display", display,
|
||||
NULL);
|
||||
monitor->output = output;
|
||||
@ -996,7 +996,6 @@ init_no_multihead (GdkScreen *screen, gboolean *changed)
|
||||
"display", display,
|
||||
NULL);
|
||||
monitor->output = 0;
|
||||
monitor->name = NULL;
|
||||
monitor->add = TRUE;
|
||||
g_ptr_array_add (x11_display->monitors, monitor);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user