jahnf / Projecteur

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

No spotlight shown after switching application to fullscreen #51

Closed gyps closed 4 years ago

gyps commented 4 years ago

Description No spotlight shown when switching application to fullscreen. Restart of projeceur necessary after switch to fullscreen

To Reproduce Steps to reproduce the behavior:

  1. Start projecteur
  2. open browser non-fullscreen
  3. use spotlight successfully
  4. switch to fullscreen
  5. Unexpected: spotlight acts as pointer (i.e. mouse) not as spotlight
  6. restart projecteur
  7. spotlight acts as expected (also in fullscreen)
  8. goto 2

Expected behavior No change when switching application to fullscreen

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

jahnf commented 4 years ago

Hi @gyps, thanks for your bug report - at least on a GNOME Desktop I have currently access to, I cannot reproduce this. In my case the spotlight-window is always on top of the full-screen browser (tried with Firefox and Chrome) Which browser are you using?

gyps commented 4 years ago

I tired with my presentation app xournalpp as well as icecat. Chromium shows same effect. Seems to be application independent.

gyps commented 4 years ago

The interesting thing is, that after restart of projecteur everything works fine (even in fullscreen) but switching to nonfulscreen and back to fullscreen reproduces the problem.

Is there any point in the source where I could start debugging (I have to admit though that it's 15 years since I programmed in C++ the last time).

Cheers, Alex

jahnf commented 4 years ago

Okay, just a guess at this time, but it could be that the window flags that work with other window managers don't work the same with EXWM and Qt's showFullScreen() seems not to have the desired effect with EXWM to be placed above all existing windows. You could try to add an extra window->raise(); after line 152 projecteurapp.cc (after window->showFullScreen();)

gyps commented 4 years ago

Perfect! Adding raise() solved the issue - Thanks! -- Alex

gyps commented 4 years ago

Will you add the change into the git-master?

jahnf commented 4 years ago

Thanks for testing! Yes I will add it to the repo, of course after making sure Projecteur behaves still as expected on the main Desktop environments (GNOME, KDE...)

jahnf commented 4 years ago

@gyps Could you please build the bugfix/fullscreen-on-exwm branch and test it. There is also a second commit on that branch, that should show a warning in the preferences dialog if no compositing manager is running - could you please test if that warning shows up correctly too?

Edit: For the compositing manager warning: Make sure you have the package libqt5x11extras5-dev installed` before running CMake and building.

gyps commented 4 years ago

Works fine. Switching back and forth between fullscreen and non-fullscreen works. Starting and killing xcompmgr is noticed by the preferences screen even while running (pressing the close button refreshes the notification if xcompmgr was killed while dialog is open). Compiling without libqt5x11extras5-dev installed doesn't raise a warning thought. Maybe this should be the case?

jahnf commented 4 years ago

:+1: Thank you very much. About the 'missing' compilation warning: Since there are users that don't use X11 (maybe Wayland or other) - I made it possible to build the project without the x11extras on purpose.