diff options
author | Simon Rettberg | 2020-08-28 16:58:31 +0200 |
---|---|---|
committer | Simon Rettberg | 2020-08-28 16:58:31 +0200 |
commit | 3d6705b8b9adf92b1a4fa29b81134b872ec340cf (patch) | |
tree | f4e4ebe5c81fa6769e230027a3ef0bc28db93de9 /src/main.cpp | |
parent | Fix center mode (again) (diff) | |
download | beamergui-3d6705b8b9adf92b1a4fa29b81134b872ec340cf.tar.gz beamergui-3d6705b8b9adf92b1a4fa29b81134b872ec340cf.tar.xz beamergui-3d6705b8b9adf92b1a4fa29b81134b872ec340cf.zip |
Read screen resolution directly from randr, Qt uses cached values
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp index d94895a..d2def2c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -192,8 +192,8 @@ static int findConfig(QVector<QRect> &list) static void dumpScreens() { QVector<QRect> list; - for (auto *scr : QGuiApplication::screens()) { - list.append(scr->geometry()); + for (auto scr : ScreenSetup::inst()->getScreenPositions()) { + list.append(QRect(scr.location, scr.currentResolution)); } findConfig(list); qSort(list.begin(), list.end(), [](const QRect &one, const QRect &other) -> bool { |