[gtk+/events-refactor: 703/1085] Delay core pointer creation until the display is available.
- From: Carlos Garnacho <carlosg src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gtk+/events-refactor: 703/1085] Delay core pointer creation until the display is available.
- Date: Tue, 29 Sep 2009 10:46:51 +0000 (UTC)
commit 3c3efee0fa05e80aeda09b3b69f7ee20fed12031
Author: Carlos Garnacho <carlos lanedo com>
Date: Wed Aug 12 19:43:08 2009 +0200
Delay core pointer creation until the display is available.
gdk/x11/gdkdevicemanager-core.c | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/gdk/x11/gdkdevicemanager-core.c b/gdk/x11/gdkdevicemanager-core.c
index f4dce3f..4775a83 100644
--- a/gdk/x11/gdkdevicemanager-core.c
+++ b/gdk/x11/gdkdevicemanager-core.c
@@ -33,6 +33,8 @@
#define HAS_FOCUS(toplevel) \
((toplevel)->has_focus || (toplevel)->has_pointer_focus)
+static void gdk_device_manager_core_constructed (GObject *object);
+
static GList * gdk_device_manager_core_get_devices (GdkDeviceManager *device_manager,
GdkDeviceType type);
@@ -54,7 +56,9 @@ static void
gdk_device_manager_core_class_init (GdkDeviceManagerCoreClass *klass)
{
GdkDeviceManagerClass *device_manager_class = GDK_DEVICE_MANAGER_CLASS (klass);
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ object_class->constructed = gdk_device_manager_core_constructed;
device_manager_class->get_devices = gdk_device_manager_core_get_devices;
}
@@ -80,10 +84,15 @@ create_core_pointer (GdkDisplay *display)
static void
gdk_device_manager_core_init (GdkDeviceManagerCore *device_manager)
{
+}
+
+static void
+gdk_device_manager_core_constructed (GObject *object)
+{
GdkDisplay *display;
- display = gdk_device_manager_get_display (GDK_DEVICE_MANAGER (device_manager));
- device_manager->core_pointer = create_core_pointer (display);
+ display = gdk_device_manager_get_display (GDK_DEVICE_MANAGER (object));
+ GDK_DEVICE_MANAGER_CORE (object)->core_pointer = create_core_pointer (display);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]