Merge pull request #1309 from hokein/workspace-visible-api
Add workspace visible APIs
This commit is contained in:
commit
3b1be743ef
8 changed files with 68 additions and 0 deletions
|
@ -692,6 +692,21 @@ void NativeWindowMac::ShowDefinitionForSelection() {
|
|||
rwhv->ShowDefinitionForSelection();
|
||||
}
|
||||
|
||||
void NativeWindowMac::SetVisibleOnAllWorkspaces(bool visible) {
|
||||
NSUInteger collectionBehavior = [window_ collectionBehavior];
|
||||
if (visible) {
|
||||
collectionBehavior |= NSWindowCollectionBehaviorCanJoinAllSpaces;
|
||||
} else {
|
||||
collectionBehavior &= ~NSWindowCollectionBehaviorCanJoinAllSpaces;
|
||||
}
|
||||
[window_ setCollectionBehavior:collectionBehavior];
|
||||
}
|
||||
|
||||
bool NativeWindowMac::IsVisibleOnAllWorkspaces() {
|
||||
NSUInteger collectionBehavior = [window_ collectionBehavior];
|
||||
return collectionBehavior & NSWindowCollectionBehaviorCanJoinAllSpaces;
|
||||
}
|
||||
|
||||
bool NativeWindowMac::IsWithinDraggableRegion(NSPoint point) const {
|
||||
if (!draggable_region_)
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue