4

Does X have the notion of non-clipped child windows? The behavior in Windows and OSX for these is:

  1. the parent always stays behind its children
  2. the children are closed automatically when the parent is closed
  3. the children follow the parent when moving

If the answer is no, then I can emulate 2 and 3 but how about 1?

Thanks,
Cosmin.

  • there's an unanswered question on 1. so I guess this will not be answered either http://stackoverflow.com/questions/25952934/keeping-x11-window-on-top-of-another-window –  Jul 04 '15 at 23:00

2 Answers2

4

The closest thing to overlapped non-clipped child windows in X is the window property WM_TRANSIENT_FOR. This will create a window that:

  • will not appear on the taskbar
  • will not have minimize and maximize buttons
  • will be minimized along with its transient-for window
  • will always stay on top of its transient-for window (most important)
  • Note that Qt internally uses this property to enforce the non-clipping relationship. With Qt 5.6.2, you have to use setTransientParent along with a transient window type to have this behavior ("transient window type" being one of: Dialog, Sheet, Tool, SplashScreen, ToolTip, Drawer, Popup). – fkorsa Jun 26 '17 at 10:25
0
  1. Yes ( you can override this if you implement your own composite manager )
  2. Yes, unless window is added to a "save set".
  3. Yes ( but again with your own composite manager you can change visual mapping of [content of all windows hierarchy] -> [screen] any way you want )
Andrey Sidorov
  • 24,905
  • 4
  • 62
  • 75
  • 1
    1 & 3. Ok, that's within expected levels of absurdity and ridiculousness. Do people override the WM in apps in practice? Can you give me some pointers/hints/standards/wm-attributes-to-google? I'm looking at Qt and wxWidgets but I can't see them doing this (will look more). –  Jul 05 '15 at 13:36
  • 1 & 3 - from this point of view - no, not at app level. There is no standard hints to indicates this, so consider "not possible" – Andrey Sidorov Jul 05 '15 at 13:39
  • Thanks. If you change your Yes'es into No's then I'll accept the answer :O Or should I clarify that I want to make an app and not a WM first? It seems there are more WMs than apps in X, so maybe the question is confusing :) (sorry I just can't help being snarky after fighting X for 2 weeks, please don't take it personally, I need an outlet for my anger and this little box looks perfect) –  Jul 05 '15 at 13:43
  • Your question was about "X" in general, so I answered what is possible :) Even from app only you can force current composite manager to quit by acquiring [_NET_WM_CM_Sn](http://standards.freedesktop.org/wm-spec/wm-spec-latest.html#idm140200472516176) selection and implement that compositing functionality in app, but I agree, it's a bit too exotic from regular GUI app developer point of view – Andrey Sidorov Jul 05 '15 at 23:50
  • That sounds intriguing. This is a long conv. for stackoverflow but I appreciate your time and I'd like to try this. I accepted the answer, but If you have more details on this please add it to the answer. Thanks. –  Jul 06 '15 at 00:59
  • So for instance, I'd like to know: if I get a selection to a screen, do I have to now manage all windows on that screen or only my own for the time I keep the selection? How long should I keep the selection? Are there caveats to this (like eg. the WM not restoring properly if my app crashes)? –  Jul 06 '15 at 01:06
  • Oh, and what happens when the window moves to a different screen? :) –  Jul 06 '15 at 01:09
  • most multi monitor setups use one logical screen these days (via Xinerama extansion) so you likely not ever see more than one screen in prev comment sense. For overview of the whole compositing & composite managers please read http://www.talisman.org/~erlkonig/misc/x11-composite-tutorial/ Happy to answer more specific questions :) – Andrey Sidorov Jul 06 '15 at 06:42
  • Good to know. Thanks for all the help. I'll make separate questions as I get more deeply into it. Btw, it looks like WM_TRANSIENT_FOR might be able to solve point 1 and 2 so I don't have to go the _NET_WM_CM_Sn route. –  Jul 06 '15 at 17:26
  • @user519179: actually, yes - people write their own window managers (or patch existing ones) for special applications. right now, I'm reworking an aged heavily customized xfwm4 for some railways application. – Enrico 'nekrad' Weigelt Aug 12 '22 at 11:40