forked from AuroraMiddleware/gtk
win32: Stop using gdk_display_get_device_manager
We can keep the devicemanager in the backend.
This commit is contained in:
parent
aae4fafad2
commit
ab0aea900c
@ -683,9 +683,7 @@ wintab_default_display_notify_cb (GdkDisplayManager *display_manager)
|
|||||||
|
|
||||||
g_assert (display != NULL);
|
g_assert (display != NULL);
|
||||||
|
|
||||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
|
device_manager = GDK_DEVICE_MANAGER_WIN32 (_gdk_device_manager);
|
||||||
device_manager = GDK_DEVICE_MANAGER_WIN32 (gdk_display_get_device_manager (display));
|
|
||||||
G_GNUC_END_IGNORE_DEPRECATIONS;
|
|
||||||
g_assert (display_manager != NULL);
|
g_assert (display_manager != NULL);
|
||||||
|
|
||||||
default_display_opened = TRUE;
|
default_display_opened = TRUE;
|
||||||
@ -955,9 +953,7 @@ gdk_input_other_event (GdkDisplay *display,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
|
device_manager = GDK_DEVICE_MANAGER_WIN32 (_gdk_device_manager);
|
||||||
device_manager = GDK_DEVICE_MANAGER_WIN32 (gdk_display_get_device_manager (display));
|
|
||||||
G_GNUC_END_IGNORE_DEPRECATIONS;
|
|
||||||
window = gdk_device_get_window_at_position (device_manager->core_pointer, &x, &y);
|
window = gdk_device_get_window_at_position (device_manager->core_pointer, &x, &y);
|
||||||
|
|
||||||
if (window)
|
if (window)
|
||||||
|
@ -446,9 +446,9 @@ _gdk_win32_display_open (const gchar *display_name)
|
|||||||
|
|
||||||
_gdk_input_ignore_core = FALSE;
|
_gdk_input_ignore_core = FALSE;
|
||||||
|
|
||||||
_gdk_display->device_manager = g_object_new (GDK_TYPE_DEVICE_MANAGER_WIN32,
|
_gdk_device_manager = g_object_new (GDK_TYPE_DEVICE_MANAGER_WIN32,
|
||||||
"display", _gdk_display,
|
"display", _gdk_display,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
_gdk_dnd_init ();
|
_gdk_dnd_init ();
|
||||||
|
|
||||||
|
@ -465,7 +465,7 @@ find_window_for_mouse_event (GdkWindow* reported_window,
|
|||||||
GdkDeviceGrabInfo *grab;
|
GdkDeviceGrabInfo *grab;
|
||||||
|
|
||||||
display = gdk_display_get_default ();
|
display = gdk_display_get_default ();
|
||||||
device_manager = GDK_DEVICE_MANAGER_WIN32 (gdk_display_get_device_manager (display));
|
device_manager = GDK_DEVICE_MANAGER_WIN32 (_gdk_device_manager);
|
||||||
|
|
||||||
grab = _gdk_display_get_last_device_grab (display, device_manager->core_pointer);
|
grab = _gdk_display_get_last_device_grab (display, device_manager->core_pointer);
|
||||||
if (grab == NULL)
|
if (grab == NULL)
|
||||||
@ -1107,7 +1107,7 @@ send_crossing_event (GdkDisplay *display,
|
|||||||
POINT pt;
|
POINT pt;
|
||||||
GdkWindowImplWin32 *impl = GDK_WINDOW_IMPL_WIN32 (window->impl);
|
GdkWindowImplWin32 *impl = GDK_WINDOW_IMPL_WIN32 (window->impl);
|
||||||
|
|
||||||
device_manager = GDK_DEVICE_MANAGER_WIN32 (gdk_display_get_device_manager (display));
|
device_manager = GDK_DEVICE_MANAGER_WIN32 (_gdk_device_manager);_gdk_device_manager);
|
||||||
|
|
||||||
grab = _gdk_display_has_device_grab (display, device_manager->core_pointer, 0);
|
grab = _gdk_display_has_device_grab (display, device_manager->core_pointer, 0);
|
||||||
|
|
||||||
@ -1751,7 +1751,7 @@ generate_button_event (GdkEventType type,
|
|||||||
if (_gdk_input_ignore_core)
|
if (_gdk_input_ignore_core)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
device_manager = GDK_DEVICE_MANAGER_WIN32 (gdk_display_get_device_manager (gdk_display_get_default ()));
|
device_manager = GDK_DEVICE_MANAGER_WIN32 (_gdk_device_manager);
|
||||||
|
|
||||||
event->button.window = window;
|
event->button.window = window;
|
||||||
event->button.time = _gdk_win32_get_next_tick (msg->time);
|
event->button.time = _gdk_win32_get_next_tick (msg->time);
|
||||||
@ -2138,7 +2138,6 @@ gdk_event_translate (MSG *msg,
|
|||||||
|
|
||||||
GdkWindow *new_window;
|
GdkWindow *new_window;
|
||||||
|
|
||||||
GdkDeviceManager *device_manager;
|
|
||||||
GdkDeviceManagerWin32 *device_manager_win32;
|
GdkDeviceManagerWin32 *device_manager_win32;
|
||||||
|
|
||||||
GdkDeviceGrabInfo *keyboard_grab = NULL;
|
GdkDeviceGrabInfo *keyboard_grab = NULL;
|
||||||
@ -2190,8 +2189,7 @@ gdk_event_translate (MSG *msg,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
device_manager = gdk_display_get_device_manager (display);
|
device_manager_win32 = GDK_DEVICE_MANAGER_WIN32 (_gdk_device_manager);
|
||||||
device_manager_win32 = GDK_DEVICE_MANAGER_WIN32 (device_manager);
|
|
||||||
|
|
||||||
keyboard_grab = _gdk_display_get_last_device_grab (display,
|
keyboard_grab = _gdk_display_get_last_device_grab (display,
|
||||||
device_manager_win32->core_keyboard);
|
device_manager_win32->core_keyboard);
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
#include "gdkprivate-win32.h"
|
#include "gdkprivate-win32.h"
|
||||||
|
|
||||||
GdkDisplay *_gdk_display = NULL;
|
GdkDisplay *_gdk_display = NULL;
|
||||||
|
GdkDeviceManager *_gdk_device_manager = NULL;
|
||||||
|
|
||||||
gint _gdk_offset_x, _gdk_offset_y;
|
gint _gdk_offset_x, _gdk_offset_y;
|
||||||
|
|
||||||
|
@ -259,6 +259,8 @@ extern LRESULT CALLBACK _gdk_win32_window_procedure (HWND, UINT, WPARAM, LPARAM)
|
|||||||
|
|
||||||
extern GdkDisplay *_gdk_display;
|
extern GdkDisplay *_gdk_display;
|
||||||
|
|
||||||
|
extern GdkDeviceManager *_gdk_device_manager;
|
||||||
|
|
||||||
/* Offsets to add to Windows coordinates (which are relative to the
|
/* Offsets to add to Windows coordinates (which are relative to the
|
||||||
* primary monitor's origin, and thus might be negative for monitors
|
* primary monitor's origin, and thus might be negative for monitors
|
||||||
* to the left and/or above the primary monitor) to get GDK
|
* to the left and/or above the primary monitor) to get GDK
|
||||||
|
Loading…
Reference in New Issue
Block a user