mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-23 20:30:15 +00:00
Implement lazy extended input initialization on Win32, by Robert Ögren.
2005-02-02 Tor Lillqvist <tml@novell.com> Implement lazy extended input initialization on Win32, by Robert Ögren. Fixes #163163, possibly #162334. Lazy initialization would be a good idea in any case even if it didn't fix any visible problems, though. The Wacom tablet driver seems to get confused if Wintab is initialized but no window is shown before the process exits. This is the case for some GIMP plug-ins, for instance. * gdk/win32/gdkinput-win32.c (_gdk_input_wintab_init_check): Made non-static (and renamed). (_gdk_input_init): Don't call _gdk_input_wintab_init_check(). * gdk/win32/gdkinput-win32.h: Declare _gdk_input_wintab_init_check(). * gdk/win32/gdkinput.c (gdk_devices_list, gdk_display_list_devices, gdk_input_set_extension_events): Call _gdk_input_wintab_init_check() here instead.
This commit is contained in:
parent
c922869cdf
commit
8c323acbae
21
ChangeLog
21
ChangeLog
@ -1,3 +1,24 @@
|
||||
2005-02-02 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
Implement lazy extended input initialization on Win32, by Robert
|
||||
Ögren. Fixes #163163, possibly #162334. Lazy initialization would
|
||||
be a good idea in any case even if it didn't fix any visible
|
||||
problems, though.
|
||||
|
||||
The Wacom tablet driver seems to get confused if Wintab is
|
||||
initialized but no window is shown before the process exits. This
|
||||
is the case for some GIMP plug-ins, for instance.
|
||||
|
||||
* gdk/win32/gdkinput-win32.c (_gdk_input_wintab_init_check): Made
|
||||
non-static (and renamed).
|
||||
(_gdk_input_init): Don't call _gdk_input_wintab_init_check().
|
||||
|
||||
* gdk/win32/gdkinput-win32.h: Declare _gdk_input_wintab_init_check().
|
||||
|
||||
* gdk/win32/gdkinput.c (gdk_devices_list,
|
||||
gdk_display_list_devices, gdk_input_set_extension_events): Call
|
||||
_gdk_input_wintab_init_check() here instead.
|
||||
|
||||
2005-02-02 Ivan, Wong Yat Cheung <email@ivanwong.info>
|
||||
|
||||
* gdk/win32/gdkselection.c: Use a FIFO list for storing GdkSelProp
|
||||
|
@ -1,3 +1,24 @@
|
||||
2005-02-02 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
Implement lazy extended input initialization on Win32, by Robert
|
||||
Ögren. Fixes #163163, possibly #162334. Lazy initialization would
|
||||
be a good idea in any case even if it didn't fix any visible
|
||||
problems, though.
|
||||
|
||||
The Wacom tablet driver seems to get confused if Wintab is
|
||||
initialized but no window is shown before the process exits. This
|
||||
is the case for some GIMP plug-ins, for instance.
|
||||
|
||||
* gdk/win32/gdkinput-win32.c (_gdk_input_wintab_init_check): Made
|
||||
non-static (and renamed).
|
||||
(_gdk_input_init): Don't call _gdk_input_wintab_init_check().
|
||||
|
||||
* gdk/win32/gdkinput-win32.h: Declare _gdk_input_wintab_init_check().
|
||||
|
||||
* gdk/win32/gdkinput.c (gdk_devices_list,
|
||||
gdk_display_list_devices, gdk_input_set_extension_events): Call
|
||||
_gdk_input_wintab_init_check() here instead.
|
||||
|
||||
2005-02-02 Ivan, Wong Yat Cheung <email@ivanwong.info>
|
||||
|
||||
* gdk/win32/gdkselection.c: Use a FIFO list for storing GdkSelProp
|
||||
|
@ -1,3 +1,24 @@
|
||||
2005-02-02 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
Implement lazy extended input initialization on Win32, by Robert
|
||||
Ögren. Fixes #163163, possibly #162334. Lazy initialization would
|
||||
be a good idea in any case even if it didn't fix any visible
|
||||
problems, though.
|
||||
|
||||
The Wacom tablet driver seems to get confused if Wintab is
|
||||
initialized but no window is shown before the process exits. This
|
||||
is the case for some GIMP plug-ins, for instance.
|
||||
|
||||
* gdk/win32/gdkinput-win32.c (_gdk_input_wintab_init_check): Made
|
||||
non-static (and renamed).
|
||||
(_gdk_input_init): Don't call _gdk_input_wintab_init_check().
|
||||
|
||||
* gdk/win32/gdkinput-win32.h: Declare _gdk_input_wintab_init_check().
|
||||
|
||||
* gdk/win32/gdkinput.c (gdk_devices_list,
|
||||
gdk_display_list_devices, gdk_input_set_extension_events): Call
|
||||
_gdk_input_wintab_init_check() here instead.
|
||||
|
||||
2005-02-02 Ivan, Wong Yat Cheung <email@ivanwong.info>
|
||||
|
||||
* gdk/win32/gdkselection.c: Use a FIFO list for storing GdkSelProp
|
||||
|
@ -71,9 +71,9 @@ static GdkInputWindow *gdk_input_window_find_within (GdkWindow *window);
|
||||
|
||||
static GdkDevicePrivate *gdk_input_find_dev_from_ctx (HCTX hctx,
|
||||
UINT id);
|
||||
static GList *wintab_contexts;
|
||||
static GList *wintab_contexts = NULL;
|
||||
|
||||
static GdkWindow *wintab_window;
|
||||
static GdkWindow *wintab_window = NULL;
|
||||
|
||||
#endif /* HAVE_WINTAB */
|
||||
|
||||
@ -204,9 +204,10 @@ print_lc(LOGCONTEXT *lc)
|
||||
|
||||
#endif
|
||||
|
||||
static void
|
||||
gdk_input_wintab_init (void)
|
||||
void
|
||||
_gdk_input_wintab_init_check (void)
|
||||
{
|
||||
static gboolean wintab_initialized = FALSE;
|
||||
GdkDevicePrivate *gdkdev;
|
||||
GdkWindowAttr wa;
|
||||
WORD specversion;
|
||||
@ -219,7 +220,11 @@ gdk_input_wintab_init (void)
|
||||
int devix, cursorix;
|
||||
char devname[100], csrname[100];
|
||||
|
||||
_gdk_input_devices = NULL;
|
||||
if (wintab_initialized)
|
||||
return;
|
||||
|
||||
wintab_initialized = TRUE;
|
||||
|
||||
wintab_contexts = NULL;
|
||||
|
||||
if (!_gdk_input_ignore_wintab &&
|
||||
@ -1276,7 +1281,13 @@ _gdk_input_init (GdkDisplay *display)
|
||||
|
||||
_gdk_init_input_core (display);
|
||||
#ifdef HAVE_WINTAB
|
||||
gdk_input_wintab_init ();
|
||||
#ifdef WINTAB_NO_LAZY_INIT
|
||||
/* Normally, Wintab is only initialized when the application performs
|
||||
* an action that requires it, such as enabling extended input events
|
||||
* for a window or enumerating the devices.
|
||||
*/
|
||||
_gdk_input_wintab_init_check ();
|
||||
#endif /* WINTAB_NO_LAZY_INIT */
|
||||
#endif /* HAVE_WINTAB */
|
||||
|
||||
_gdk_input_devices = g_list_append (_gdk_input_devices, display->core_pointer);
|
||||
|
@ -166,4 +166,8 @@ gboolean _gdk_device_get_history (GdkDevice *device,
|
||||
GdkTimeCoord ***events,
|
||||
gint *n_events);
|
||||
|
||||
#ifdef HAVE_WINTAB
|
||||
void _gdk_input_wintab_init_check (void);
|
||||
#endif /* HAVE_WINTAB */
|
||||
|
||||
#endif /* __GDK_INPUT_WIN32_H__ */
|
||||
|
@ -119,12 +119,18 @@ gdk_device_get_type (void)
|
||||
GList *
|
||||
gdk_devices_list (void)
|
||||
{
|
||||
#ifdef HAVE_WINTAB
|
||||
_gdk_input_wintab_init_check ();
|
||||
#endif /* HAVE_WINTAB */
|
||||
return _gdk_input_devices;
|
||||
}
|
||||
|
||||
GList *
|
||||
gdk_display_list_devices (GdkDisplay *dpy)
|
||||
{
|
||||
#ifdef HAVE_WINTAB
|
||||
_gdk_input_wintab_init_check ();
|
||||
#endif /* HAVE_WINTAB */
|
||||
return _gdk_input_devices;
|
||||
}
|
||||
|
||||
@ -270,6 +276,9 @@ gdk_input_set_extension_events (GdkWindow *window, gint mask,
|
||||
|
||||
if (mask != 0)
|
||||
{
|
||||
#ifdef HAVE_WINTAB
|
||||
_gdk_input_wintab_init_check ();
|
||||
#endif /* HAVE_WINTAB */
|
||||
iw = g_new(GdkInputWindow,1);
|
||||
|
||||
iw->window = window;
|
||||
|
Loading…
Reference in New Issue
Block a user