This repository has been archived by the owner on Nov 1, 2021. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add support for xwayland_minimize actions #2264
Add support for xwayland_minimize actions #2264
Changes from all commits
3f20820
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
We should only do this if the surface is minimized.
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.
Please be more specific in your comments.
Do what emit signals? Safe size?
The handling is exactly the same as for maximized in this function.
I suppose the below is what you think is right so I changed it to that:
if (minimized && minimized != xsurface->minimized) {
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.
No, we want to emit the signal even if the client requests to not be minimized.
Please have a look at the similar block of code above for maximized. We only set
saved_width
andsaved_height
if the surface becomes maximized. We should do the same here, only update the saved size if the surface wants to become minimized.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.
Can you look into this?
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.
I don't see how this is wrong, maybe you suggest a proper way?
Github has the ability to suggest changes.
It is handled the way fullscreen is.
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.
Can we extract all of this into a
xwm_handle_wm_change_state_message
function?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.
Can you look into this?
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.
What is the relationship between
ICCCM_ICONIC_STATE
andNET_WM_STATE_HIDDEN
?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.
if a window is minimized it's both the NET_WM_STATE is hidden the WM_STATE is iconic
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.
Hm, so why do we need to handle
ICCCM_ICONIC_STATE
changes?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.
Bump
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.
This is the way minimize is being set - through WM_STATE which is iconic state - i3 does the same, net_wm_state_hidden mean window is not visible, iconic state means minimized, see here: https://specifications.freedesktop.org/wm-spec/wm-spec-latest.html
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.
Not sure what your above statement means code-wise,
or does it just mean 'resolved'.
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.
There are two code-paths in this PR:
NET_WM_STATE_HIDDEN
, and if I understand correctly, it can alternatively sendICCCM_ICONIC_STATE
. In this case, wlroots should (1) not minimize the window and (2) emit arequest_minimize
event. (1) is important because we need to let the compositor handle the request. Maybe the compositor can't minimize windows. Maybe the compositor wants to do something else when a client requests to be minimized. The compositor must stay in control. wlroots shouldn't do anything behind the compositor's back.request_minimize
event, or this can be because of something else (e.g. the user clicked "minimize" in a compositor menubar). The compositor will callwlr_xwayland_surface_set_minimized
.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.
@damianatorrpm this discussion needs to be resolved - this is the main blocker for this patch.
wlroots isn't a window manager in its own right, its a toolkit for window managers. We just help information flow smoothly from client to compositor implementation, and the compositor implementation calls the shots. So, instead of having wlroots' Xwayland layer handle the minimize request, we need to add a new event which the compositor can register for, which is emitted when the window requests to be minimized. Then, the compositor can decide what to do - for example, calling
wlr_xwayland_surface_set_minimized
themselves.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.
This has been changed, see the updated PR.
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.
This has been resolved, see updated PR