Toplevel does not inherit from KDecorationDefines any more
As an intermediate step Client inherits from KDecorationDefines.
This commit is contained in:
parent
6abf115d22
commit
1747fde18b
5 changed files with 9 additions and 9 deletions
|
@ -279,7 +279,7 @@ Client::Client()
|
||||||
ready_for_painting = false; // wait for first damage or sync reply
|
ready_for_painting = false; // wait for first damage or sync reply
|
||||||
|
|
||||||
connect(this, &Client::geometryShapeChanged, this, &Client::geometryChanged);
|
connect(this, &Client::geometryShapeChanged, this, &Client::geometryChanged);
|
||||||
auto signalMaximizeChanged = static_cast<void (Client::*)(KWin::Client*, KDecorationDefines::MaximizeMode)>(&Client::clientMaximizedStateChanged);
|
auto signalMaximizeChanged = static_cast<void (Client::*)(KWin::Client*, Client::MaximizeMode)>(&Client::clientMaximizedStateChanged);
|
||||||
connect(this, signalMaximizeChanged, this, &Client::geometryChanged);
|
connect(this, signalMaximizeChanged, this, &Client::geometryChanged);
|
||||||
connect(this, &Client::clientStepUserMovedResized, this, &Client::geometryChanged);
|
connect(this, &Client::clientStepUserMovedResized, this, &Client::geometryChanged);
|
||||||
connect(this, &Client::clientStartUserMovedResized, this, &Client::moveResizedChanged);
|
connect(this, &Client::clientStartUserMovedResized, this, &Client::moveResizedChanged);
|
||||||
|
|
5
client.h
5
client.h
|
@ -23,6 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#define KWIN_CLIENT_H
|
#define KWIN_CLIENT_H
|
||||||
|
|
||||||
// kwin
|
// kwin
|
||||||
|
#include <kdecoration.h>
|
||||||
#include "options.h"
|
#include "options.h"
|
||||||
#include "rules.h"
|
#include "rules.h"
|
||||||
#include "tabgroup.h"
|
#include "tabgroup.h"
|
||||||
|
@ -77,7 +78,7 @@ enum class Predicate {
|
||||||
};
|
};
|
||||||
|
|
||||||
class Client
|
class Client
|
||||||
: public Toplevel
|
: public Toplevel, public KDecorationDefines
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
/**
|
/**
|
||||||
|
@ -748,7 +749,7 @@ private Q_SLOTS:
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
void clientManaging(KWin::Client*);
|
void clientManaging(KWin::Client*);
|
||||||
void clientFullScreenSet(KWin::Client*, bool, bool);
|
void clientFullScreenSet(KWin::Client*, bool, bool);
|
||||||
void clientMaximizedStateChanged(KWin::Client*, KDecorationDefines::MaximizeMode);
|
void clientMaximizedStateChanged(KWin::Client*, Client::MaximizeMode);
|
||||||
void clientMaximizedStateChanged(KWin::Client* c, bool h, bool v);
|
void clientMaximizedStateChanged(KWin::Client* c, bool h, bool v);
|
||||||
void clientMinimized(KWin::Client* client, bool animate);
|
void clientMinimized(KWin::Client* client, bool animate);
|
||||||
void clientUnminimized(KWin::Client* client, bool animate);
|
void clientUnminimized(KWin::Client* client, bool animate);
|
||||||
|
|
|
@ -318,7 +318,7 @@ EffectsHandlerImpl::~EffectsHandlerImpl()
|
||||||
void EffectsHandlerImpl::setupClientConnections(Client* c)
|
void EffectsHandlerImpl::setupClientConnections(Client* c)
|
||||||
{
|
{
|
||||||
connect(c, &Client::windowClosed, this, &EffectsHandlerImpl::slotWindowClosed);
|
connect(c, &Client::windowClosed, this, &EffectsHandlerImpl::slotWindowClosed);
|
||||||
connect(c, static_cast<void (Client::*)(KWin::Client*, KDecorationDefines::MaximizeMode)>(&Client::clientMaximizedStateChanged),
|
connect(c, static_cast<void (Client::*)(KWin::Client*, Client::MaximizeMode)>(&Client::clientMaximizedStateChanged),
|
||||||
this, &EffectsHandlerImpl::slotClientMaximized);
|
this, &EffectsHandlerImpl::slotClientMaximized);
|
||||||
connect(c, &Client::clientStartUserMovedResized, this,
|
connect(c, &Client::clientStartUserMovedResized, this,
|
||||||
[this](Client *c) {
|
[this](Client *c) {
|
||||||
|
@ -519,7 +519,7 @@ void EffectsHandlerImpl::startPaint()
|
||||||
m_currentPaintEffectFrameIterator = m_activeEffects.constBegin();
|
m_currentPaintEffectFrameIterator = m_activeEffects.constBegin();
|
||||||
}
|
}
|
||||||
|
|
||||||
void EffectsHandlerImpl::slotClientMaximized(KWin::Client *c, KDecorationDefines::MaximizeMode maxMode)
|
void EffectsHandlerImpl::slotClientMaximized(KWin::Client *c, Client::MaximizeMode maxMode)
|
||||||
{
|
{
|
||||||
bool horizontal = false;
|
bool horizontal = false;
|
||||||
bool vertical = false;
|
bool vertical = false;
|
||||||
|
|
|
@ -24,6 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
#include "kwineffects.h"
|
#include "kwineffects.h"
|
||||||
|
|
||||||
|
#include "client.h"
|
||||||
#include "scene.h"
|
#include "scene.h"
|
||||||
#include "xcbutils.h"
|
#include "xcbutils.h"
|
||||||
|
|
||||||
|
@ -235,7 +236,7 @@ protected Q_SLOTS:
|
||||||
void slotClientShown(KWin::Toplevel*);
|
void slotClientShown(KWin::Toplevel*);
|
||||||
void slotUnmanagedShown(KWin::Toplevel*);
|
void slotUnmanagedShown(KWin::Toplevel*);
|
||||||
void slotWindowClosed(KWin::Toplevel *c);
|
void slotWindowClosed(KWin::Toplevel *c);
|
||||||
void slotClientMaximized(KWin::Client *c, KDecorationDefines::MaximizeMode maxMode);
|
void slotClientMaximized(KWin::Client *c, Client::MaximizeMode maxMode);
|
||||||
void slotOpacityChanged(KWin::Toplevel *t, qreal oldOpacity);
|
void slotOpacityChanged(KWin::Toplevel *t, qreal oldOpacity);
|
||||||
void slotClientModalityChanged();
|
void slotClientModalityChanged();
|
||||||
void slotGeometryShapeChanged(KWin::Toplevel *t, const QRect &old);
|
void slotGeometryShapeChanged(KWin::Toplevel *t, const QRect &old);
|
||||||
|
|
|
@ -21,8 +21,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#ifndef KWIN_TOPLEVEL_H
|
#ifndef KWIN_TOPLEVEL_H
|
||||||
#define KWIN_TOPLEVEL_H
|
#define KWIN_TOPLEVEL_H
|
||||||
|
|
||||||
// kwin libs
|
|
||||||
#include <kdecoration.h>
|
|
||||||
// kwin
|
// kwin
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
|
@ -60,7 +58,7 @@ enum class ReleaseReason {
|
||||||
};
|
};
|
||||||
|
|
||||||
class Toplevel
|
class Toplevel
|
||||||
: public QObject, public KDecorationDefines
|
: public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PROPERTY(bool alpha READ hasAlpha CONSTANT)
|
Q_PROPERTY(bool alpha READ hasAlpha CONSTANT)
|
||||||
|
|
Loading…
Reference in a new issue