Commit 429732ce authored by Ken Thomases's avatar Ken Thomases Committed by Alexandre Julliard

winemac: Implement support for WS_EX_TOPMOST windows.

parent 9d29ea42
......@@ -26,6 +26,7 @@
NSUInteger normalStyleMask;
BOOL disabled;
BOOL noActivate;
BOOL floating;
}
@end
......@@ -62,6 +62,7 @@ static BOOL frame_intersects_screens(NSRect frame, NSArray* screens)
@property (nonatomic) BOOL disabled;
@property (nonatomic) BOOL noActivate;
@property (nonatomic) BOOL floating;
+ (void) flipRect:(NSRect*)rect;
......@@ -80,7 +81,7 @@ static BOOL frame_intersects_screens(NSRect frame, NSArray* screens)
@implementation WineWindow
@synthesize disabled, noActivate;
@synthesize disabled, noActivate, floating;
+ (WineWindow*) createWindowWithFeatures:(const struct macdrv_window_features*)wf
windowFrame:(NSRect)window_frame
......@@ -147,8 +148,15 @@ static BOOL frame_intersects_screens(NSRect frame, NSArray* screens)
- (void) setMacDrvState:(const struct macdrv_window_state*)state
{
NSInteger level;
self.disabled = state->disabled;
self.noActivate = state->no_activate;
self.floating = state->floating;
level = state->floating ? NSFloatingWindowLevel : NSNormalWindowLevel;
if (level != [self level])
[self setLevel:level];
}
/* Returns whether or not the window was ordered in, which depends on if
......
......@@ -128,6 +128,7 @@ struct macdrv_window_features {
struct macdrv_window_state {
unsigned int disabled:1;
unsigned int no_activate:1;
unsigned int floating:1;
};
extern macdrv_window macdrv_create_cocoa_window(const struct macdrv_window_features* wf,
......
......@@ -103,6 +103,7 @@ static void get_cocoa_window_state(struct macdrv_win_data *data,
memset(state, 0, sizeof(*state));
state->disabled = (style & WS_DISABLED) != 0;
state->no_activate = !can_activate_window(data->hwnd);
state->floating = (ex_style & WS_EX_TOPMOST) != 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