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.
In Windows, modality is also signaled by flashing the titlebar of the modal window when trying to steal the focus from it.
Thanks.
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)
来源:https://stackoverflow.com/questions/31779316/x11-modal-dialog