jahnf / Projecteur

Linux Desktop Application for the Logitech Spotlight device (and similar devices) - Digital Laser Pointer
MIT License
379 stars 33 forks source link

[BUG] two monitors, only one with spotlight #63

Closed fmuelle4711 closed 4 years ago

fmuelle4711 commented 4 years ago

Description Attach 2 monitors, spotlight will always be in left monitor (irrespective of the QT5 screen number), it cannot move to the other monitor. You can exchange the position of displays in gnome settings to get it into the other screen. You can use --cfg FILE to see that screen is only updated if the gnome displays have been exchanged in settings

Expected behavior Should be able to move spotlight between screens

Desktop/Linux Environment (please complete the following information):

Debugging: In void ProjecteurApplication::setScreenForCursorPos(): QCursor::pos() will always report the last (x,y) position seen in the left monitor after moving the mouse pointer into the right monitor. The screen index is that of the left monitor (could be 0 or 1, depending on which monitor is left) but never changes since pos() is not correctly updated. This appears to be a QT5 bug, possibly due to Wayland. I'm not sure if it has been reported. See the kludge above of moving displays to get around it for now.

jahnf commented 4 years ago

Thanks for the detailed bug report. Which Qt5 version are you building against? On the systems and versions of Qt I have been using, the issue you have with QCursor::pos() does not seem to appear (but also I am mostly using X11).

There is a commit on a feature branch (49de7dfaae31bc9bec201e7d29eeb8ab4bc2a274) - does this work for your setup?

fmuelle4711 commented 4 years ago

5.13 (qt5-5.13.2-1.fc31.noarch) feature added to my branch, problem persists

fmuelle4711 commented 4 years ago

Solved: QT_QPA_PLATFORM=xcb ./projecteur https://bugzilla.redhat.com/show_bug.cgi?id=1769060

jahnf commented 4 years ago

Good to know, thanks.

Unfortunately, there is an endless list of possible configurations - GNOME, KDE...; Wayland, X11...; Distibution, Graphics driver...