打开的窗口在所有台式机上都显示 [英] Open window such that is shows on all desktops

查看:48
本文介绍了打开的窗口在所有台式机上都显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个屏幕快照,它的作用是对当前可见内容进行屏幕快照,然后打开一个覆盖所有内容的全屏窗口.但是,这会在桌面1的父窗口的桌面上打开.如果用户将桌面2聚焦(由于使用了全屏应用程序或其他功能),则打开的窗口将不会显示在桌面2上.

所以我想知道是否有一个窗口级别或某种(我尝试过所有窗口级别)将使该窗口出现在所有桌面上.

谢谢

解决方案

这听起来像 NSWindowCollectionBehaviorCanJoinAllSpaces NSWindowCollectionBehaviorStationary .将其设置为窗口的 collectionBehavior .

(您可能也想设置窗口级别,但这是关于排序而不是集合/空格行为.而且,如果您具有窗口"菜单,那么您可能还需要 NSWindowCollectionBehaviorIgnoresCycle .)

I have a screenshot thing, what it does is it takes a screenshot of the current visible stuff, then opens a full screen window covering everything. However this opens on the desktop of the parent window which is on desktop 1. And if a user had desktop 2 focused (due to like fullscreen app or something) then the window that opened will not show on desktop 2.

So I was wondering if there is a window level or something (I tried all the window levels) that will make it such that a window appears on all desktops.

Thanks

解决方案

This sounds like either NSWindowCollectionBehaviorCanJoinAllSpaces or NSWindowCollectionBehaviorStationary. Set it as the collectionBehavior of the window.

(You probably want to set the window level, too, but that's about ordering rather than collection/Spaces behavior. And if you have a Window menu, then you probably also want NSWindowCollectionBehaviorIgnoresCycle.)

这篇关于打开的窗口在所有台式机上都显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆