Skip to content
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

On Wayland, under mutter(GNOME Wayland), fix CSD being behind the status bar, when starting window in maximized mode #1324

Merged
merged 1 commit into from
Dec 20, 2019

Conversation

kchibisov
Copy link
Member

GNOME places maximized window CSD behind the status bar, and in the same time it moves any window crossing the "bounding box"(screen edges + status bar's bottom edge on top) into it on the next resize. So the main problem is GNOME placing window in a wrong place initially.

That gif shows the behavior I'm talking about. You don't need maximize to repro it.

jump

The question why mutter places our window in a wrong place initially is still flying in the air...

  • Tested on all platforms changed
  • Compilation warnings were addressed
  • cargo fmt has been run on this branch
  • Added an entry to CHANGELOG.md if knowledge of this change could be valuable to users

cc @Will-W

Fixes #1312

@goddessfreya goddessfreya added DS - wayland C - waiting on maintainer A maintainer must review this code labels Dec 19, 2019
@Will-W
Copy link

Will-W commented Dec 19, 2019

This PR shows the correct behaviour for me.

CHANGELOG.md Outdated
@@ -1,6 +1,7 @@
# Unreleased

- On Wayland, fix cursor icon updates on window borders when using CSD.
- On Wayland, under mutter(GNOME Wayland), fix CSD being behind the status bar, when stating window in maximized mode.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a typo for "starting" (missing "r") ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to force push, because I have to alter commit message(the same typo).

…tus bar, when starting window in maximized mode

Mutter can reposition window on resize, if it is behind mutter's "bounding box".
So, when you start winit window in maximized mode with CSD, mutter places its CSD
behind the GNOME's status bar initially, and then sends configure with the
exact same size as your current window. If winit decides to optimize calling
frame.resize(..) in this case, we won't call set_geometry(we're calling
it through resize) and GNOME won't reposition your window to be inside the
"bounding box", which is not a desired behavior for the end user.
@kchibisov kchibisov changed the title On Wayland, under mutter(GNOME Wayland), fix CSD being behind the status bar, when stating window in maximized mode On Wayland, under mutter(GNOME Wayland), fix CSD being behind the status bar, when starting window in maximized mode Dec 19, 2019
@kchibisov kchibisov requested a review from elinorbgr December 19, 2019 14:27
@goddessfreya goddessfreya merged commit 73248bd into rust-windowing:master Dec 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C - waiting on maintainer A maintainer must review this code DS - wayland
Development

Successfully merging this pull request may close these issues.

Gnome Wayland decorations behind system bar
4 participants