mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
* Detect resolution changes * include Qt5Widgets * find Qt5Widgets Co-authored-by: Paulchen Panther <16664240+Paulchen-Panther@users.noreply.github.com>
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <QAbstractEventDispatcher>
|
||||
#include <QAbstractNativeEventFilter>
|
||||
#include <QCoreApplication>
|
||||
#include <QObject>
|
||||
|
||||
// Hyperion-utils includes
|
||||
@@ -8,12 +10,13 @@
|
||||
|
||||
// X11 includes
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/extensions/Xrandr.h>
|
||||
#include <X11/extensions/Xrender.h>
|
||||
#include <X11/extensions/XShm.h>
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/shm.h>
|
||||
|
||||
class X11Grabber : public Grabber
|
||||
class X11Grabber : public Grabber , public QAbstractNativeEventFilter
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -58,8 +61,11 @@ public:
|
||||
///
|
||||
virtual void setCropping(unsigned cropLeft, unsigned cropRight, unsigned cropTop, unsigned cropBottom);
|
||||
|
||||
protected:
|
||||
bool nativeEventFilter(const QByteArray & eventType, void * message, long int * result) override;
|
||||
|
||||
private:
|
||||
bool _XShmAvailable, _XShmPixmapAvailable, _XRenderAvailable;
|
||||
bool _XShmAvailable, _XShmPixmapAvailable, _XRenderAvailable, _XRandRAvailable;
|
||||
|
||||
XImage* _xImage;
|
||||
XShmSegmentInfo _shminfo;
|
||||
@@ -76,6 +82,8 @@ private:
|
||||
Picture _srcPicture;
|
||||
Picture _dstPicture;
|
||||
|
||||
int _XRandREventBase;
|
||||
|
||||
XTransform _transform;
|
||||
int _pixelDecimation;
|
||||
|
||||
|
Reference in New Issue
Block a user