From a1a93ce1933e53183855451c34532a0a99e0d67d Mon Sep 17 00:00:00 2001 From: Ken Thomases Date: Thu, 4 Feb 2016 17:18:26 -0600 Subject: [PATCH] winemac: Change the processEvents parameter of -[WineEventQueue query:timeout:processEvents:] to a flags bitmask. Signed-off-by: Ken Thomases Signed-off-by: Alexandre Julliard --- dlls/winemac.drv/cocoa_event.h | 7 ++++++- dlls/winemac.drv/cocoa_event.m | 6 +++--- dlls/winemac.drv/cocoa_window.m | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/dlls/winemac.drv/cocoa_event.h b/dlls/winemac.drv/cocoa_event.h index 4605fd19297..472c6676b6f 100644 --- a/dlls/winemac.drv/cocoa_event.h +++ b/dlls/winemac.drv/cocoa_event.h @@ -22,6 +22,11 @@ #include "macdrv_cocoa.h" +enum { + WineQueryProcessEvents = 1 << 0, +}; + + @class WineWindow; @@ -42,7 +47,7 @@ @interface WineEventQueue : NSObject - (void) postEvent:(macdrv_event*)inEvent; - (void) discardEventsMatchingMask:(macdrv_event_mask)mask forWindow:(NSWindow*)window; - - (BOOL) query:(macdrv_query*)query timeout:(NSTimeInterval)timeout processEvents:(BOOL)processEvents; + - (BOOL) query:(macdrv_query*)query timeout:(NSTimeInterval)timeout flags:(NSUInteger)flags; - (BOOL) query:(macdrv_query*)query timeout:(NSTimeInterval)timeout; - (void) resetMouseEventPositions:(CGPoint)pos; diff --git a/dlls/winemac.drv/cocoa_event.m b/dlls/winemac.drv/cocoa_event.m index c011f8d48c8..1a360a1e3a7 100644 --- a/dlls/winemac.drv/cocoa_event.m +++ b/dlls/winemac.drv/cocoa_event.m @@ -294,7 +294,7 @@ - (void) discardEventsMatchingMask:(macdrv_event_mask)mask forWindow:(NSWindow*) }]; } - - (BOOL) query:(macdrv_query*)query timeout:(NSTimeInterval)timeout processEvents:(BOOL)processEvents + - (BOOL) query:(macdrv_query*)query timeout:(NSTimeInterval)timeout flags:(NSUInteger)flags { macdrv_event* event; NSDate* timeoutDate = [NSDate dateWithTimeIntervalSinceNow:timeout]; @@ -308,13 +308,13 @@ - (BOOL) query:(macdrv_query*)query timeout:(NSTimeInterval)timeout processEvent macdrv_release_event(event); timedout = ![[WineApplicationController sharedController] waitUntilQueryDone:&query->done timeout:timeoutDate - processEvents:processEvents]; + processEvents:(flags & WineQueryProcessEvents) != 0]; return !timedout && query->status; } - (BOOL) query:(macdrv_query*)query timeout:(NSTimeInterval)timeout { - return [self query:query timeout:timeout processEvents:FALSE]; + return [self query:query timeout:timeout flags:0]; } - (void) resetMouseEventPositions:(CGPoint)pos diff --git a/dlls/winemac.drv/cocoa_window.m b/dlls/winemac.drv/cocoa_window.m index e9c2cc70cec..3e2dae8c99b 100644 --- a/dlls/winemac.drv/cocoa_window.m +++ b/dlls/winemac.drv/cocoa_window.m @@ -2657,7 +2657,7 @@ - (BOOL) performDragOperation:(id )sender query->drag_drop.op = [sender draggingSourceOperationMask]; query->drag_drop.pasteboard = (CFTypeRef)[pb retain]; - [self.queue query:query timeout:3 * 60 processEvents:YES]; + [self.queue query:query timeout:3 * 60 flags:WineQueryProcessEvents]; ret = query->status; macdrv_release_query(query);