GDK W32: More flexible modal operation mode
Instead of using a boolean to indicate a modal operation being in progress, use a set of flags, and allow these to be set and unset independently. Specifically, this allows WM_CAPTURECHANGED handler to only act when a drag-move or drag-resize modal operation is in progress, and ignore DND (which can also cause WM_CAPTURECHANGED to be posted). This avoids a crash due to assertion failure when OLE2 DND code tries to end a modal operation that was already ended by the WM_CAPTURECHANGED handler. https://bugzilla.gnome.org/show_bug.cgi?id=786121
This commit is contained in:
@ -1041,7 +1041,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS;
|
||||
/* Don't produce any button or motion events while a window is being
|
||||
* moved or resized, see bug #151090.
|
||||
*/
|
||||
if (_modal_operation_in_progress)
|
||||
if (_modal_operation_in_progress & GDK_WIN32_MODAL_OP_SIZEMOVE_MASK)
|
||||
{
|
||||
GDK_NOTE (EVENTS_OR_INPUT, g_print ("... ignored when moving/sizing\n"));
|
||||
return FALSE;
|
||||
|
||||
Reference in New Issue
Block a user