summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbscreen.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbscreen.h')
-rw-r--r--src/plugins/platforms/xcb/qxcbscreen.h31
1 files changed, 24 insertions, 7 deletions
diff --git a/src/plugins/platforms/xcb/qxcbscreen.h b/src/plugins/platforms/xcb/qxcbscreen.h
index 7a81d8b43a..dfec3609a5 100644
--- a/src/plugins/platforms/xcb/qxcbscreen.h
+++ b/src/plugins/platforms/xcb/qxcbscreen.h
@@ -46,6 +46,7 @@
#include <QtCore/QString>
#include <xcb/xcb.h>
+#include <xcb/randr.h>
#include "qxcbobject.h"
@@ -57,21 +58,26 @@ class QXcbCursor;
class QXcbScreen : public QXcbObject, public QPlatformScreen
{
public:
- QXcbScreen(QXcbConnection *connection, xcb_screen_t *screen, int number);
+ QXcbScreen(QXcbConnection *connection, xcb_screen_t *screen,
+ xcb_randr_get_output_info_reply_t *output, QString outputName, int number);
~QXcbScreen();
QPixmap grabWindow(WId window, int x, int y, int width, int height) const;
QWindow *topLevelAt(const QPoint &point) const;
- QRect geometry() const;
- int depth() const;
+ QRect geometry() const { return m_geometry; }
+ QRect availableGeometry() const {return m_availableGeometry;}
+ int depth() const { return m_screen->root_depth; }
QImage::Format format() const;
- QSizeF physicalSize() const;
+ QSizeF physicalSize() const { return m_sizeMillimeters; }
QPlatformCursor *cursor() const;
- qreal refreshRate() const;
+ qreal refreshRate() const { return m_refreshRate; }
+ Qt::ScreenOrientation orientation() const { return m_orientation; }
+ QList<QPlatformScreen *> virtualSiblings() const { return m_siblings; }
+ void setVirtualSiblings(QList<QPlatformScreen *> sl) { m_siblings = sl; }
- int screenNumber() const;
+ int screenNumber() const { return m_number; }
xcb_screen_t *screen() const { return m_screen; }
xcb_window_t root() const { return m_screen->root; }
@@ -83,12 +89,23 @@ public:
const xcb_visualtype_t *visualForId(xcb_visualid_t) const;
- QString name() const;
+ QString name() const { return m_outputName; }
+ void handleScreenChange(xcb_randr_screen_change_notify_event_t *change_event);
+ void updateGeometry(xcb_timestamp_t timestamp);
void updateRefreshRate();
private:
xcb_screen_t *m_screen;
+ xcb_randr_crtc_t m_crtc;
+ QString m_outputName;
+ QSizeF m_sizeMillimeters;
+ QRect m_geometry;
+ QRect m_availableGeometry;
+ QSize m_virtualSize;
+ QSizeF m_virtualSizeMillimeters;
+ QList<QPlatformScreen *> m_siblings;
+ Qt::ScreenOrientation m_orientation;
int m_number;
QString m_windowManagerName;
bool m_syncRequestSupported;