winemac: Send WM_ENTER/EXITSIZEMOVE messages at start/end of a resizing operation.

This commit is contained in:
Ken Thomases 2013-09-18 13:01:03 -05:00 committed by Alexandre Julliard
parent d55d2ec85a
commit 4ad9d5f04a
5 changed files with 29 additions and 0 deletions

View File

@ -1476,6 +1476,13 @@ - (void)windowDidDeminiaturize:(NSNotification *)notification
- (void) windowDidEndLiveResize:(NSNotification *)notification
{
macdrv_query* query = macdrv_create_query();
query->type = QUERY_RESIZE_END;
query->window = (macdrv_window)[self retain];
[self.queue query:query timeout:0.3];
macdrv_release_query(query);
self.liveResizeDisplayTimer = nil;
}

View File

@ -146,6 +146,10 @@ static void macdrv_query_event(HWND hwnd, const macdrv_event *event)
TRACE("QUERY_PASTEBOARD_DATA\n");
success = query_pasteboard_data(hwnd, query->pasteboard_data.type);
break;
case QUERY_RESIZE_END:
TRACE("QUERY_RESIZE_END\n");
success = query_resize_end(hwnd);
break;
case QUERY_RESIZE_START:
TRACE("QUERY_RESIZE_START\n");
success = query_resize_start(hwnd);

View File

@ -161,6 +161,7 @@ static inline RECT rect_from_cgrect(CGRect cgrect)
extern void macdrv_app_quit_requested(const macdrv_event *event) DECLSPEC_HIDDEN;
extern void macdrv_window_did_minimize(HWND hwnd) DECLSPEC_HIDDEN;
extern void macdrv_window_did_unminimize(HWND hwnd) DECLSPEC_HIDDEN;
extern BOOL query_resize_end(HWND hwnd) DECLSPEC_HIDDEN;
extern BOOL query_resize_start(HWND hwnd) DECLSPEC_HIDDEN;
extern void macdrv_mouse_button(HWND hwnd, const macdrv_event *event) DECLSPEC_HIDDEN;

View File

@ -272,6 +272,7 @@ extern int macdrv_set_display_mode(const struct macdrv_display* display,
QUERY_DRAG_OPERATION,
QUERY_IME_CHAR_RECT,
QUERY_PASTEBOARD_DATA,
QUERY_RESIZE_END,
QUERY_RESIZE_START,
NUM_QUERY_TYPES
};

View File

@ -1991,6 +1991,22 @@ fail:
BOOL query_resize_start(HWND hwnd)
{
TRACE("hwnd %p\n", hwnd);
sync_window_min_max_info(hwnd);
SendMessageW(hwnd, WM_ENTERSIZEMOVE, 0, 0);
return TRUE;
}
/***********************************************************************
* query_resize_end
*
* Handler for QUERY_RESIZE_END query.
*/
BOOL query_resize_end(HWND hwnd)
{
TRACE("hwnd %p\n", hwnd);
SendMessageW(hwnd, WM_EXITSIZEMOVE, 0, 0);
return TRUE;
}