为什么只显示一个子窗口?(x11)
我有一小段代码,其中创建了 3 个窗口的 4 个不重叠的集合(上/左下/右)(1 个父窗口 1 个子窗口几乎与父窗口一样大,还有 1 个小按钮窗口)。然后我映射每个窗口。
然而,只有在左上象限(首先创建的)中才会显示子窗口。我尝试不创建左上角窗口,并且在这种情况下首先创建的象限不显示子窗口。我尝试过切换窗口映射的顺序,但没有什么区别。 Windows 根据 xwininfo 存在,并且我没有收到任何 X 错误。
知道可能出什么问题吗?
I have a small piece of code where I create 4 non overlapping sets(Top/Bottom Left/Right) of 3 windows(1 parent window 1 child window almost as large as the parent window and 1 small button window). Then I map each window.
Yet only in the top left quadrant(which is created first) do the child windows show. I've tried not creating the top left windows and the quadrant created first in that case doesn't show child windows. I've tried switching the order of window mapping and it doesn't make a difference. The windows exist according to xwininfo and I don't get any X errors.
Any idea of what could be wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
(以防其他人遇到类似问题)
我在将子窗口的绝对坐标放在它们真正所在的位置时犯了一个错误
相对于 xlib 中的父窗口(这很有意义)。
因此,当然只有顶部窗口会显示子窗口(因为这是它们唯一可以重叠的窗口。
(In case anybody else comes across similar problems)
I made a mistake in putting absolute coordinates for child windows where they really are
relative to their parent window in xlib(which makes a lot of sense).
So of course only the top window would show a a child window(since thats the only one where they could overlap.