jahnf / Projecteur

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

[WIP] Various Wayland Fixes #173

Open mayanksuman opened 2 years ago

mayanksuman commented 2 years ago
  1. Implements xdg-desktop-portal based screenshot capture
  2. No QMenu without parent widget: as this causes issues with wayland as per https://community.kde.org/Guidelines_and_HOWTOs/Wayland_Porting_Notes
jahnf commented 2 years ago

Thanks for the PR. Did you test, the context menu on Xorg? I remember vaguely, that the menu behaved weird of it had the application as a parent.

jahnf commented 2 years ago

Essentially your change to

new QMenu(qobject_cast<QWidget*>(m_trayIcon.get()))

will be the same as new QMenu(nullptr)

QSystemtrayIcon is not a QWidget, the cast will return a nullptr.

flipreverse commented 10 months ago

@mayanksuman Thx for your PR. I gave it a try. :) It works -- except for the first seconds. At the beginning, I see several error messages. They state no screenshot could be taken. After a few seconds, it works.

@jahnf Will this PR be merged?

jahnf commented 8 months ago

Yes eventually, it will. sorry the project is moving slow currently - The screenshot issue is the least of the problems that occur with Wayland + Qt and the Projecteur that needs to be a window above others - which just doesn't work as with X anymore.