From 935a6d7e212f3b7fb77f4635b578d67cd2e6c2d8 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Sun, 20 Dec 2020 14:23:33 +0200 Subject: [PATCH] platforms/x11: Drop XRandrScreens::displaySize() The default implementation of Screens::displaySize() returns the bounding rectangle of all available outputs. In case the Xrandr extension is unavailable, there will be a fake output whose dimensions are the same as the dimensions of all screens combined. --- plugins/platforms/x11/standalone/screens_xrandr.cpp | 9 --------- plugins/platforms/x11/standalone/screens_xrandr.h | 2 -- 2 files changed, 11 deletions(-) diff --git a/plugins/platforms/x11/standalone/screens_xrandr.cpp b/plugins/platforms/x11/standalone/screens_xrandr.cpp index 9ca64c732d..c1598268e1 100644 --- a/plugins/platforms/x11/standalone/screens_xrandr.cpp +++ b/plugins/platforms/x11/standalone/screens_xrandr.cpp @@ -79,13 +79,4 @@ bool XRandRScreens::event(xcb_generic_event_t *event) return false; } -QSize XRandRScreens::displaySize() const -{ - xcb_screen_t *screen = kwinApp()->x11DefaultScreen(); - if (!screen) { - return Screens::size(); - } - return QSize(screen->width_in_pixels, screen->height_in_pixels); -} - } // namespace diff --git a/plugins/platforms/x11/standalone/screens_xrandr.h b/plugins/platforms/x11/standalone/screens_xrandr.h index 3875062dee..1eb24db11b 100644 --- a/plugins/platforms/x11/standalone/screens_xrandr.h +++ b/plugins/platforms/x11/standalone/screens_xrandr.h @@ -24,8 +24,6 @@ public: ~XRandRScreens() override; void init() override; - QSize displaySize() const override; - using QObject::event; bool event(xcb_generic_event_t *event) override;