Commit 83f6470c authored by Ken Thomases's avatar Ken Thomases Committed by Alexandre Julliard

winemac: Convert the QUERY_RESIZE_END query to an event, WINDOW_RESIZE_ENDED.

Queries can be run out of order because the main thread is waiting on the response. The main thread didn't really need a response from QUERY_RESIZE_END. It was only a query for symmetry with QUERY_RESIZE_START.
parent de3fb34a
...@@ -1639,12 +1639,9 @@ static inline NSUInteger adjusted_modifiers_for_option_behavior(NSUInteger modif ...@@ -1639,12 +1639,9 @@ static inline NSUInteger adjusted_modifiers_for_option_behavior(NSUInteger modif
- (void) windowDidEndLiveResize:(NSNotification *)notification - (void) windowDidEndLiveResize:(NSNotification *)notification
{ {
macdrv_query* query = macdrv_create_query(); macdrv_event* event = macdrv_create_event(WINDOW_RESIZE_ENDED, self);
query->type = QUERY_RESIZE_END; [queue postEvent:event];
query->window = (macdrv_window)[self retain]; macdrv_release_event(event);
[self.queue query:query timeout:0.3];
macdrv_release_query(query);
self.liveResizeDisplayTimer = nil; self.liveResizeDisplayTimer = nil;
} }
......
...@@ -55,6 +55,7 @@ static const char *dbgstr_event(int type) ...@@ -55,6 +55,7 @@ static const char *dbgstr_event(int type)
"WINDOW_GOT_FOCUS", "WINDOW_GOT_FOCUS",
"WINDOW_LOST_FOCUS", "WINDOW_LOST_FOCUS",
"WINDOW_MINIMIZE_REQUESTED", "WINDOW_MINIMIZE_REQUESTED",
"WINDOW_RESIZE_ENDED",
}; };
if (0 <= type && type < NUM_EVENT_TYPES) return event_names[type]; if (0 <= type && type < NUM_EVENT_TYPES) return event_names[type];
...@@ -114,6 +115,7 @@ static macdrv_event_mask get_event_mask(DWORD mask) ...@@ -114,6 +115,7 @@ static macdrv_event_mask get_event_mask(DWORD mask)
event_mask |= event_mask_for_type(RELEASE_CAPTURE); event_mask |= event_mask_for_type(RELEASE_CAPTURE);
event_mask |= event_mask_for_type(WINDOW_BROUGHT_FORWARD); event_mask |= event_mask_for_type(WINDOW_BROUGHT_FORWARD);
event_mask |= event_mask_for_type(WINDOW_MINIMIZE_REQUESTED); event_mask |= event_mask_for_type(WINDOW_MINIMIZE_REQUESTED);
event_mask |= event_mask_for_type(WINDOW_RESIZE_ENDED);
} }
return event_mask; return event_mask;
...@@ -152,10 +154,6 @@ static void macdrv_query_event(HWND hwnd, const macdrv_event *event) ...@@ -152,10 +154,6 @@ static void macdrv_query_event(HWND hwnd, const macdrv_event *event)
TRACE("QUERY_PASTEBOARD_DATA\n"); TRACE("QUERY_PASTEBOARD_DATA\n");
success = query_pasteboard_data(hwnd, query->pasteboard_data.type); success = query_pasteboard_data(hwnd, query->pasteboard_data.type);
break; break;
case QUERY_RESIZE_END:
TRACE("QUERY_RESIZE_END\n");
success = query_resize_end(hwnd);
break;
case QUERY_RESIZE_START: case QUERY_RESIZE_START:
TRACE("QUERY_RESIZE_START\n"); TRACE("QUERY_RESIZE_START\n");
success = query_resize_start(hwnd); success = query_resize_start(hwnd);
...@@ -257,6 +255,9 @@ void macdrv_handle_event(const macdrv_event *event) ...@@ -257,6 +255,9 @@ void macdrv_handle_event(const macdrv_event *event)
case WINDOW_MINIMIZE_REQUESTED: case WINDOW_MINIMIZE_REQUESTED:
macdrv_window_minimize_requested(hwnd); macdrv_window_minimize_requested(hwnd);
break; break;
case WINDOW_RESIZE_ENDED:
macdrv_window_resize_ended(hwnd);
break;
default: default:
TRACE(" ignoring\n"); TRACE(" ignoring\n");
break; break;
......
...@@ -165,7 +165,7 @@ extern void macdrv_app_quit_requested(const macdrv_event *event) DECLSPEC_HIDDEN ...@@ -165,7 +165,7 @@ extern void macdrv_app_quit_requested(const macdrv_event *event) DECLSPEC_HIDDEN
extern void macdrv_window_minimize_requested(HWND hwnd) DECLSPEC_HIDDEN; extern void macdrv_window_minimize_requested(HWND hwnd) DECLSPEC_HIDDEN;
extern void macdrv_window_did_unminimize(HWND hwnd) DECLSPEC_HIDDEN; extern void macdrv_window_did_unminimize(HWND hwnd) DECLSPEC_HIDDEN;
extern void macdrv_window_brought_forward(HWND hwnd) DECLSPEC_HIDDEN; extern void macdrv_window_brought_forward(HWND hwnd) DECLSPEC_HIDDEN;
extern BOOL query_resize_end(HWND hwnd) DECLSPEC_HIDDEN; extern void macdrv_window_resize_ended(HWND hwnd) DECLSPEC_HIDDEN;
extern BOOL query_resize_start(HWND hwnd) DECLSPEC_HIDDEN; extern BOOL query_resize_start(HWND hwnd) DECLSPEC_HIDDEN;
extern BOOL query_min_max_info(HWND hwnd) DECLSPEC_HIDDEN; extern BOOL query_min_max_info(HWND hwnd) DECLSPEC_HIDDEN;
......
...@@ -194,6 +194,7 @@ enum { ...@@ -194,6 +194,7 @@ enum {
WINDOW_GOT_FOCUS, WINDOW_GOT_FOCUS,
WINDOW_LOST_FOCUS, WINDOW_LOST_FOCUS,
WINDOW_MINIMIZE_REQUESTED, WINDOW_MINIMIZE_REQUESTED,
WINDOW_RESIZE_ENDED,
NUM_EVENT_TYPES NUM_EVENT_TYPES
}; };
...@@ -290,7 +291,6 @@ enum { ...@@ -290,7 +291,6 @@ enum {
QUERY_DRAG_OPERATION, QUERY_DRAG_OPERATION,
QUERY_IME_CHAR_RECT, QUERY_IME_CHAR_RECT,
QUERY_PASTEBOARD_DATA, QUERY_PASTEBOARD_DATA,
QUERY_RESIZE_END,
QUERY_RESIZE_START, QUERY_RESIZE_START,
QUERY_MIN_MAX_INFO, QUERY_MIN_MAX_INFO,
NUM_QUERY_TYPES NUM_QUERY_TYPES
......
...@@ -1898,6 +1898,18 @@ void macdrv_window_brought_forward(HWND hwnd) ...@@ -1898,6 +1898,18 @@ void macdrv_window_brought_forward(HWND hwnd)
} }
/***********************************************************************
* macdrv_window_resize_ended
*
* Handler for WINDOW_RESIZE_ENDED events.
*/
void macdrv_window_resize_ended(HWND hwnd)
{
TRACE("hwnd %p\n", hwnd);
SendMessageW(hwnd, WM_EXITSIZEMOVE, 0, 0);
}
struct quit_info { struct quit_info {
HWND *wins; HWND *wins;
UINT capacity; UINT capacity;
...@@ -2082,19 +2094,6 @@ BOOL query_resize_start(HWND hwnd) ...@@ -2082,19 +2094,6 @@ BOOL query_resize_start(HWND hwnd)
/*********************************************************************** /***********************************************************************
* 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;
}
/***********************************************************************
* query_min_max_info * query_min_max_info
* *
* Handler for QUERY_MIN_MAX_INFO query. * Handler for QUERY_MIN_MAX_INFO query.
......
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