From e6c30469e4c7a09517a493ede0e4fcb3a00372f6 Mon Sep 17 00:00:00 2001
From: Alexander Golubev <fatzer2@gmail.com>
Date: Fri, 5 Dec 2025 22:50:22 +0300
Subject: twin: small refactoring; move global variables to the class

Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
---
 twin/workspace.cpp | 12 +++++-------
 twin/workspace.h   |  4 ++++
 2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/twin/workspace.cpp b/twin/workspace.cpp
index 7b9571a9a..89bd84993 100644
--- a/twin/workspace.cpp
+++ b/twin/workspace.cpp
@@ -54,15 +54,10 @@ namespace KWinInternal
 {
 
 extern int screen_number;
+extern bool disable_twin_composition_manager;
 
 Workspace *Workspace::_self = 0;
 
-TDEProcess* kompmgr = 0;
-TDESelectionOwner* kompmgr_selection;
-
-bool allowKompmgrRestart = true;
-extern bool disable_twin_composition_manager;
-
 bool supportsCompMgr()
 {
     if (disable_twin_composition_manager) {
@@ -163,7 +158,10 @@ Workspace::Workspace( bool restore )
     topmenu_space( NULL ),
     set_active_client_recursion( 0 ),
     block_stacking_updates( 0 ),
-    forced_global_mouse_grab( false )
+    forced_global_mouse_grab( false ),
+    kompmgr( NULL ),
+    kompmgr_selection( NULL ),
+    allowKompmgrRestart( true )
     {
     _self = this;
     mgr = new PluginMgr;
diff --git a/twin/workspace.h b/twin/workspace.h
index 637a14e77..5f1d71025 100644
--- a/twin/workspace.h
+++ b/twin/workspace.h
@@ -665,6 +665,10 @@ class Workspace : public TQObject, public KWinInterface, public KDecorationDefin
         friend class Client;
 
         //kompmgr
+        TDEProcess* kompmgr;
+        TDESelectionOwner* kompmgr_selection;
+        bool allowKompmgrRestart;
+
         TQSlider *transSlider;
         TQPushButton *transButton;
         // not used yet
-- 
cgit v1.2.3

