chore: no longer rely on qpa x11 platform

This commit is contained in:
2025-12-25 13:39:17 +08:00
parent b0df2b9e27
commit faf5b43e2b
4 changed files with 57 additions and 6 deletions

9
util.h
View File

@@ -8,6 +8,7 @@
#include <QImage>
#include <QSharedPointer>
#include <QSet>
#include <QObject>
#include <cstdint>
#include <sys/types.h>
@@ -21,7 +22,7 @@ struct _XDisplay;
namespace tray {
#define UTIL Util::instance()
class XcbThread;
class Util
class Util : public QObject
{
public:
@@ -59,6 +60,12 @@ private:
Util(const Util&) = delete;
Util& operator=(const Util&) = delete;
enum class DispatchEventsMode {
Poll,
EventQueue
};
void dispatchEvents(DispatchEventsMode mode);
bool isTransparentImage(const QImage &image);
QImage convertFromNative(xcb_image_t* image);