[gtk+/gtk-3-14] win32: Ensure we can create a window for wintab
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-14] win32: Ensure we can create a window for wintab
- Date: Wed, 28 Jan 2015 17:05:08 +0000 (UTC)
commit 59c02b7f1c3d11ca9e65d549a2922847c111ccf1
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Jan 26 14:26:34 2015 +0000
win32: Ensure we can create a window for wintab
The window used NULL as a parent window, which defaults internally to
using the root window of the default screen. But at the time wintab is
initialized, there is no default display/screen yet.
Fix this by retrieving this information from the given GdkDeviceManager,
so we don't have to wait for the display to be in place before
initialization.
https://bugzilla.gnome.org/show_bug.cgi?id=743330
gdk/win32/gdkdevicemanager-win32.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gdk/win32/gdkdevicemanager-win32.c b/gdk/win32/gdkdevicemanager-win32.c
index 41433a8..a645c10 100644
--- a/gdk/win32/gdkdevicemanager-win32.c
+++ b/gdk/win32/gdkdevicemanager-win32.c
@@ -371,6 +371,8 @@ void
_gdk_input_wintab_init_check (GdkDeviceManager *_device_manager)
{
GdkDeviceManagerWin32 *device_manager = (GdkDeviceManagerWin32 *)_device_manager;
+ GdkDisplay *display = gdk_device_manager_get_display (_device_manager);
+ GdkWindow *root = gdk_screen_get_root_window (gdk_display_get_default_screen (display));
static gboolean wintab_initialized = FALSE;
GdkDeviceWintab *device;
GdkWindowAttr wa;
@@ -459,7 +461,7 @@ _gdk_input_wintab_init_check (GdkDeviceManager *_device_manager)
wa.x = -100;
wa.y = -100;
wa.window_type = GDK_WINDOW_TOPLEVEL;
- if ((wintab_window = gdk_window_new (NULL, &wa, GDK_WA_X|GDK_WA_Y)) == NULL)
+ if ((wintab_window = gdk_window_new (root, &wa, GDK_WA_X | GDK_WA_Y)) == NULL)
{
g_warning ("gdk_input_wintab_init: gdk_window_new failed");
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]