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

Fixed saving position when some panel is outside the screen area https://github.com/GrandOrgue/grandorgue/issues/1271 #1342

Merged
merged 1 commit into from
Jan 23, 2023

Conversation

oleg68
Copy link
Contributor

@oleg68 oleg68 commented Jan 14, 2023

Resolves: #1271

This PR fixes restoring panel position if the frame was not fully inside the screen area.

It works fine on windows, but some window managers (ex. gnome-shell/mutter) return the panel inside the screen area if it is only partially visible.

@larspalo
Copy link
Contributor

With this adjustment the behavior is different on Ubuntu (20.04). Earlier if multiple panels were partially outside the screen, one of them (and only one!) would center and the other moved just to edge of screen. Now, with this, the panels are not centered at all but moved to be visible (inside screen) just aligned at the closest edge.

I don't really mind this behavior but it seems it's not quite what's intended.

@oleg68
Copy link
Contributor Author

oleg68 commented Jan 23, 2023

With this adjustment the behavior is different on Ubuntu (20.04). Earlier if multiple panels were partially outside the screen, one of them (and only one!) would center and the other moved just to edge of screen. Now, with this, the panels are not centered at all but moved to be visible (inside screen) just aligned at the closest edge.

I installed ubuntu20 and I made tests with the old GO version (3.9.4-1) and with the new version (3.9.4-1.13) with this PR.

Before Save:
before-save

After starting GrandOrgue 3.9.4-1:
restore-3 9 4

After starting GrandOrgue 3.9.4-13:
restore-3 9 13

So the new behavior is the same as you describe, but I could not reproduce the behavior you described with the old version. Earlier all panels

I don't really mind this behavior but it seems it's not quite what's intended.

May be I intended restoring panels at the same positions where they were saved, but it is impossible with gnome shell: after GO opens all panels, gnome shell moves all panels to be fully visible. GrandOrgue can not distinguish moves are made by gnome shell from they are made by the user manually.

The intended behavior works only on Windows, where the window manager is "less cleaver" than gnome shell.

Whatever I find the new behavior is better than the old one, so I ask you to approve this PR.

@oleg68 oleg68 force-pushed the bugfix/save-position-2 branch from 6334e3a to 6e80194 Compare January 23, 2023 19:07
@oleg68
Copy link
Contributor Author

oleg68 commented Jan 23, 2023

@rousseldenis could you approve this PR?

@oleg68 oleg68 added this to the 3.9.5 milestone Jan 23, 2023
@oleg68 oleg68 merged commit cb14a0a into GrandOrgue:master Jan 23, 2023
@oleg68 oleg68 deleted the bugfix/save-position-2 branch January 23, 2023 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Not remembering Windows position or size
3 participants