Ken Thomases : winemac: Implement support for WS_EX_TOPMOST windows.
Alexandre Julliard
julliard at winehq.org
Fri Jan 11 13:46:58 CST 2013
Module: wine
Branch: master
Commit: 429732ce1a4db12cfd9149bbc1c630bd9509508b
URL: http://source.winehq.org/git/wine.git/?a=commit;h=429732ce1a4db12cfd9149bbc1c630bd9509508b
Author: Ken Thomases <ken at codeweavers.com>
Date: Fri Jan 11 06:18:55 2013 -0600
winemac: Implement support for WS_EX_TOPMOST windows.
---
dlls/winemac.drv/cocoa_window.h | 1 +
dlls/winemac.drv/cocoa_window.m | 10 +++++++++-
dlls/winemac.drv/macdrv_cocoa.h | 1 +
dlls/winemac.drv/window.c | 1 +
4 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/dlls/winemac.drv/cocoa_window.h b/dlls/winemac.drv/cocoa_window.h
index 86211dd..41e0b90 100644
--- a/dlls/winemac.drv/cocoa_window.h
+++ b/dlls/winemac.drv/cocoa_window.h
@@ -26,6 +26,7 @@
NSUInteger normalStyleMask;
BOOL disabled;
BOOL noActivate;
+ BOOL floating;
}
@end
diff --git a/dlls/winemac.drv/cocoa_window.m b/dlls/winemac.drv/cocoa_window.m
index dde77b3..16217c2 100644
--- a/dlls/winemac.drv/cocoa_window.m
+++ b/dlls/winemac.drv/cocoa_window.m
@@ -62,6 +62,7 @@ static BOOL frame_intersects_screens(NSRect frame, NSArray* screens)
@property (nonatomic) BOOL disabled;
@property (nonatomic) BOOL noActivate;
+ at 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
diff --git a/dlls/winemac.drv/macdrv_cocoa.h b/dlls/winemac.drv/macdrv_cocoa.h
index d91cd1a..fa2e083 100644
--- a/dlls/winemac.drv/macdrv_cocoa.h
+++ b/dlls/winemac.drv/macdrv_cocoa.h
@@ -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,
diff --git a/dlls/winemac.drv/window.c b/dlls/winemac.drv/window.c
index b813cdc..232c60a 100644
--- a/dlls/winemac.drv/window.c
+++ b/dlls/winemac.drv/window.c
@@ -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;
}
More information about the wine-cvs
mailing list