]> Pileus Git - ~andy/gtk/commitdiff
On Win32, do not produce tablet motion or button events while a window is
authorRobert Ögren <gtk@roboros.com>
Tue, 31 Aug 2004 19:13:24 +0000 (19:13 +0000)
committerTor Lillqvist <tml@src.gnome.org>
Tue, 31 Aug 2004 19:13:24 +0000 (19:13 +0000)
2004-08-28  Robert Ögren  <gtk@roboros.com>

On Win32, do not produce tablet motion or button events while a
window is being moved or resized. (#151090, reported by Shaneyfelt)

* gdk/win32/gdkprivate-win32.h
* gdk/win32/gdkglobals-win32.c
* gdk/win32/gdkevents-win32.c: Rename the variable resizing to
_sizemove_in_progress and make it extern.

* gdk/win32/gdkinput-win32.c (_gdk_input_other_event): Ignore
motion and button events if _sizemove_in_progress is true.

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gdk/win32/gdkevents-win32.c
gdk/win32/gdkglobals-win32.c
gdk/win32/gdkinput-win32.c
gdk/win32/gdkprivate-win32.h

index 9aa3072fae78ac30fe8e594795280a73defbf416..c0b344335500743ac96277884675d787aea620fc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2004-08-28  Robert Ögren  <gtk@roboros.com>
+
+       On Win32, do not produce tablet motion or button events while a
+       window is being moved or resized. (#151090, reported by Shaneyfelt)
+
+       * gdk/win32/gdkprivate-win32.h
+       * gdk/win32/gdkglobals-win32.c
+       * gdk/win32/gdkevents-win32.c: Rename the variable resizing to
+       _sizemove_in_progress and make it extern.
+
+       * gdk/win32/gdkinput-win32.c (_gdk_input_other_event): Ignore
+       motion and button events if _sizemove_in_progress is true.
+
 2004-08-30  Tor Lillqvist  <tml@iki.fi>
 
        Make the ms-windows theme engine build with mingw.
index 9aa3072fae78ac30fe8e594795280a73defbf416..c0b344335500743ac96277884675d787aea620fc 100644 (file)
@@ -1,3 +1,16 @@
+2004-08-28  Robert Ögren  <gtk@roboros.com>
+
+       On Win32, do not produce tablet motion or button events while a
+       window is being moved or resized. (#151090, reported by Shaneyfelt)
+
+       * gdk/win32/gdkprivate-win32.h
+       * gdk/win32/gdkglobals-win32.c
+       * gdk/win32/gdkevents-win32.c: Rename the variable resizing to
+       _sizemove_in_progress and make it extern.
+
+       * gdk/win32/gdkinput-win32.c (_gdk_input_other_event): Ignore
+       motion and button events if _sizemove_in_progress is true.
+
 2004-08-30  Tor Lillqvist  <tml@iki.fi>
 
        Make the ms-windows theme engine build with mingw.
index 9aa3072fae78ac30fe8e594795280a73defbf416..c0b344335500743ac96277884675d787aea620fc 100644 (file)
@@ -1,3 +1,16 @@
+2004-08-28  Robert Ögren  <gtk@roboros.com>
+
+       On Win32, do not produce tablet motion or button events while a
+       window is being moved or resized. (#151090, reported by Shaneyfelt)
+
+       * gdk/win32/gdkprivate-win32.h
+       * gdk/win32/gdkglobals-win32.c
+       * gdk/win32/gdkevents-win32.c: Rename the variable resizing to
+       _sizemove_in_progress and make it extern.
+
+       * gdk/win32/gdkinput-win32.c (_gdk_input_other_event): Ignore
+       motion and button events if _sizemove_in_progress is true.
+
 2004-08-30  Tor Lillqvist  <tml@iki.fi>
 
        Make the ms-windows theme engine build with mingw.
index 9aa3072fae78ac30fe8e594795280a73defbf416..c0b344335500743ac96277884675d787aea620fc 100644 (file)
@@ -1,3 +1,16 @@
+2004-08-28  Robert Ögren  <gtk@roboros.com>
+
+       On Win32, do not produce tablet motion or button events while a
+       window is being moved or resized. (#151090, reported by Shaneyfelt)
+
+       * gdk/win32/gdkprivate-win32.h
+       * gdk/win32/gdkglobals-win32.c
+       * gdk/win32/gdkevents-win32.c: Rename the variable resizing to
+       _sizemove_in_progress and make it extern.
+
+       * gdk/win32/gdkinput-win32.c (_gdk_input_other_event): Ignore
+       motion and button events if _sizemove_in_progress is true.
+
 2004-08-30  Tor Lillqvist  <tml@iki.fi>
 
        Make the ms-windows theme engine build with mingw.
index 28026202f8c51d13e5ae306bdf276836eaf50799..e1ee432027ae99161e2f3d9700d687e3783d83c7 100644 (file)
@@ -159,7 +159,6 @@ static HKL latin_locale = NULL;
 #endif
 
 static gboolean in_ime_composition = FALSE;
-static gboolean resizing = FALSE;
 static UINT     resize_timer;
 
 static int debug_indent = 0;
@@ -2054,7 +2053,7 @@ resize_timer_proc (HWND     hwnd,
                   UINT     id,
                   DWORD    time)
 {
-  if (resizing)
+  if (_sizemove_in_progress)
     handle_stuff_while_moving_or_resizing ();
 }
 
@@ -2966,12 +2965,12 @@ gdk_event_translate (GdkDisplay *display,
       break;
 
     case WM_ENTERSIZEMOVE:
-      resizing = TRUE;
+      _sizemove_in_progress = TRUE;
       resize_timer = SetTimer (NULL, 0, 20, resize_timer_proc);
       break;
 
     case WM_EXITSIZEMOVE:
-      resizing = FALSE;
+      _sizemove_in_progress = FALSE;
       KillTimer (NULL, resize_timer);
       break;
 
@@ -2979,7 +2978,7 @@ gdk_event_translate (GdkDisplay *display,
       /* Once we've entered the moving or sizing modal loop, we won't
        * return to the main loop until we're done sizing or moving.
        */
-      if (resizing &&
+      if (_sizemove_in_progress &&
         GDK_WINDOW_TYPE (window) != GDK_WINDOW_CHILD &&
         !GDK_WINDOW_DESTROYED (window))
        {
index 523d5791e7b4751ec266404007e936fb8a8ea36e..3c62647cf1827ae5d71d2939057e3e476c58c2d1 100644 (file)
@@ -66,3 +66,5 @@ DWORD           _windows_version;
 
 gint             _gdk_input_ignore_wintab = TRUE;
 gint             _gdk_max_colors = 0;
+
+gboolean         _sizemove_in_progress = FALSE;
index c5534d8df1771863d9a4f58872c1aa5b0bd955a4..33997535e9cd8087133aa55824c31796a3c6ee12 100644 (file)
@@ -695,7 +695,7 @@ _gdk_input_enter_event (GdkWindow        *window)
   input_window->root_y = root_y;
 }
 
-/**
+/*
  * Get the currently active keyboard modifiers (ignoring the mouse buttons)
  * We could use gdk_window_get_pointer but that function does a lot of other
  * expensive things besides getting the modifiers. This code is somewhat based
@@ -781,6 +781,13 @@ _gdk_input_other_event (GdkEvent  *event,
   switch (msg->message)
     {
     case WT_PACKET:
+      /* Don't produce any button or motion events while a window is being
+       * moved or resized, see bug #151090. */
+      if (_sizemove_in_progress)
+       {
+         GDK_NOTE (EVENTS_OR_INPUT, g_print ("...ignored when moving/sizing\n"));
+         return FALSE;
+       }
       if (window == _gdk_parent_root && x_grab_window == NULL)
        {
          GDK_NOTE (EVENTS_OR_INPUT, g_print ("...is root\n"));
index a950c58ec0f0b75dabd870ab86cee93084a4e1db..78ce8e87395215c17f9eef68010a5bfa1e93a2c2 100644 (file)
@@ -497,6 +497,9 @@ extern gint          _gdk_max_colors;
 
 #define GDK_WIN32_COLORMAP_DATA(cmap) ((GdkColormapPrivateWin32 *) GDK_COLORMAP (cmap)->windowing_data)
 
+/* TRUE while a user-initiated window move or resize operation is in progress */
+extern gboolean                 _sizemove_in_progress;
+
 /* Initialization */
 void _gdk_windowing_window_init (void);
 void _gdk_visual_init (void);