Modal windows

Phil Betts
Thu Jun 7 17:02:00 GMT 2007

Michel Bardiaux wrote on Thursday, June 07, 2007 4:01 PM::

> We have a MOTIF app that works correctly when displayed on a debian
> sarge (that is, using xfree) or win2k+exceed8.0.
> With cygwin-xfree on winxp, however, the modal windows do NOT stay on
> top of the main application window, the main comes up whenever one
> clicks in it.
> In all 3 cases, the client libraries are linux/xfree, at exactly the
> same version.
> Is that behavior
> - by design?
> - a known bug?
> - due to a user error?
> - a bug never reported yet?

Assuming you're using multiwindow mode, each X window is rendered in a
different Windows window.  Unfortunately, modality in X is not the same 
as in Windows.  In X, the display (server), window manager, and client 
are separate processes, and have clearly defined roles.  This is why 
it's possible to move the parent of a modal window, because the client 
is not responsible for its window's placement.  In Windows, the client
process is responsible for handling windows movement events, so the
entire parent window, including the frame is effectively iced.  I think 
the decision was taken that rather than inflict Windows' arguably 
broken concept of modality on an unsuspecting X process, all X windows 
are created as non-modal Windows windows.  The modality at the client
level is still maintained (i.e. you can't do anything in the parent),
but you will still be able to move the parent window about.

If you really need full X-style modality, you should be able to use
one of the other modes (rootless or fullscreen) and run an external
window manager.  The only problem with this IIRC, is that all X 
windows are really just images in a single Windows window, so 
clicking on any X window brings all X windows to the top.

Note that Windows' notion of stacking order is completely broken.
Always-on-top windows are frequently rendered on the bottom.  This
includes modal windows, which  is just great if they are rendered
completely beneath the now disabled parent window!

Unsubscribe info:
Problem reports:

More information about the Cygwin-xfree mailing list