Ken Thomases : winemac: Translate presence in Windows task bar to participation in Exp =?UTF-8?Q?os=C3=A9=20and=20window=20cycli?==?UTF-8?Q?ng?=.
Alexandre Julliard
julliard at winehq.org
Fri Jan 11 13:46:58 CST 2013
Module: wine
Branch: master
Commit: 15d4b2ab51a6b0c34334a95b98a36fd6e4fea2e0
URL: http://source.winehq.org/git/wine.git/?a=commit;h=15d4b2ab51a6b0c34334a95b98a36fd6e4fea2e0
Author: Ken Thomases <ken at codeweavers.com>
Date: Fri Jan 11 06:20:40 2013 -0600
winemac: Translate presence in Windows task bar to participation in Exposé and window cycling.
---
dlls/winemac.drv/cocoa_window.m | 12 ++++++++++++
dlls/winemac.drv/macdrv_cocoa.h | 2 ++
dlls/winemac.drv/window.c | 3 +++
3 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/dlls/winemac.drv/cocoa_window.m b/dlls/winemac.drv/cocoa_window.m
index e6ae103..9d359ff 100644
--- a/dlls/winemac.drv/cocoa_window.m
+++ b/dlls/winemac.drv/cocoa_window.m
@@ -156,6 +156,7 @@ static BOOL frame_intersects_screens(NSRect frame, NSArray* screens)
- (void) setMacDrvState:(const struct macdrv_window_state*)state
{
NSInteger level;
+ NSWindowCollectionBehavior behavior;
self.disabled = state->disabled;
self.noActivate = state->no_activate;
@@ -164,6 +165,17 @@ static BOOL frame_intersects_screens(NSRect frame, NSArray* screens)
level = state->floating ? NSFloatingWindowLevel : NSNormalWindowLevel;
if (level != [self level])
[self setLevel:level];
+
+ behavior = NSWindowCollectionBehaviorDefault;
+ if (state->excluded_by_expose)
+ behavior |= NSWindowCollectionBehaviorTransient;
+ else
+ behavior |= NSWindowCollectionBehaviorManaged;
+ if (state->excluded_by_cycle)
+ behavior |= NSWindowCollectionBehaviorIgnoresCycle;
+ else
+ behavior |= NSWindowCollectionBehaviorParticipatesInCycle;
+ [self setCollectionBehavior:behavior];
}
/* 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 86a49ce..fc2b0ac 100644
--- a/dlls/winemac.drv/macdrv_cocoa.h
+++ b/dlls/winemac.drv/macdrv_cocoa.h
@@ -129,6 +129,8 @@ struct macdrv_window_state {
unsigned int disabled:1;
unsigned int no_activate:1;
unsigned int floating:1;
+ unsigned int excluded_by_expose:1;
+ unsigned int excluded_by_cycle: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 21c9e59..4344da5 100644
--- a/dlls/winemac.drv/window.c
+++ b/dlls/winemac.drv/window.c
@@ -104,6 +104,9 @@ static void get_cocoa_window_state(struct macdrv_win_data *data,
state->disabled = (style & WS_DISABLED) != 0;
state->no_activate = !can_activate_window(data->hwnd);
state->floating = (ex_style & WS_EX_TOPMOST) != 0;
+ state->excluded_by_expose = state->excluded_by_cycle =
+ !(ex_style & WS_EX_APPWINDOW) &&
+ (GetWindow(data->hwnd, GW_OWNER) || (ex_style & (WS_EX_TOOLWINDOW | WS_EX_NOACTIVATE)));
}
More information about the wine-cvs
mailing list