Commit 81c1b1da authored by Robert Ögren's avatar Robert Ögren Committed by Tor Lillqvist
Browse files

Implement better handling of Wintab tablet context overlap on Win32.

2005-02-24  Robert Ögren  <gtk@roboros.com>

	Implement better handling of Wintab tablet context overlap on
	Win32. (#167298)

	* gdk/win32/gdkinput-win32.c (_gdk_input_set_tablet_active): New
	function that brings any tablet contexts to the top of the overlap
	order.
	* gdk/win32/gdkinput-win32.h: Declare _gdk_input_set_tablet_active ()
	* gdk/win32/gdkevents-win32.c (gdk_event_translate):
	Call _gdk_input_set_tablet_active when a window is activated (on
	WM_ACTIVATE)
parent 59d65818
2005-02-24 Robert Ögren <gtk@roboros.com>
Implement better handling of Wintab tablet context overlap on
Win32. (#167298)
* gdk/win32/gdkinput-win32.c (_gdk_input_set_tablet_active): New
function that brings any tablet contexts to the top of the overlap
order.
* gdk/win32/gdkinput-win32.h: Declare _gdk_input_set_tablet_active ()
* gdk/win32/gdkevents-win32.c (gdk_event_translate):
Call _gdk_input_set_tablet_active when a window is activated (on
WM_ACTIVATE)
2005-02-24 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_select_path):
......
2005-02-24 Robert Ögren <gtk@roboros.com>
Implement better handling of Wintab tablet context overlap on
Win32. (#167298)
* gdk/win32/gdkinput-win32.c (_gdk_input_set_tablet_active): New
function that brings any tablet contexts to the top of the overlap
order.
* gdk/win32/gdkinput-win32.h: Declare _gdk_input_set_tablet_active ()
* gdk/win32/gdkevents-win32.c (gdk_event_translate):
Call _gdk_input_set_tablet_active when a window is activated (on
WM_ACTIVATE)
2005-02-24 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_select_path):
......
2005-02-24 Robert Ögren <gtk@roboros.com>
Implement better handling of Wintab tablet context overlap on
Win32. (#167298)
* gdk/win32/gdkinput-win32.c (_gdk_input_set_tablet_active): New
function that brings any tablet contexts to the top of the overlap
order.
* gdk/win32/gdkinput-win32.h: Declare _gdk_input_set_tablet_active ()
* gdk/win32/gdkevents-win32.c (gdk_event_translate):
Call _gdk_input_set_tablet_active when a window is activated (on
WM_ACTIVATE)
2005-02-24 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_select_path):
......
......@@ -3367,6 +3367,16 @@ gdk_event_translate (GdkDisplay *display,
break;
#ifdef HAVE_WINTAB
case WM_ACTIVATE:
/* Bring any tablet contexts to the top of the overlap order when
* one of our windows is activated.
* NOTE: It doesn't seem to work well if it is done in WM_ACTIVATEAPP
* instead
*/
if (LOWORD(msg->wParam) != WA_INACTIVE)
_gdk_input_set_tablet_active ();
break;
/* Handle WINTAB events here, as we know that gdkinput.c will
* use the fixed WT_DEFBASE as lcMsgBase, and we thus can use the
* constants as case labels.
......
......@@ -1273,6 +1273,32 @@ gdk_device_get_state (GdkDevice *device,
}
}
#ifdef HAVE_WINTAB
void
_gdk_input_set_tablet_active (void)
{
GList *tmp_list;
HCTX *hctx;
/* Bring the contexts to the top of the overlap order when one of the
* application's windows is activated */
if (!wintab_contexts)
return; /* No tablet devices found, or Wintab not initialized yet */
GDK_NOTE (INPUT, g_print ("_gdk_input_set_tablet_active: "
"Bringing Wintab contexts to the top of the overlap order\n"));
tmp_list = wintab_contexts;
while (tmp_list)
{
hctx = (HCTX *) (tmp_list->data);
WTOverlap (*hctx, TRUE);
tmp_list = tmp_list->next;
}
}
#endif /* HAVE_WINTAB */
void
_gdk_input_init (GdkDisplay *display)
{
......
......@@ -168,6 +168,7 @@ gboolean _gdk_device_get_history (GdkDevice *device,
#ifdef HAVE_WINTAB
void _gdk_input_wintab_init_check (void);
void _gdk_input_set_tablet_active (void);
#endif /* HAVE_WINTAB */
#endif /* __GDK_INPUT_WIN32_H__ */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment