[gtk+/wip/mir] mir: create devices from _constructed
- From: Ryan Lortie <desrt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/mir] mir: create devices from _constructed
- Date: Mon, 26 May 2014 09:49:16 +0000 (UTC)
commit 45bd02fec3a99a5a9bf6f1ae6f3c06526732222b
Author: Ryan Lortie <desrt desrt ca>
Date: Mon May 26 11:47:44 2014 +0200
mir: create devices from _constructed
The "display" property is not yet set at time of _init.
gdk/mir/gdkmirdevicemanager.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/gdk/mir/gdkmirdevicemanager.c b/gdk/mir/gdkmirdevicemanager.c
index 7c8fa43..4140fe7 100644
--- a/gdk/mir/gdkmirdevicemanager.c
+++ b/gdk/mir/gdkmirdevicemanager.c
@@ -89,15 +89,26 @@ _gdk_mir_device_manager_get_keyboard (GdkDeviceManager *device_manager)
static void
gdk_mir_device_manager_init (GdkMirDeviceManager *device_manager)
{
+}
+
+static void
+gdk_mir_device_manager_constructed (GObject *object)
+{
+ GdkMirDeviceManager *device_manager = GDK_MIR_DEVICE_MANAGER (object);
+
device_manager->keyboard = _gdk_mir_device_new (GDK_DEVICE_MANAGER (device_manager), "Mir Keyboard",
GDK_SOURCE_KEYBOARD, FALSE);
device_manager->pointer = _gdk_mir_device_new (GDK_DEVICE_MANAGER (device_manager), "Mir Pointer",
GDK_SOURCE_MOUSE, TRUE);
+
+ G_OBJECT_CLASS (gdk_mir_device_manager_parent_class)->constructed (object);
}
static void
gdk_mir_device_manager_class_init (GdkMirDeviceManagerClass *klass)
{
GdkDeviceManagerClass *device_manager_class = GDK_DEVICE_MANAGER_CLASS (klass);
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
device_manager_class->list_devices = gdk_mir_device_manager_list_devices;
device_manager_class->get_client_pointer = gdk_mir_device_manager_get_client_pointer;
+ object_class->constructed = gdk_mir_device_manager_constructed;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]