wayland/toplevel: refactor toplevel output tracking to its own file

This commit is contained in:
outfoxxed 2025-06-24 18:52:19 -07:00
parent 20c3da01f1
commit 27f97c3283
Signed by untrusted user: outfoxxed
GPG key ID: 4C88A185FB89301E
6 changed files with 119 additions and 82 deletions

View file

@ -10,6 +10,7 @@
#include "../../core/util.hpp"
#include "../../window/proxywindow.hpp"
#include "../../window/windowinterface.hpp"
#include "../output_tracking.hpp"
#include "handle.hpp"
#include "manager.hpp"
@ -22,8 +23,8 @@ Toplevel::Toplevel(impl::ToplevelHandle* handle, QObject* parent): QObject(paren
QObject::connect(handle, &impl::ToplevelHandle::titleChanged, this, &Toplevel::titleChanged);
QObject::connect(handle, &impl::ToplevelHandle::parentChanged, this, &Toplevel::parentChanged);
QObject::connect(handle, &impl::ToplevelHandle::activatedChanged, this, &Toplevel::activatedChanged);
QObject::connect(handle, &impl::ToplevelHandle::visibleScreenAdded, this, &Toplevel::screensChanged);
QObject::connect(handle, &impl::ToplevelHandle::visibleScreenRemoved, this, &Toplevel::screensChanged);
QObject::connect(&handle->visibleScreens, &WlOutputTracker::screenAdded, this, &Toplevel::screensChanged);
QObject::connect(&handle->visibleScreens, &WlOutputTracker::screenRemoved, this, &Toplevel::screensChanged);
QObject::connect(handle, &impl::ToplevelHandle::maximizedChanged, this, &Toplevel::maximizedChanged);
QObject::connect(handle, &impl::ToplevelHandle::minimizedChanged, this, &Toplevel::minimizedChanged);
QObject::connect(handle, &impl::ToplevelHandle::fullscreenChanged, this, &Toplevel::fullscreenChanged);
@ -50,7 +51,7 @@ bool Toplevel::activated() const { return this->handle->activated(); }
QList<QuickshellScreenInfo*> Toplevel::screens() const {
QList<QuickshellScreenInfo*> screens;
for (auto* screen: this->handle->visibleScreens()) {
for (auto* screen: this->handle->visibleScreens.screens()) {
screens.push_back(QuickshellTracked::instance()->screenInfo(screen));
}