From 8c15da99ae06f34a1f022e00f3088762107d52cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Wed, 18 Feb 2015 11:52:51 +0100 Subject: [PATCH] Use property for x11AppScreen in KWin::Application Already provided by KWin::Application so let's use it instead of QX11Info::appScreen. REVIEW: 122683 --- libkwineffects/kwinglobals.h | 2 +- main.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/libkwineffects/kwinglobals.h b/libkwineffects/kwinglobals.h index 00aa446305..94af2a9a79 100644 --- a/libkwineffects/kwinglobals.h +++ b/libkwineffects/kwinglobals.h @@ -170,7 +170,7 @@ KWIN_EXPORT xcb_screen_t *defaultScreen() if (s_screen) { return s_screen; } - int screen = QX11Info::appScreen(); + int screen = qApp->property("x11ScreenNumber").toInt(); for (xcb_screen_iterator_t it = xcb_setup_roots_iterator(xcb_get_setup(connection())); it.rem; --screen, xcb_screen_next(&it)) { diff --git a/main.h b/main.h index d0c79b7c78..d70ea9d117 100644 --- a/main.h +++ b/main.h @@ -48,6 +48,7 @@ class KWIN_EXPORT Application : public QApplication Q_PROPERTY(quint32 x11Time READ x11Time WRITE setX11Time) Q_PROPERTY(quint32 x11RootWindow READ x11RootWindow CONSTANT) Q_PROPERTY(void *x11Connection READ x11Connection NOTIFY x11ConnectionChanged) + Q_PROPERTY(int x11ScreenNumber READ x11ScreenNumber CONSTANT) public: /** * @brief This enum provides the various operation modes of KWin depending on the available