X11模态对话框 [英] X11 modal dialog

查看:167
本文介绍了X11模态对话框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用Xlib在X11中创建模式对话框?

How can I create a modal dialog in X11 using Xlib?

模式对话框是一个位于应用程序其他窗口之上的窗口(就像瞬态窗口一样),并且拒绝将焦点放在该应用程序的其他窗口上.

A modal dialog is a a window that stays on top of other windows of the app (like transient windows do) and also refuses to give focus to other windows of the app.

在Windows中,当试图从模式窗口中获取焦点时,还会通过闪烁模式窗口的标题栏来表示模式.

In Windows, modality is also signaled by flashing the titlebar of the modal window when trying to steal the focus from it.

谢谢.

推荐答案

您需要设置_NET_WM_STATE属性(类型为原子列表")以包含_NET_WM_STATE,请参见

You need to set _NET_WM_STATE property (which is of type "atom list") to include _NET_WM_STATE, see references to _NET_WM_STATE in EWMP spec (also need to set WM_TRANSIENT_FOR correctly)

这篇关于X11模态对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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