Changeset View
Changeset View
Standalone View
Standalone View
plugins/platforms/x11/standalone/screens_xrandr.cpp
Show First 20 Lines • Show All 74 Lines • ▼ Show 20 Line(s) | 72 | } else { | |||
---|---|---|---|---|---|
75 | screen->width_in_millimeters = xrrEvent->mwidth; | 75 | screen->width_in_millimeters = xrrEvent->mwidth; | ||
76 | screen->height_in_millimeters = xrrEvent->mheight; | 76 | screen->height_in_millimeters = xrrEvent->mheight; | ||
77 | } | 77 | } | ||
78 | #ifndef KWIN_UNIT_TEST | 78 | #ifndef KWIN_UNIT_TEST | ||
79 | if (workspace()->compositing()) { | 79 | if (workspace()->compositing()) { | ||
80 | // desktopResized() should take care of when the size or | 80 | // desktopResized() should take care of when the size or | ||
81 | // shape of the desktop has changed, but we also want to | 81 | // shape of the desktop has changed, but we also want to | ||
82 | // catch refresh rate changes | 82 | // catch refresh rate changes | ||
83 | if (Compositor::self()->xrrRefreshRate() != Options::currentRefreshRate()) | 83 | auto *compositor = static_cast<X11Compositor*>(Compositor::self()); | ||
84 | Compositor::self()->setCompositeResetTimer(0); | 84 | if (compositor->xrrRefreshRate() != Options::currentRefreshRate()) | ||
85 | compositor->setCompositeResetTimer(0); | ||||
85 | } | 86 | } | ||
86 | #endif | 87 | #endif | ||
87 | 88 | | |||
88 | return false; | 89 | return false; | ||
89 | } | 90 | } | ||
90 | 91 | | |||
91 | QSize XRandRScreens::displaySize() const | 92 | QSize XRandRScreens::displaySize() const | ||
92 | { | 93 | { | ||
93 | xcb_screen_t *screen = defaultScreen(); | 94 | xcb_screen_t *screen = defaultScreen(); | ||
94 | if (!screen) { | 95 | if (!screen) { | ||
95 | return Screens::size(); | 96 | return Screens::size(); | ||
96 | } | 97 | } | ||
97 | return QSize(screen->width_in_pixels, screen->height_in_pixels); | 98 | return QSize(screen->width_in_pixels, screen->height_in_pixels); | ||
98 | } | 99 | } | ||
99 | 100 | | |||
100 | } // namespace | 101 | } // namespace |