Commit de3fb34a authored by Ken Thomases's avatar Ken Thomases Committed by Alexandre Julliard

winemac: Send WM_{ENTER, EXIT}SIZEMOVE around window frame changes initiated by Cocoa.

The Mac driver was already sending these events when the user resizes the window by dragging its corner/edges, but there are other occasions when the window frame changes. For example, when the user zooms the window.
parent b11d6850
......@@ -1718,6 +1718,7 @@ static inline NSUInteger adjusted_modifiers_for_option_behavior(NSUInteger modif
event = macdrv_create_event(WINDOW_FRAME_CHANGED, self);
event->window_frame_changed.frame = NSRectToCGRect(frame);
event->window_frame_changed.fullscreen = ([self styleMask] & NSFullScreenWindowMask) != 0;
event->window_frame_changed.in_resize = [self inLiveResize];
[queue postEvent:event];
macdrv_release_event(event);
......
......@@ -275,6 +275,7 @@ typedef struct macdrv_event {
struct {
CGRect frame;
int fullscreen;
int in_resize;
} window_frame_changed;
struct {
unsigned long serial;
......
......@@ -1718,7 +1718,13 @@ void macdrv_window_frame_changed(HWND hwnd, const macdrv_event *event)
if (event->window_frame_changed.fullscreen)
flags |= SWP_NOSENDCHANGING;
if (!(flags & SWP_NOSIZE) || !(flags & SWP_NOMOVE))
{
if (!event->window_frame_changed.in_resize)
SendMessageW(hwnd, WM_ENTERSIZEMOVE, 0, 0);
SetWindowPos(hwnd, 0, rect.left, rect.top, width, height, flags);
if (!event->window_frame_changed.in_resize)
SendMessageW(hwnd, WM_EXITSIZEMOVE, 0, 0);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment