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.master
parent
56f159dded
commit
0f9722ad69
|
@ -15,7 +15,6 @@
|
||||||
#include "scene.h"
|
#include "scene.h"
|
||||||
#include "unmanaged.h"
|
#include "unmanaged.h"
|
||||||
#include "waylandclient.h"
|
#include "waylandclient.h"
|
||||||
#include "wayland_server.h"
|
|
||||||
#include "workspace.h"
|
#include "workspace.h"
|
||||||
#include "keyboard_input.h"
|
#include "keyboard_input.h"
|
||||||
#include "input_event.h"
|
#include "input_event.h"
|
||||||
|
@ -864,14 +863,8 @@ void DebugConsoleModel::remove(int parentRow, QVector<T*> &clients, T *client)
|
||||||
DebugConsoleModel::DebugConsoleModel(QObject *parent)
|
DebugConsoleModel::DebugConsoleModel(QObject *parent)
|
||||||
: QAbstractItemModel(parent)
|
: QAbstractItemModel(parent)
|
||||||
{
|
{
|
||||||
if (waylandServer()) {
|
const auto clients = workspace()->allClientList();
|
||||||
const auto clients = waylandServer()->clients();
|
for (auto c : clients) {
|
||||||
for (auto c : clients) {
|
|
||||||
handleClientAdded(c);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const auto x11Clients = workspace()->clientList();
|
|
||||||
for (auto c : x11Clients) {
|
|
||||||
handleClientAdded(c);
|
handleClientAdded(c);
|
||||||
}
|
}
|
||||||
connect(workspace(), &Workspace::clientAdded, this, &DebugConsoleModel::handleClientAdded);
|
connect(workspace(), &Workspace::clientAdded, this, &DebugConsoleModel::handleClientAdded);
|
||||||
|
|
Loading…
Reference in New Issue