From 400ecdfc81d19ab27cbc7a4f416b6fc109556ebf Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Wed, 19 Jan 2011 16:34:37 +0000 Subject: [PATCH] win32: Update DeviceManager device creation --- clutter/win32/clutter-device-manager-win32.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/clutter/win32/clutter-device-manager-win32.c b/clutter/win32/clutter-device-manager-win32.c index 1e9308a62..3527c9cf3 100644 --- a/clutter/win32/clutter-device-manager-win32.c +++ b/clutter/win32/clutter-device-manager-win32.c @@ -48,12 +48,16 @@ static void clutter_device_manager_win32_constructed (GObject *gobject) { ClutterDeviceManager *manager = CLUTTER_DEVICE_MANAGER (gobject); + ClutterDeviceManagerWin32 *manager_win32; ClutterInputDevice *device; device = g_object_new (CLUTTER_TYPE_INPUT_DEVICE, "id", 0, "name", "Core Pointer", "device-type", CLUTTER_POINTER_DEVICE, + "device-mode", CLUTTER_INPUT_MODE_MASTER, + "has-cursor", TRUE, + "enabled", TRUE, NULL); CLUTTER_NOTE (BACKEND, "Added core pointer device"); _clutter_device_manager_add_device (manager, device); @@ -62,9 +66,18 @@ clutter_device_manager_win32_constructed (GObject *gobject) "id", 1, "name", "Core Keyboard", "device-type", CLUTTER_KEYBOARD_DEVICE, + "device-mode", CLUTTER_INPUT_MODE_MASTER, + "enabled", TRUE, NULL); CLUTTER_NOTE (BACKEND, "Added core keyboard device"); _clutter_device_manager_add_device (manager, device); + + manager_win32 = CLUTTER_DEVICE_MANAGER_WIN32 (manager); + + _clutter_input_device_set_associated_device (manager_win32->core_pointer, + manager_win32->core_keyboard); + _clutter_input_device_set_associated_device (manager_win32->core_keyboard, + manager_win32->core_pointer); } static void