Wm_entersizemove / wm_exitsizemove
I'm trying to fix a bug that I've found in the Windows version of libgdk. Consider this code fragment from a switch statement:-
The way the code is currently written, every call to _gdk_win32_begin_modal_call() is expected to be matched by a subsequent call to _gdk_win32_end_modal_call(). WM_ENTERSIZEMOVE seems to get sent whenever a user right-clicks on a top level window's title bar (e.g. to select "Move" from the popup menu that gets displayed).
If I do actually move the window, when I release my mouse button (to finish the move) WM_EXITSIZEMOVE gets sent which neatly calls _gdk_win32_end_modal_call()
BUT.... if I right-click a title bar, then (without moving the window) I simply cancel the move by left-clicking my mouse on the desktop, WM_EXITSIZEMOVE doesn't seem to get get sent. The way the code is written, this causes a crash if I subsequently right-click the title bar again.
Is there some other message I can trap to detect when the user cancels a move before it even begins?
Re: Wm_entersizemove / wm_exitsizemove
Seems strange that there's a message to indicate when a resize operation begins and another one to indicate when it ended - but no message to indicate that it was abandoned. Anyway, I managed to get around it by intercepting WM_CAPTURECHANGED