-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
wxFrame constructor position is not handled correctly for one of my MacOS screens #22614
Comments
Sorry, I have no idea what to do about this, I don't even have a multi-monitor Mac system to check this with. Could you please check what happens inside @csomor It seems a bit weird to me that the code for setting the initial frame position (in the function above) is different from the code used to set it later in |
for creating we are using a preferred initializer, if the problem really is isolated in this method, then indeed we should call a setFrame immediately afterwards, but I'm looking at the behavior with negative offsets on a single screen with the minimal sample, perhaps this already shows some trace ... |
ok for reproducing it, you can also use the minimal sample (adding a pos parameter for wxFrame creation) and let it run on a single screen machine, same result, I'll investigate |
@whalley could you please test whether this really fixes things for you as well ... thanks |
I was wondering if we should be using I'm reopening this as I think it should be backported to 3.2 too, shouldn't it? |
Yes, I don't think we should switch, as it doesn't even work in my case, and yes, we shoud backport, sorry for closing it from the commit message. |
Just tested, and yes this fixes my issue. Thanks |
for non-main screen coordinates, initWithContentRect is not working as expected, introducing workaround See wxWidgets#22614. (cherry picked from commit 5c5d5f5)
Describe the bug
Cannot open window correctly on MacOS setup with multiple monitors.
Expected vs observed behaviour
I have an application that restores the application to the previously saved x,y and w,h settings. It saves position on exit and restores on startup.
It restores correctly on two screens but when a restore is attempted on another screen it does not restore at the correct point.
If I force a re-positon after the wxFrame is created it will go to the correct location.
See: moneymanagerex/moneymanagerex#4791 (this also documents an odd behaviour with toolbar margins that you can ignore)
To Reproduce
I have three screens, one on laptop and two external with locations and dimensions below reported by
screen 0: x:0, y:25, w:1680, h:969
screen 1: x:-918, y:-1415, w:3440, h:1415
screen 2: x:-3478, y:-1415, w:2560, h:1415
If I edit the samples/aui demo and change to below:
The output is:
As can be seen the initial wxFrame is not positioned correctly.
Platform and version information
The text was updated successfully, but these errors were encountered: