jahnf / Projecteur

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

Feature request: Make spotlight follow mouse across multiple attached screens #42

Closed maehne closed 4 years ago

maehne commented 4 years ago

@jahnf: Thanks for continuously improving projecteur! I am using it daily for highlighting things on my slides while teaching my courses.

As I am using my spotlight device so frequently, I have projecteur setup to get launched automatically when I log into my KDE Plasma desktop. One usability issue that I have found during that daily usage is that I frequently have to go to the configuration window to select another screen for displaying the spotlight. The reason is that my monitor configuration frequently changes throughout the day, as I work in my office and several different classrooms with differing video projector / monitor setups. Most of the time, the video projector / monitor gets attached via HDMI, but sometimes also via Mini-DisplayPort, DVI, or VGA. Additionally, I have to change frequently between duplicating my laptop screen and a dual screen configuration. The dual screen configuration, I use while working on my desk or presenting slides with pdfpc. Duplicating the screen is useful, when I demonstrate software tools or coding/debug techniques.

Currently, one has to choose manually the screen on which the spotlight is to be shown in projecteur's configuration dialogue. It would be nice if the active screen for the spotlight would be automatically chosen based on which screen the mouse cursor was located when the spotlight button is pressed. This would make using projecteur more intuitive and safe me time in the classroom.

Related, I have noticed that the name for the screens listed in projecteur's configuration panel are not always correct after attaching a screen and opening the panel. Anyway, switching the monitor to the corresponding signal usually works.

jahnf commented 4 years ago

Well it seems the implementation was surprisingly easy and painless (also thanks to https://stackoverflow.com/questions/32040202/qt-5-get-the-mouse-position-in-a-screen/). More code was removed than added - because the screen setting in the dialog is not necessary anymore. @maehne : Would you be so kind and test the changes on your various screen configurations? You will need to build from the feature branch or the e4efcb8 commit directly

jahnf commented 4 years ago

I tested on my dual screen home setup and with dual screen VMs, and it seems to work very well. Will merge this back to develop, since I won't have too much time over the next two weeks for this project.

Edit: If there are any problems, please reopen this issue.

maehne commented 4 years ago

@jahnf: Thanks a lot for implementing so quickly my feature request! It works great for me on the two setups. which I had access to since you implemented it (one three monitor setup and a two monitor one -- all connected via HDMI). Before Tuesday, I won't have a chance to test it in the classroom, but don't expect any issue. I will report back if there should be any unexpected problem.