From 0f9722ad69c9391cb488776924724ee4918603be Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Thu, 1 Oct 2020 14:28:14 +0300 Subject: [PATCH] Port DebugConsole to Workspace::allClientList() This simplifies the code by porting the debug console away from Workspace::clientList() to Workspace::allClientList(). The main difference between the two is that the former returns only all X11 windows and the latter returns both X11 and Wayland windows. --- debug_console.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/debug_console.cpp b/debug_console.cpp index 90d1a1b06..cfd60c3d3 100644 --- a/debug_console.cpp +++ b/debug_console.cpp @@ -15,7 +15,6 @@ #include "scene.h" #include "unmanaged.h" #include "waylandclient.h" -#include "wayland_server.h" #include "workspace.h" #include "keyboard_input.h" #include "input_event.h" @@ -864,14 +863,8 @@ void DebugConsoleModel::remove(int parentRow, QVector &clients, T *client) DebugConsoleModel::DebugConsoleModel(QObject *parent) : QAbstractItemModel(parent) { - if (waylandServer()) { - const auto clients = waylandServer()->clients(); - for (auto c : clients) { - handleClientAdded(c); - } - } - const auto x11Clients = workspace()->clientList(); - for (auto c : x11Clients) { + const auto clients = workspace()->allClientList(); + for (auto c : clients) { handleClientAdded(c); } connect(workspace(), &Workspace::clientAdded, this, &DebugConsoleModel::handleClientAdded);