-
Notifications
You must be signed in to change notification settings - Fork 815
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
Fix wrong window position on some linux DEs - worked around invalid g… #1744
Conversation
…eometry() returned by QT Signed-off-by: Dominique Fuchs <[email protected]>
Also, there is a problem when working with multiple monitors. The window is displayed on the wrong monitor. |
…ux DEs Signed-off-by: Dominique Fuchs <[email protected]>
…ow.qml Signed-off-by: Dominique Fuchs <[email protected]>
Tested on KDE Plasma, Window, macOS. Further testing is welcome - if no corresponding bugs come up, this should be ready to merge. |
Please see another problem - #1746 |
I have the same problem. |
@tobiasKaminsky Easiest way is building this PR from source (see here for example - this is a little outdated in some parts, but generally building is a bliss after setting some cmake variables and having the prerequisites installed). Edit additional info: Alternatively he next beta will take some days - we are actually having a few issues with the package build chain. But after all beta packages for beta 1 are built, we'll merge this and other PRs into master and soon will give a beta 2. |
Even better, I found that appImage job of drone is already uploading it via transfer.sh, e.g. latest CI is https://transfer.sh/Fz3IF/Nextcloud-PR-1744-0697c81ae6a1c63dc3a8616aca2a102e78143755-x86_64.AppImage Let me add some link to this… |
Ah right, totally forgot about the AppImages. Yes, you can also directly get them for specific branches after CI run (checks -> continuous integration -> AppImage Test (in drone) -> link at the end of the output) just to leave a general browser-way here |
I tested this build and I can confirm that it now has the correct position on two monitors, with KDE / plasma. |
How soon will this be added to the compilation? |
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.
🚀
The problem remained when using a 4k monitor. A window pops up in the middle of the screen |
…eometry() returned by QT
Signed-off-by: Dominique Fuchs [email protected]
Reason is UGLY. Qt's geometry() returns invalid QRect/QPoint (0, 0 / 0, -1) when called on tray icon objects on several linux desktop environments. There has already been major discussion throughout several places over this the last years, but it seems like at Qt one has given up (or never cared about this) as the whole topic with desktop environments is a mess anyway on linux.
Long story short: If geometry() return value is invalid (origin point (0,0)), use the current mouse position instead. Logically this is very ugly and only a workaround, but in practice should work out b/c mouse trigger is the only legitimate way for the tray window to pop up right now. Only exception I could think of is opening this by accessibility methods of the current system, but positioning should not be that important in this case.
Windows and macOS not affected (tested). Current openSUSE Leap: