[gtk+] mir: add default GdkSeat for the default GdkDisplay
- From: William Hua <williamhua src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] mir: add default GdkSeat for the default GdkDisplay
- Date: Fri, 15 Jan 2016 19:11:12 +0000 (UTC)
commit 2b95e4db55cd68f4d1e829d43dd9a5c200e40754
Author: William Hua <william hua canonical com>
Date: Fri Jan 15 14:09:33 2016 -0500
mir: add default GdkSeat for the default GdkDisplay
gdk/mir/gdkmirdevicemanager.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/gdk/mir/gdkmirdevicemanager.c b/gdk/mir/gdkmirdevicemanager.c
index c94f8a3..a4c38a9 100644
--- a/gdk/mir/gdkmirdevicemanager.c
+++ b/gdk/mir/gdkmirdevicemanager.c
@@ -20,6 +20,7 @@
#include "gdkdevicemanagerprivate.h"
#include "gdkdisplayprivate.h"
#include "gdkdeviceprivate.h"
+#include "gdkseatdefaultprivate.h"
#include "gdkmir.h"
#include "gdkmir-private.h"
@@ -97,13 +98,20 @@ static void
gdk_mir_device_manager_constructed (GObject *object)
{
GdkMirDeviceManager *device_manager = GDK_MIR_DEVICE_MANAGER (object);
+ GdkDisplay *display;
+ GdkSeat *seat;
device_manager->keyboard = _gdk_mir_keyboard_new (GDK_DEVICE_MANAGER (device_manager), "Mir Keyboard");
device_manager->pointer = _gdk_mir_pointer_new (GDK_DEVICE_MANAGER (device_manager), "Mir Pointer");
_gdk_device_set_associated_device (device_manager->keyboard, device_manager->pointer);
_gdk_device_set_associated_device (device_manager->pointer, device_manager->keyboard);
- gdk_device_manager_get_display (GDK_DEVICE_MANAGER (device_manager))->core_pointer =
device_manager->pointer;
+ display = gdk_device_manager_get_display (GDK_DEVICE_MANAGER (device_manager));
+ display->core_pointer = device_manager->pointer;
+
+ seat = gdk_seat_default_new_for_master_pair (device_manager->pointer, device_manager->keyboard);
+ gdk_display_add_seat (display, seat);
+ g_object_unref (seat);
G_OBJECT_CLASS (gdk_mir_device_manager_parent_class)->constructed (object);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]