JulNadeauCA/libagar

Submenus are decorated when using twm

Opened this issue · 3 comments

This is a minor problem.
Cannot say if this is a flaw of agar or it is due to twm not supporting modern wm protocols. Anyway here is a screeshot:
Screenshot_2024-04-22_10-05-34

Decorations are present also in combos

I can also veryify this with Fluxbox. My thought on this was that by default the window used to create the menu wasn't coded with the flags implemented in the function that need to hide this or that you need to add them in your code (AG_WINDOW_PLAIN or AG_WINDOW_NOTITLE ?). A menu has those flags but a popup menu not so much I guess. AG_MenuNew(void *parent, Uint flags) vs. AG_PopupNew(void *obj)

The relevant code is under SetHints() in gui/drv_glx.c. There are hints specific to some different WMs such as Motif, KWM and Gnome for disabling window decorations, though most modern WMs will use the EWMH-compliant type (the wmType field of AG_Window that is used to set X properties such as _NET_WM_WINDOW_TYPE_MENU or _NET_WM_WINDOW_TYPE_DOCK).

I'm wondering, does twm / Fluxbox recognize a decoration-disabling hint (e.g., a property that could be set with XChangeProperty()) or do they provide another way to disable window decorations?