winemac: Change the processEvents parameter of -[WineEventQueue query:timeout:processEvents:] to a flags bitmask.

Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Ken Thomases 2016-02-04 17:18:26 -06:00 committed by Alexandre Julliard
parent 3482c47469
commit a1a93ce193
3 changed files with 10 additions and 5 deletions

View File

@ -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;

View File

@ -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

View File

@ -2657,7 +2657,7 @@ - (BOOL) performDragOperation:(id <NSDraggingInfo>)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);