Commit 57aec197 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧
Browse files

Remove cleanTabBox duplicated code

parent ad7a826e
......@@ -3756,9 +3756,20 @@ QRect AbstractClient::fullscreenGeometryRestore() const
{
return m_fullscreenGeometryRestore;
}
void AbstractClient::setFullscreenGeometryRestore(const QRect &geom)
{
m_fullscreenGeometryRestore = geom;
}
void AbstractClient::cleanTabBox()
{
#ifdef KWIN_BUILD_TABBOX
TabBox::TabBox *tabBox = TabBox::TabBox::self();
if (tabBox && tabBox->isDisplayed() && tabBox->currentClient() == this) {
tabBox->nextPrev(true);
}
#endif
}
}
......@@ -1243,6 +1243,9 @@ protected:
QRect m_virtualKeyboardGeometry;
void setFullscreenGeometryRestore(const QRect &geom);
void cleanTabBox();
private Q_SLOTS:
void shadeHover();
void shadeUnhover();
......
......@@ -11,10 +11,6 @@
#include "wayland_server.h"
#include "workspace.h"
#ifdef KWIN_BUILD_TABBOX
#include "tabbox.h"
#endif
#include <KWaylandServer/display.h>
#include <KWaylandServer/clientconnection.h>
#include <KWaylandServer/surface_interface.h>
......@@ -256,16 +252,6 @@ void WaylandClient::cleanGrouping()
}
}
void WaylandClient::cleanTabBox()
{
#ifdef KWIN_BUILD_TABBOX
TabBox::TabBox *tabBox = TabBox::TabBox::self();
if (tabBox->isDisplayed() && tabBox->currentClient() == this) {
tabBox->nextPrev(true);
}
#endif
}
bool WaylandClient::isShown(bool shaded_is_shown) const
{
Q_UNUSED(shaded_is_shown)
......
......@@ -62,7 +62,6 @@ protected:
void setPositionSyncMode(SyncMode syncMode);
void setSizeSyncMode(SyncMode syncMode);
void cleanGrouping();
void cleanTabBox();
virtual void requestGeometry(const QRect &rect);
virtual void updateGeometry(const QRect &rect);
......
......@@ -25,9 +25,6 @@
#include "netinfo.h"
#include "screens.h"
#include "shadow.h"
#ifdef KWIN_BUILD_TABBOX
#include "tabbox.h"
#endif
#include "workspace.h"
#include "screenedge.h"
#include "decorations/decorationbridge.h"
......@@ -200,12 +197,7 @@ void X11Client::deleteClient(X11Client *c)
void X11Client::releaseWindow(bool on_shutdown)
{
markAsZombie();
#ifdef KWIN_BUILD_TABBOX
TabBox::TabBox *tabBox = TabBox::TabBox::self();
if (tabBox->isDisplayed() && tabBox->currentClient() == this) {
tabBox->nextPrev(true);
}
#endif
cleanTabBox();
Deleted* del = nullptr;
if (!on_shutdown) {
del = Deleted::create(this);
......@@ -272,12 +264,7 @@ void X11Client::releaseWindow(bool on_shutdown)
void X11Client::destroyClient()
{
markAsZombie();
#ifdef KWIN_BUILD_TABBOX
TabBox::TabBox *tabBox = TabBox::TabBox::self();
if (tabBox && tabBox->isDisplayed() && tabBox->currentClient() == this) {
tabBox->nextPrev(true);
}
#endif
cleanTabBox();
Deleted* del = Deleted::create(this);
if (isMoveResize())
emit clientFinishUserMovedResized(this);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment