将X11窗口保持在另一个窗口之上 [英] Keeping X11 window on top of another window

查看:100
本文介绍了将X11窗口保持在另一个窗口之上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个x11窗口,它们之间需要保持一定的堆叠顺序,即一个窗口需要保持在另一个之上.我不在乎应用程序之外的其他窗口.通常,我会为此使用父级/子级,但是由于X11将子级窗口剪辑为父级,因此我必须伪造它.我尝试了各种方法来保持和/或调整窗口堆栈以保持正确的顺序.但是,WM除了XRaiseWindow()太强力而且会导致其他窗口出现问题之外,几乎忽略了所有其他内容.

I have two x11 windows which need to maintain a certain stacking order between each other, namely one window needs to stay above the other. I don't care about other windows outside the application. Normally, I would use a parent/child for this, but since X11 clips the child window to the parent, I have to fake it. I've tried various methods to keep and/or adjust the window stack to maintain the proper order. However, the WM is ignoring pretty much everything except for XRaiseWindow() which is too brute force and causes problems for other windows.

所以问题是如何设置两个窗口之间的堆叠,还是有一种方法可以设置不会导致父项剪切子项的父子项?

So the question is how do I set the stacking between two windows, or is there a way to set a parent/child that doesn't result in the parent clipping the child?

推荐答案

是的,您可以使用WM_TRANSIENT_FOR Window属性使(瞬态)父级出现在子级后面而不会剪切它.Qt在内部使用它,您可以grep它的源代码作为示例用法.

Yes, you can use the WM_TRANSIENT_FOR Window property to make the (transient) parent appear behind the child without clipping it. Qt uses it internally, you can grep its sources for an example usage.

另请参见此答案>上限.

See also this answer by cap.

这篇关于将X11窗口保持在另一个窗口之上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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