Handling top-level windows
Terminology
An unbordered window is a window that does not have a border added by the window manager. In X11 parlance, it is an OverrideRedirect window. They typically include menus and tooltips.
Ideal rules
Tooltips:
- May not be under the pointer. Moving the pointer onto the tooltip closes it.
- The pointer must be over a window of the client opening the tooltip. Moving the pointer away from the client's window closes the tooltip.
- Clicking closes tooltips.
- However, a client does not need the focus to open a tooltip.
Menus:
- Must be contiguous with the parent window.
- The parent window must be focused. Losing the focus closes any child menus.
- Pressing Escape closes menus.
Generic rule 1
Don't allow unbordered windows outside the parent window at all.
We would need some heuristic to decide what the parent window is.
Generic rule 2
Only allow unbordered windows below the title bar of the parent window while the parent window is focused.
