6a2e414d
by Rémi Bernon at 2025-03-21T21:57:37+01:00
winex11: Use -1 as fullscreen monitor indices to clear the property.
This property is the only way to move fullscreen windows across monitors
with KWin, it needs to be set to avoid having to mess with _NET_WM_STATE
workarounds.
Both KWin and Mutter support cases with invalid indices and treat them
mostly the same as clearing the property.
For Mutter, see:
* meta_x11_display_xinerama_index_to_logical_monitor[1]
* meta_window_update_fullscreen_monitors[2]
* meta_window_clear_fullscreen_monitors[3]
For KWin, see:
* NETFullscreenMonitors structure from KWindowSystem[4],
* xineramaIndexToOutput[5]
* fullscreenMonitorArea[6]
Mostly reverts 70c9239cb2eef696eea109f3f8e7a58f80cd3823.
[1] https://gitlab.gnome.org/GNOME/mutter/-/blob/9a1fa7e13b5feefb76902287ae7ca2554d18cf15/src/x11/meta-x11-display.c#L2483
[2] https://gitlab.gnome.org/GNOME/mutter/-/blob/9a1fa7e13b5feefb76902287ae7ca2554d18cf15/src/x11/window-x11.c#L3838
[3] https://gitlab.gnome.org/GNOME/mutter/-/blob/9a1fa7e13b5feefb76902287ae7ca2554d18cf15/src/core/window.c#L3588
[4] https://github.com/KDE/kwindowsystem/blob/1399ec9c2f05107c36bc8661593df35bad2d8def/src/netwm_def.h#L277
[5] https://invent.kde.org/plasma/kwin/-/blob/b488f3b6c6200aca9fa1f61cbf0253eedae1db23/src/workspace.cpp#L2514
[6] https://invent.kde.org/plasma/kwin/-/blob/b488f3b6c6200aca9fa1f61cbf0253eedae1db23/src/x11window.cpp#L4351