[gtk+] win32: Stop deriving from GdkDeviceManager
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] win32: Stop deriving from GdkDeviceManager
- Date: Sat, 25 Nov 2017 16:25:20 +0000 (UTC)
commit 01278e591cb9325ffee342fa2bd38ecb3b6c4666
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Nov 25 08:21:37 2017 -0500
win32: Stop deriving from GdkDeviceManager
We can just derive from GObject.
gdk/win32/gdkdevicemanager-win32.c | 10 +++++-----
gdk/win32/gdkdevicemanager-win32.h | 5 +++--
2 files changed, 8 insertions(+), 7 deletions(-)
---
diff --git a/gdk/win32/gdkdevicemanager-win32.c b/gdk/win32/gdkdevicemanager-win32.c
index 1616d9a..b716eb1 100644
--- a/gdk/win32/gdkdevicemanager-win32.c
+++ b/gdk/win32/gdkdevicemanager-win32.c
@@ -68,7 +68,7 @@ static t_WTQueueSizeSet p_WTQueueSizeSet;
static gboolean default_display_opened = FALSE;
-G_DEFINE_TYPE (GdkDeviceManagerWin32, gdk_device_manager_win32, GDK_TYPE_DEVICE_MANAGER)
+G_DEFINE_TYPE (GdkDeviceManagerWin32, gdk_device_manager_win32, G_TYPE_OBJECT)
static GdkDevice *
create_pointer (GdkDeviceManager *device_manager,
@@ -82,7 +82,7 @@ create_pointer (GdkDeviceManager *device_manager,
"input-source", GDK_SOURCE_MOUSE,
"input-mode", GDK_MODE_SCREEN,
"has-cursor", type == GDK_DEVICE_TYPE_MASTER,
- "display", gdk_device_manager_get_display (device_manager),
+ "display", _gdk_display,
"device-manager", device_manager,
NULL);
}
@@ -99,7 +99,7 @@ create_keyboard (GdkDeviceManager *device_manager,
"input-source", GDK_SOURCE_KEYBOARD,
"input-mode", GDK_MODE_SCREEN,
"has-cursor", FALSE,
- "display", gdk_device_manager_get_display (device_manager),
+ "display", _gdk_display,
"device-manager", device_manager,
NULL);
}
@@ -735,7 +735,7 @@ gdk_device_manager_win32_constructed (GObject *object)
seat = gdk_seat_default_new_for_master_pair (device_manager->core_pointer,
device_manager->core_keyboard);
- gdk_display_add_seat (gdk_device_manager_get_display (GDK_DEVICE_MANAGER (object)), seat);
+ gdk_display_add_seat (_gdk_display, seat);
gdk_seat_default_add_slave (GDK_SEAT_DEFAULT (seat), device_manager->system_pointer);
gdk_seat_default_add_slave (GDK_SEAT_DEFAULT (seat), device_manager->system_keyboard);
g_object_unref (seat);
@@ -744,7 +744,7 @@ gdk_device_manager_win32_constructed (GObject *object)
* is globally known and accessible through the display manager
* singleton. Approach lifted from gtkmodules.c.
*/
- display_manager = gdk_display_manager_get();
+ display_manager = gdk_display_manager_get ();
g_assert (display_manager != NULL);
default_display = gdk_display_manager_get_default_display (display_manager);
g_assert (default_display == NULL);
diff --git a/gdk/win32/gdkdevicemanager-win32.h b/gdk/win32/gdkdevicemanager-win32.h
index 08bc4f5..eb6caa1 100644
--- a/gdk/win32/gdkdevicemanager-win32.h
+++ b/gdk/win32/gdkdevicemanager-win32.h
@@ -34,7 +34,8 @@ typedef struct _GdkDeviceManagerWin32Class GdkDeviceManagerWin32Class;
struct _GdkDeviceManagerWin32
{
- GdkDeviceManager parent_object;
+ GObject parent_object;
+ GdkDisplay *display;
/* Master Devices */
GdkDevice *core_pointer;
GdkDevice *core_keyboard;
@@ -46,7 +47,7 @@ struct _GdkDeviceManagerWin32
struct _GdkDeviceManagerWin32Class
{
- GdkDeviceManagerClass parent_class;
+ GObjectClass parent_class;
};
GType gdk_device_manager_win32_get_type (void) G_GNUC_CONST;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]