https://bugs.kde.org/show_bug.cgi?id=522005
--- Comment #11 from Simeon Andreev <[email protected]> --- (In reply to Vlad Zahorodnii from comment #9) > Those come from the X server. `xcb_shape_notify_event_t` events should > arrive if the client (GW2) changes the shape. kwin itself shouldn't change > the geometry. Then this must be a problem with the client (or the constellation of the client on Wine/Proton on xwayland), that is only now becoming apparent? :/ > Can you add some qDebug()s in configure() to see if kwin flips back and > forth between two geometries? I only see one call when I maximize the kwin_wayland window, I don't see calls after maximizing (and hanging). > How many times updateShapeRegion() gets called per second? Once or twice or > many many times? By the looks of it once every ~30 ms: diff --git a/src/x11window.cpp b/src/x11window.cpp index ac6987a10c..3dbcff0e3b 100644 --- a/src/x11window.cpp +++ b/src/x11window.cpp @@ -3554,6 +3554,7 @@ void X11Window::moveResizeInternal(const RectF &rect, MoveResizeMode mode) void X11Window::configure(const Rect &nativeGeometry) { + qCDebug(KWIN_CORE) << "X11Window::configure()"; // handle xrandr emulation: If a fullscreen client requests mode changes, // - Xwayland will set _XWAYLAND_RANDR_EMU_MONITOR_RECTS on all windows of the client // - we need to configure the window to match the emulated size @@ -3967,6 +3968,14 @@ RegionF X11Window::shapeRegion() const void X11Window::updateShapeRegion() { + struct timeval current; + gettimeofday(¤t, NULL); + if (m_updateShaepRegionCalled) { + const auto elapsed = (current.tv_sec - m_updateShapeRegionPrevTime.tv_sec) * 1000000 + current.tv_usec - m_updateShapeRegionPrevTime.tv_usec; + qCDebug(KWIN_CORE) << "updateShapeRegion, time since last call: " << elapsed << " us"; + } + m_updateShaepRegionCalled = true; + m_updateShapeRegionPrevTime = current; const RectF bufferGeometry = this->bufferGeometry(); const auto previousRegion = m_shapeRegion; if (Xcb::Extensions::self()->hasShape(window())) { diff --git a/src/x11window.h b/src/x11window.h index dd2fb969b2..b6943d8a6b 100644 --- a/src/x11window.h +++ b/src/x11window.h @@ -11,6 +11,8 @@ #pragma once #include "config-kwin.h" +#include <sys/time.h> + #if !KWIN_BUILD_X11 #error Do not include on non-X11 builds #endif @@ -397,6 +399,8 @@ private: int bit_depth = 24; RegionF opaque_region; RegionF m_shapeRegion; + bool m_updateShaepRegionCalled; + struct timeval m_updateShapeRegionPrevTime; Xcb::StringProperty fetchActivities() const; void readActivities(Xcb::StringProperty &property); kwin_core: updateShapeRegion, time since last call: 30197 us kwin_core: updateShapeRegion, time since last call: 28687 us kwin_core: updateShapeRegion, time since last call: 33315 us > JIC I'm installing Guild Wars 2 to see if the issue happens on my computer. Thank you very much! -- You are receiving this mail because: You are watching all bug changes.
