winemac: Translate presence in Windows task bar to participation in Exposé and window cycling.

This commit is contained in:
Ken Thomases 2013-01-11 06:20:40 -06:00 committed by Alexandre Julliard
parent b6544d19dd
commit 15d4b2ab51
3 changed files with 17 additions and 0 deletions

View File

@ -156,6 +156,7 @@ - (void) setWindowFeatures:(const struct macdrv_window_features*)wf
- (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 @@ - (void) setMacDrvState:(const struct macdrv_window_state*)state
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

View File

@ -129,6 +129,8 @@
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,

View File

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