On Win32, do not produce tablet motion or button events while a window is

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.
This commit is contained in:
Robert Ögren 2004-08-31 19:13:24 +00:00 committed by Tor Lillqvist
parent 542a2d42c7
commit c0ba86bc81
8 changed files with 69 additions and 6 deletions

View 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.

View 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.

View 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.

View 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.

View 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))
{

View File

@ -66,3 +66,5 @@ DWORD _windows_version;
gint _gdk_input_ignore_wintab = TRUE;
gint _gdk_max_colors = 0;
gboolean _sizemove_in_progress = FALSE;

View 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"));

View 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);