-
-
Notifications
You must be signed in to change notification settings - Fork 279
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
X.H.EwmhDesktops: Add setEwmhMapHiddenWorkspaceToScreen function. #926
base: master
Are you sure you want to change the base?
Conversation
3011d86
to
1e4420f
Compare
EWMH has no clue whatsoever about xmonad's workspace handling; its workspace model assumes a workspace spans all screens (compare workspaces in Gnome, KDE, MATE, etc.) so all other workspaces are necessarily hidden and the concept of independent workspaces for screens simply doesn't exist. As such, EWMH is prone to report garbage when faced with |
Oh, and it's not enormously better even without |
I thought workspaces(, in the EWMH context desktops,) are assigned viewports in EWMH's model. I am aware that some tools relying on the EWMH functionality produce "garbage" in some situations, that is what I want to make partially fixable with this PR. |
Viewports are regions within an EWMH workspace (i.e. the whole visible area) which are available to applications, intended for use by panning window managers whose workspaces are larger than the visible area. Various applications will misbehave if you use them otherwise. Given the mismatch between xmonad's workspace model and EWMH's, we normally delete the viewport information because it usually causes more trouble than it solves; but in some cases it needs to be re-added. (Notably, I have a Qt application (Calibre) which doesn't display its menus properly if I don't set |
I don't want to seem rude, but to me it seems none of your comments are really related to the code changes in this PR. The contents of this PR don't intend to change which workspaces are mapped to viewports, and as far as I can tell I kept the default behavior. |
You're still talking about viewports, though. |
c7e774c
to
51b28e8
Compare
Rebased from more up to date master. |
47051f9
to
51b1639
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your PR!
Your implementation of the default behavior makes sense, I verified that this is what we are indeed doing with EWMH (I still want to run your PR though just to double check).
That said, I'm not aware of what effects this_NET_CURRENT_DESKTOP
has on other applications. The spec mentions the following:
For Window Managers that don't support large desktops, this MUST always be set to (0,0).
I'm not sure what the right behavior is.
An alternative would also be to simply omit the hidden workspaces, which won't be possible with your function. I would wait for someone who actually knows what they're talking about though
51b1639
to
4c5b5ce
Compare
I chose to not allow omitting workspaces from mapping even with customization for the following reasons:
My knowledge of the spec isn't very deep so I could easily misinterpret something about it. |
I did a little experimenting with not mapping workspaces to viewports. I found that viewports are indeed only mapped to workspaces by their positions in the I removed the mapping of all hidden workspaces in the
Based on this omitting any workspace would lead to problems so I think not allowing it even trough this customization is the right choice. |
Description
The default assignment of hidden workspaces to the current screen is a good default, but it is not always desired.
An example for this would be a configuration that uses independent screens, because in that context workspaces
belong to certain screens which the EWMH module can't and won't consider when using the default behavior.
As far as I am able to tell the EWMH specification does not prescribe how hidden workspaces should be
assigned to screens, therefore I believe allowing customization is acceptable.
Checklist
I've read CONTRIBUTING.md
I've considered how to best test these changes (property, unit,
manually, ...) and concluded: That since the modification is nested in a function that returns
X ()
manualtesting is the only option. I am currently using this modification in my window manager and it works as expected.
I updated the
CHANGES.md
file