Commit Graph
6 Commits
Author SHA1 Message Date
Trần Nam Tuấn cf707fb652 Fix wayland interface detection
I made a mistake in understanding how wayland protocols' version numbers are reported. This commit allow checking wayland interface without requiring a version number.
2025-07-27 08:24:18 +07:00
Trần Nam Tuấn 2a14c45910 Include QScopedPointer header into idletimer.cpp
"It built fine on my machine!"
2025-03-22 15:35:51 +07:00
Trần Nam Tuấn c50496f79c Add Wayland idle timer
Wayland idle timer use ext_idle_notifier_v1 Wayland protocol to be notified of user idle status. It will only run if the compositor implement the protocol. For ext_idle_notifier_v1 version 2, get_input_idle_notification() only tracks user input, which I think is more appropriate.

Due to the usage of qt_generate_wayland_protocol_client_sources() in CMake to generate Wayland client code, Wayland idle timer can only be compiled using Qt 6. We could take relevant part from KDE's ECM FindQtWaylandScanner, but that seem cumbersome.
2025-03-22 15:13:32 +07:00
Trần Nam Tuấn 54884df07d Add Wayland interfaces query function
With Qt 6.5 and later, we have QNativeInterface::QWaylandApplication for low level Wayland access. For older Qt, QPlatformNativeInterface is required. QPlatformNativeInterface is a private class from Qt::GuiPrivate, which isn't idea. But it was how KDE did it in the past.

FindWayland.cmake and FindWaylandProtocols.cmake are modifed version of KDE's ECM, with unused bits removed.
2025-03-22 14:57:32 +07:00
Trần Nam Tuấn 97a9fed5b1 Move XCB idle timer into seperate class. 2025-03-22 14:57:26 +07:00
Trần Nam Tuấn 90d3120861 Add Wayland utils 2025-03-22 09:57:39 +07:00