summaryrefslogtreecommitdiff
path: root/gdk/x11/gdkdisplay-x11.c
diff options
context:
space:
mode:
authorHavoc Pennington <hp@pobox.com>2010-09-18 22:57:36 -0400
committerMatthias Clasen <mclasen@redhat.com>2010-09-18 22:57:36 -0400
commitc7d73ee5875786f88ab72ed94072d25c207bcf94 (patch)
treee658fc232cfa3a7ba071794ebe6d04eefdad45da /gdk/x11/gdkdisplay-x11.c
parentb837ef5a6d2ce003eae3dd558ac1ac9934e9d72c (diff)
downloadgtk+-c7d73ee5875786f88ab72ed94072d25c207bcf94.tar.gz
Fix bugs that crashed gdk_display_close() on x11
* _gdk_device_set_associated_device() did not allow NULL device * GdkDisplay should dispose device manager to avoid devices trying to touch the display in finalize * GdkDeviceManagerXI did not ref devices in id hash * GdkDisplayX11 did not ref devices in ->input_devices
Diffstat (limited to 'gdk/x11/gdkdisplay-x11.c')
-rw-r--r--gdk/x11/gdkdisplay-x11.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c
index 9ad4178007..ea4e9914dc 100644
--- a/gdk/x11/gdkdisplay-x11.c
+++ b/gdk/x11/gdkdisplay-x11.c
@@ -1154,7 +1154,8 @@ _gdk_input_init (GdkDisplay *display)
if (device->source == GDK_SOURCE_KEYBOARD)
continue;
- display_x11->input_devices = g_list_prepend (display_x11->input_devices, l->data);
+ display_x11->input_devices = g_list_prepend (display_x11->input_devices,
+ g_object_ref (l->data));
}
g_list_free (list);
@@ -1176,7 +1177,8 @@ _gdk_input_init (GdkDisplay *display)
}
/* Add the core pointer to the devices list */
- display_x11->input_devices = g_list_prepend (display_x11->input_devices, display->core_pointer);
+ display_x11->input_devices = g_list_prepend (display_x11->input_devices,
+ g_object_ref (display->core_pointer));
g_list_free (list);
}
@@ -1449,8 +1451,7 @@ gdk_display_open (const gchar *display_name)
_gdk_x11_screen_setup (display_x11->screens[i]);
g_signal_emit_by_name (display, "opened");
- g_signal_emit_by_name (gdk_display_manager_get(),
- "display_opened", display);
+ g_signal_emit_by_name (gdk_display_manager_get (), "display-opened", display);
return display;
}