conformal / spectrwm

A small dynamic tiling window manager for X11.
ISC License
1.33k stars 97 forks source link

Float window not behave correctly #485

Closed stellarix closed 11 months ago

stellarix commented 2 years ago

Spectrwm installed from AUR. I have set the _JAVA_AWT_WM_NONREPARENTING=1 environment variable.

I set quirk[Ghidra:Ghidra] = FLOAT in .spectrwm.conf or even quirk[.*] = FLOAT + ANYWHERE to make all open window float, but the window still open in non-float.

2021-11-06_13-40 2021-11-06_13-42 2021-11-06_13-42_1

stellarix commented 2 years ago

I noticed that every window open from Ghidra has WM_NAME = win[0-9]

[ stellarix ~ ]$ xprop 
WM_STATE(WM_STATE):
        window state: Normal
        icon window: 0x0
_NET_WM_ALLOWED_ACTIONS(ATOM) = _NET_WM_ACTION_CLOSE
_NET_WM_DESKTOP(CARDINAL) = 2
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_NORMAL
_MOTIF_DRAG_RECEIVER_INFO(_MOTIF_DRAG_RECEIVER_INFO) = 0x6c, 0x0, 0x5, 0x0, 0x20, 0x0, 0xa0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0
XdndAware(ATOM) = BITMAP
_NET_WM_STATE(ATOM) = _NET_WM_STATE_SKIP_TASKBAR
WM_HINTS(WM_HINTS):
        Client accepts input or input focus: False
        window id # of group leader: 0xa00007
WM_TRANSIENT_FOR(WINDOW): window id # 0xa00007
_NET_WM_PID(CARDINAL) = 7469
WM_CLIENT_MACHINE(STRING) = "arch"
WM_PROTOCOLS(ATOM): protocols  
_MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x3, 0x0, 0x0, 0x0, 0x0
WM_NORMAL_HINTS(WM_SIZE_HINTS):
        program specified location: -8, 19
        program specified size: 690 by 748
        window gravity: NorthWest
WM_CLASS(STRING) = "Ghidra", "Ghidra"
WM_CLIENT_LEADER(WINDOW): window id # 0xa00008
_NET_WM_NAME(UTF8_STRING) = "win0"
WM_NAME(STRING) = "win0"
_SWM_PID(STRING) = "7399"

I tried setting the quirk to quirk[.*:.*:win\[0-9\]] = FLOAT or quirk[Ghidra:Ghidra:.*] = FLOAT but it still appear as new tiled window.

LordReg commented 2 years ago

spectrwm uses the _NET_WM_STATE_ABOVE hint in _NET_WM_STATE to determine whether a window is floating. The issue is that Java automatically requests to change _NET_WM_STATE whenever its windows map. If it considers a window 'always on top', it adds _NET_WM_STATE_ABOVE, otherwise it removes _NET_WM_STATE_ABOVE. This occurs whenever the window maps, not only the first time. Try floating a tiled window and switch to another workspace so the window is unmapped, then switch back and it will be tiled again.

Unless there is a way to configure Java to change the above behavior, a new quirk may be needed to ignore such EWMH requests.

Also, as spectrwm is a reparenting WM, _JAVA_AWT_WM_NONREPARENTING shouldn't be set.

LordReg commented 11 months ago

The new floating layout addresses this in spectrwm 3.5.0