qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
9.91k stars 2.91k forks source link

Restoring window geometry on multi-display setup has bad UX #57909

Open wonder-sk opened 6 days ago

wonder-sk commented 6 days ago

What is the bug or the crash?

For users with multiple displays, the automatic saving/restoring of geometry of various QGIS dialogs has unexpected effects: sometimes dialogs open on a wrong display. What happens is that one day user works with QGIS on screen A, so the dialogs keep their geometry for the screen A. On some other day, user opens QGIS on screen B - and various dialogs keep popping up on the screen A, although this is quite unexpected and confusing (they may not realize the dialog has opened on a different screen than the one they are currently using).

While the behavior with QWidget::saveGeometry() + QWidget::restoreGeometry() is technically correct - it uses the same screen and geometry as the last time, in practice this is arguably not very nice. It would make sense to have some kind of screen affinity to avoid this kind of issues (so windows would be forced to open on the same screen), but that could annoy users that intentionally open some QGIS windows on different screens.

Steps to reproduce the issue

  1. start QGIS on screen A
  2. open Options dialog - it opens on screen A
  3. close the Options dialog and close QGIS
  4. start QGIS on screen B
  5. open Options dialog - surprisingly it opens on screen A rather than screen B

Versions

QGIS master and also any 3.x release

Supported QGIS version

New profile

Additional context

No response

nyalldawson commented 6 days ago

@wonder-sk do you have any plans here?

uclaros commented 5 days ago

We could start with restricting modal dialogs, like the options, to the same screen as their parent.

wonder-sk commented 5 days ago

@nyalldawson no immediate plans... it was reported to us some time ago that QGIS windows may randomly open on wrong screens, but without clear steps to reproduce it - and yesterday I have seen it on a colleague's computer, so I thought best to at least keep track of it.