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

Not remembering Windows position or size #1271

Closed
mattrixed opened this issue Nov 22, 2022 · 17 comments · Fixed by #1342
Closed

Not remembering Windows position or size #1271

mattrixed opened this issue Nov 22, 2022 · 17 comments · Fixed by #1342
Milestone

Comments

@mattrixed
Copy link

Linux Ubuntu 22.04
GO 3.9.1

Loading samplet freisach for eg window is full screen. Move it and position it - save - close down and start up again goes back to full screen.

@oleg68 oleg68 added this to the 3.9.3 milestone Nov 27, 2022
@oleg68
Copy link
Contributor

oleg68 commented Nov 28, 2022

@mattrixed Could you test the same with the demo organ?

@oleg68
Copy link
Contributor

oleg68 commented Dec 2, 2022

What desktop environment do you use with Ununtu?

@oleg68
Copy link
Contributor

oleg68 commented Dec 7, 2022

@mattrixed I installed ubuntu22, grandorgue 3.9.2 and I can not reproduce this problem: after restarting GrandOrgue and loading Friesach it opens at the same position and size as it was saved.

I need more information and tests from you for reproducing and fixing this problem. Are you ready to do more tests and to provide me additional information?

@oleg68 oleg68 modified the milestones: 3.9.3, 3.9.4, 3.9.5 Dec 9, 2022
@mattrixed
Copy link
Author

I too with the system running in the office/studio can't replicate either - the only difference is the monitor - when connected to the small touch screen 19" 4:3 monitor 1280x1024 it doesn't save - something to do with the display size if it detects a large screen (like in office 2560x1600) its fine if its under the size of the odf if goes full screen -

Not a big deal.....
Have installed POP! distro will see if still does it with that also....

@oleg68
Copy link
Contributor

oleg68 commented Dec 31, 2022

This issue is related to the Wayland windows server. As a workaround, when you log in the ubuntu session, you may click at the settings icon (at right bottom of the window) and choose Ubuntu on Xorg.

@oleg68
Copy link
Contributor

oleg68 commented Jan 1, 2023

@larspalo I remember you use Ubuntu. Do you use wayland or xorg? Do you have any issues with positioning?

I've never used wayland before and now I see that the windows positioning code in GrandOrgue does not work at all with wayland. wxTopWindow::GetPosition() and wxTopWindow::GetRect() returns some inadequate result.

@larspalo
Copy link
Contributor

larspalo commented Jan 2, 2023

@oleg68 I'm still using Ubuntu 20.04 mostly at home so it is X11 (xorg) by default. I think they changed it in 21.04 so when I decide to upgrade to 22.04 it's likely that Wayland will be used. However, window positioning works fine here with 20.04. We really should be careful to not "fix" things that really are bugs in other software, I think. If we're using the "correct" wx methods and issues still arise it's still fine and the bugs should be fixed where they really are. If, however, there are multiple ways of doing things and one version indeed gives better compatibility then that's another case... In my experience, too many "special fixes" only makes for more issues somewhere down the line and it makes the code more difficult to maintain.

@oleg68
Copy link
Contributor

oleg68 commented Jan 2, 2023

@larspalo After some research I found two issues:

  1. wayland does not support application to set their window positions. So the attempt of restore the saved position won't work. The wayland guys at https://www.mail-archive.com/wayland-devel@lists.freedesktop.org/msg41149.html (see 5 and 6) suggest to allow compositors to do this job, but neither there are any code examples of this, nor gnome-shell can do it.
  2. There are an issue also with the size of panels: on Ubuntu 22 the pannels are restored with a size larger than they were saved.

Saved:
VirtualBox_ub22go_save

Restored:
VirtualBox_ub22go_restore

This bug is present in wx 3.0.5, but it has already been fixed in wx 3.2.0. If I compile GO with 3.2.0, the restored panel has the same size as it has been saved, but it has another position.

VirtualBox_ub22go_restored 3 2 0

But 3.2.0 is still absent in most linux distros. If we build GO against 3.2.0, most of users will not be able to use it out of box without installing 3.2.0 manually.

So I'd like to find some workaround.

@oleg68
Copy link
Contributor

oleg68 commented Jan 2, 2023

@larspalo What is your opinion: what direction should we go:

  1. Do not support wayland at all and put this restriction in documentation?
  2. Switch GO to wx 3.2.0 with a hard way of instaling it?
  3. Try to find a workaround with wx 3.0.5?

@larspalo
Copy link
Contributor

larspalo commented Jan 2, 2023

@oleg68 For now I think that the first option (1.) is best as it seems to be quite easy to switch to not use Wayland. As soon as major distributions ship a newer wx version we should change too.

@oleg68
Copy link
Contributor

oleg68 commented Jan 3, 2023

@rousseldenis Do you agree with not supporting wayland?

@rousseldenis
Copy link
Contributor

@rousseldenis Do you agree with not supporting wayland?

As I'm on Ubuntu 22.04 too, just tested and windows position is well saved. I suppose I'm on xorg (I'm not really used to graphics stuffs).

So, I would say yes 😃

That apart, I think as there is a common workaround for that, option 1 is the best (for the time being).

@jason-barba
Copy link

I run native 22.04 with wayland (default) and GO 3.6.2-debian. I haven't experienced any trouble regarding this issue.

You can check whether xorg(x11) or wayland: Open Terminal and issue cli command echo $XDG_SESSION_TYPE.

@oleg68
Copy link
Contributor

oleg68 commented Jan 3, 2023

I haven't experienced any trouble regarding this issue.

The trouble with wayland is reproduced only when the saved panel size is a little bit less than the screen size. Otherwise you may not notice small increasing the panel size. See the screenshots above.

@ministerinmarin
Copy link

Greetings! New user here using Microsoft's Windows 11 with the latest GrandOrgue GitHub release. The window position for certain parts of the organ windows don't save even if I save the organ and exit the program, and I was expecting they would be easily arranged on a laptop screen of 1920x1080. Here are images to support the issue:
image
Exhibit 1: the GO window arrangement I am comfortable with
image
Exhibit 2: saving the organ
image
Exhibit 3: restarting the program and organ
Notice the crescendo pedal part was centered, instead of being positioned at its usual place on the screen. Isn't this an application concern or Windows OS's?

@oleg68
Copy link
Contributor

oleg68 commented Jan 7, 2023

@ministerinmarin The crescendo panel did not fit on the screen before you saved. That is why GrandOrgue shows it centered.

Try to move/resize it to fit in the screen area before saving.

@ministerinmarin
Copy link

ministerinmarin commented Jan 8, 2023

@ministerinmarin The crescendo panel did not fit on the screen before you saved. That is why GrandOrgue shows it centered.
Try to move/resize it to fit in the screen area before saving.

I have dragged the panels to the areas where they don't touch the taskbar or go beyond the screen anymore. Now that should fix my issue. Gratitude!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants