ice-wm / icewm

IceWM releases only, see Wiki
https://github.com/ice-wm/icewm/releases
Other
289 stars 16 forks source link

IceWM taskbar is not in _NET_CLIENT_LIST #18

Closed PetteriAimonen closed 2 years ago

PetteriAimonen commented 4 years ago

When using quicktile in combination with IceWM, the tiled windows will overlap the IceWM taskbar.

This is because IceWM does not add its taskbar into _NET_CLIENT_LIST, so quicktile cannot see it when looking for panels. Internally this happens because _NET_CLIENT_LIST includes only YFrameWindows, while the task bar only uses YWindow and YFrameClient, as it does not have frames.

Apparently most other window managers such as OpenBox and KWin include their panels in _NET_CLIENT_LIST. Would it be acceptable to special-case task bar in YWindowManager::updateClientList() to get it included?

gijsbers commented 4 years ago

It would be nice if @bbidulock would be willing to comment on this issue. If Quicktile wants a solution that works for the installed base of IceWM then it should honour _NET_WORKAREA, which is properly set by IceWM. Quicktile could easily detect that it is running under IceWM and then either use _NET_WORKAREA or spend some effort to locate the IceWM taskbar and fish for its _NET_WM_STRUT setting. This is used by icesh -T list.

PetteriAimonen commented 4 years ago

Hmm yeah, it seems like searching for the taskbar from the window tree is probably the most reasonable way. Either a full recursive search, or special casing the names used by icewm. I didn't know about icesh -T list, it's very helpful code to refer to.

The problem with _NET_WORKAREA is that according to spec, it is "an area that is completely contained within the viewport". With multiple differently sized monitors, that would leave out part of the larger monitor, preventing windows from being tiled there.

bbidulock commented 4 years ago

_ NET_WORKAREA is just the screen minus struts. It should work in all cases. Icewm does not support viewports. The only WM supporting viewports that I know of is FVWM, so it should always work.

tstraus13 commented 3 years ago

On a random note. Not too related to the issue but was brought up in one of the comments. I have been building my own window snapping tool around IceWM and could not get any information about the Taskbar besides _NET_WORKAREA. Though @PetteriAimonen pointed out the use of switch -T. From what I can tell the -T switch is not documented in the manpage but will be a huge help for my tool. It might be a good idea to have it documented for others to use. If you want to create a new issue of this, feel free or I can create it as well. Thanks!

gijsbers commented 3 years ago

Done. Thanks for bringing up your use case. What does a window snapping tool do, BTW? Any examples?

tstraus13 commented 3 years ago

I think there may be other similar solutions out there but it will hopefully allow for the window snapping you get in Gnome or other DEs. Instead of using the mouse and dragging it close to the left or right side of the monitor you would just use a keyboard shortcut. I have left and right snap working fully I think. I could provide a short video of what it looks like if it would help.

ssokolow commented 1 year ago

_ NET_WORKAREA is just the screen minus struts. It should work in all cases. Icewm does not support viewports. The only WM supporting viewports that I know of is FVWM, so it should always work.

As the developer of QuickTile, I can confirm that I migrated away from _NET_WORKAREA and implemented my own replacement as a bugfix because, on a non-rectangular multi-monitor desktop, , it will return the largest rectangle which overlaps no panels or dead (inside no monitor) regions.

That means that _NET_WORKAREA constrained QuickTile to tiling inside the pale blue region in this diagram of my my monitors, rendering the red region inaccessible:

bitmap

My brother would have it even worse, because he has four monitors in a mix of portrait and landscape orientations that makes his desktop even less rectangular.

GNOME also implemented a proprietary workaround in the form of the _GTK_WORKAREAS_D* properties which report per-monitor rather than whole-workspace reservations. (Something I'll have to support since they don't set _NET_WM_STRUT at all.)

(Sorry for not responding at the time. Things weren't going well for me and I had more or less disconnected from hobby development entirely.)