Commit 7be4ab97 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

Move XdgSurfaceClient::cleanTabBox() to WaylandClient

It can be useful for other Wayland clients as well.
parent e2aaff63
......@@ -11,6 +11,10 @@
#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>
......@@ -305,6 +309,16 @@ 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)
......
......@@ -69,6 +69,7 @@ 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);
......
......@@ -16,10 +16,6 @@
#include "wayland_server.h"
#include "workspace.h"
#ifdef KWIN_BUILD_TABBOX
#include "tabbox.h"
#endif
#include <KDecoration2/DecoratedClient>
#include <KDecoration2/Decoration>
#include <KWaylandServer/appmenu_interface.h>
......@@ -383,16 +379,6 @@ void XdgSurfaceClient::setVirtualKeyboardGeometry(const QRect &geo)
setFrameGeometry(newWindowGeometry);
}
void XdgSurfaceClient::cleanTabBox()
{
#ifdef KWIN_BUILD_TABBOX
TabBox::TabBox *tabBox = TabBox::TabBox::self();
if (tabBox->isDisplayed() && tabBox->currentClient() == this) {
tabBox->nextPrev(true);
}
#endif
}
XdgToplevelClient::XdgToplevelClient(XdgToplevelInterface *shellSurface)
: XdgSurfaceClient(shellSurface->xdgSurface())
, m_shellSurface(shellSurface)
......
......@@ -85,7 +85,6 @@ private:
void resetHaveNextWindowGeometry();
QRect adjustMoveResizeGeometry(const QRect &rect) const;
void updateGeometryRestoreHack();
void cleanTabBox();
KWaylandServer::XdgSurfaceInterface *m_shellSurface;
QTimer *m_configureTimer;
......
Markdown is supported
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