diff --git a/ChangeLog b/ChangeLog index d8090ef164..a69843946e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2005-02-24 Robert Ögren + + 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 * gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_select_path): diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index d8090ef164..a69843946e 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,16 @@ +2005-02-24 Robert Ögren + + 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 * gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_select_path): diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index d8090ef164..a69843946e 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,16 @@ +2005-02-24 Robert Ögren + + 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 * gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_select_path): diff --git a/gdk/win32/gdkevents-win32.c b/gdk/win32/gdkevents-win32.c index fff80a57c0..eb3ea71c71 100644 --- a/gdk/win32/gdkevents-win32.c +++ b/gdk/win32/gdkevents-win32.c @@ -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. diff --git a/gdk/win32/gdkinput-win32.c b/gdk/win32/gdkinput-win32.c index 366979f2d4..c86c23a3f8 100644 --- a/gdk/win32/gdkinput-win32.c +++ b/gdk/win32/gdkinput-win32.c @@ -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) { diff --git a/gdk/win32/gdkinput-win32.h b/gdk/win32/gdkinput-win32.h index 12da3e87be..4da256f1ab 100644 --- a/gdk/win32/gdkinput-win32.h +++ b/gdk/win32/gdkinput-win32.h @@ -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__ */