From 35541fb02c6c8a174fc16c255aadfcb33d3159fa Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Wed, 30 Aug 2023 01:35:10 +0300 Subject: [PATCH] kdeui: initialize variables in KWindowSystem::setOnDesktop() see the previous commits Signed-off-by: Ivailo Monev --- kdeui/windowmanagement/kwindowsystem_x11.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/kdeui/windowmanagement/kwindowsystem_x11.cpp b/kdeui/windowmanagement/kwindowsystem_x11.cpp index c06edf0c..5fb58272 100644 --- a/kdeui/windowmanagement/kwindowsystem_x11.cpp +++ b/kdeui/windowmanagement/kwindowsystem_x11.cpp @@ -532,8 +532,12 @@ void KWindowSystem::setOnDesktop( WId win, int desktop ) init( INFO_BASIC ); QPoint p = desktopToViewport( desktop, false ); Window dummy; - int x, y; - unsigned int w, h, b, dp; + int x = 0; + int y = 0; + unsigned int w = 0; + unsigned int h = 0; + unsigned int b = 0; + unsigned int dp = 0; XGetGeometry( QX11Info::display(), win, &dummy, &x, &y, &w, &h, &b, &dp ); // get global position XTranslateCoordinates( QX11Info::display(), win, QX11Info::appRootWindow(), 0, 0, &x, &y, &dummy );