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
This commit is contained in:
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user