When a dialog appears, it should be "owned" by some window. The main effect of this "ownership" is that the dialog is always in front of the owner window. When either the dialog or the owner is raised, the other follows.
All CAPI functions which display a dialog allow you to specify the owner.
When a dialog is displayed and the owner is not supplied or is given as nil
, the CAPI tries to identify the appropriate owner. In particular, in the case where a dialog pops up in a process in which a CAPI interface is displayed, by default the CAPI uses this interface as the owner window. This case covers most situations.
If the default is not appropriate, then the programmer needs to supply the owner. This owner argument can be any CAPI pane that is currently displayed, and the top level interface of the pane is used as the actual owner. A CAPI pane owner must be running in the current thread (see the process argument to display). Creating cross-thread ownership can lead to deadlocks.
The owner can also be a screen object, which tells the system on which screen to put the dialog, but none of the windows will be the dialog's owner.
The owner can be supplied by the keyword argument :owner
in functions such as display-dialog and print-dialog. Other functions such as prompt-for-string and prompt-for-file can be supplied an owner in the :popup-args
list as a pair :owner
owner.
CAPI User Guide and Reference Manual (Unix version) - 01 Dec 2021 19:32:37