2020-08-02 22:22:19 +00:00
|
|
|
/*
|
|
|
|
KWin - the KDE window manager
|
|
|
|
This file is part of the KDE project.
|
2014-07-22 11:11:19 +00:00
|
|
|
|
2020-08-02 22:22:19 +00:00
|
|
|
SPDX-FileCopyrightText: 2014 Martin Gräßlin <mgraesslin@kde.org>
|
2014-07-22 11:11:19 +00:00
|
|
|
|
2020-08-02 22:22:19 +00:00
|
|
|
SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
*/
|
2014-07-22 11:11:19 +00:00
|
|
|
#include "decoratedclient.h"
|
2019-02-19 10:18:28 +00:00
|
|
|
#include "decorationbridge.h"
|
2015-04-29 10:02:54 +00:00
|
|
|
#include "decorationpalette.h"
|
2014-07-22 11:11:19 +00:00
|
|
|
#include "decorationrenderer.h"
|
2015-12-03 16:29:06 +00:00
|
|
|
#include "abstract_client.h"
|
2014-07-22 11:11:19 +00:00
|
|
|
#include "composite.h"
|
|
|
|
#include "cursor.h"
|
|
|
|
#include "options.h"
|
2017-08-20 20:15:21 +00:00
|
|
|
#include "platform.h"
|
2014-07-22 11:11:19 +00:00
|
|
|
#include "workspace.h"
|
|
|
|
|
|
|
|
#include <KDecoration2/DecoratedClient>
|
|
|
|
#include <KDecoration2/Decoration>
|
|
|
|
|
|
|
|
#include <QDebug>
|
Improve tooltips behavior
Summary:
Window buttons tooltips used to appear on hover immediately. As
the result, they mostly appeared when not needed e.g. when user
was closing a window, or when the mouse pointer slightly touched
a button while being moved elsewhere.
This commit changes the tooltips behavior to WakeUp-FallAsleep
approach used by Widgets.
BUG: 392765
FIXED-IN: 5.13
Reviewers: #kwin, graesslin, broulik, #plasma
Reviewed By: #kwin, graesslin, #plasma
Subscribers: zzag, broulik, kwin, hein
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D12404
2018-04-22 17:40:54 +00:00
|
|
|
#include <QStyle>
|
2018-01-18 18:59:17 +00:00
|
|
|
#include <QToolTip>
|
2014-07-22 11:11:19 +00:00
|
|
|
|
|
|
|
namespace KWin
|
|
|
|
{
|
|
|
|
namespace Decoration
|
|
|
|
{
|
|
|
|
|
2015-12-03 16:29:06 +00:00
|
|
|
DecoratedClientImpl::DecoratedClientImpl(AbstractClient *client, KDecoration2::DecoratedClient *decoratedClient, KDecoration2::Decoration *decoration)
|
2014-07-22 11:11:19 +00:00
|
|
|
: QObject()
|
2017-01-11 09:21:03 +00:00
|
|
|
, ApplicationMenuEnabledDecoratedClientPrivate(decoratedClient, decoration)
|
2014-07-22 11:11:19 +00:00
|
|
|
, m_client(client)
|
2016-08-10 08:48:55 +00:00
|
|
|
, m_clientSize(client->clientSize())
|
2014-07-22 11:11:19 +00:00
|
|
|
, m_renderer(nullptr)
|
|
|
|
{
|
|
|
|
createRenderer();
|
2014-10-21 05:46:44 +00:00
|
|
|
client->setDecoratedClient(QPointer<DecoratedClientImpl>(this));
|
2015-12-03 16:29:06 +00:00
|
|
|
connect(client, &AbstractClient::activeChanged, this,
|
2014-07-22 11:11:19 +00:00
|
|
|
[decoratedClient, client]() {
|
|
|
|
emit decoratedClient->activeChanged(client->isActive());
|
|
|
|
}
|
|
|
|
);
|
2020-06-01 11:09:57 +00:00
|
|
|
connect(client, &AbstractClient::clientGeometryChanged, this,
|
2016-08-10 08:48:55 +00:00
|
|
|
[decoratedClient, this]() {
|
|
|
|
if (m_client->clientSize() == m_clientSize) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
const auto oldSize = m_clientSize;
|
|
|
|
m_clientSize = m_client->clientSize();
|
|
|
|
if (oldSize.width() != m_clientSize.width()) {
|
|
|
|
emit decoratedClient->widthChanged(m_clientSize.width());
|
|
|
|
}
|
|
|
|
if (oldSize.height() != m_clientSize.height()) {
|
|
|
|
emit decoratedClient->heightChanged(m_clientSize.height());
|
|
|
|
}
|
2020-01-27 13:16:02 +00:00
|
|
|
emit decoratedClient->sizeChanged(m_clientSize);
|
2014-07-22 11:11:19 +00:00
|
|
|
}
|
|
|
|
);
|
2015-12-03 16:29:06 +00:00
|
|
|
connect(client, &AbstractClient::desktopChanged, this,
|
2014-07-22 11:11:19 +00:00
|
|
|
[decoratedClient, client]() {
|
|
|
|
emit decoratedClient->onAllDesktopsChanged(client->isOnAllDesktops());
|
|
|
|
}
|
|
|
|
);
|
2015-12-03 16:29:06 +00:00
|
|
|
connect(client, &AbstractClient::captionChanged, this,
|
2014-07-22 11:11:19 +00:00
|
|
|
[decoratedClient, client]() {
|
|
|
|
emit decoratedClient->captionChanged(client->caption());
|
|
|
|
}
|
|
|
|
);
|
2015-12-03 16:29:06 +00:00
|
|
|
connect(client, &AbstractClient::iconChanged, this,
|
2014-07-22 11:11:19 +00:00
|
|
|
[decoratedClient, client]() {
|
|
|
|
emit decoratedClient->iconChanged(client->icon());
|
|
|
|
}
|
|
|
|
);
|
2015-12-03 16:29:06 +00:00
|
|
|
connect(client, &AbstractClient::shadeChanged, this,
|
2016-01-07 22:12:40 +00:00
|
|
|
&Decoration::DecoratedClientImpl::signalShadeChange);
|
2015-12-03 16:29:06 +00:00
|
|
|
connect(client, &AbstractClient::keepAboveChanged, decoratedClient, &KDecoration2::DecoratedClient::keepAboveChanged);
|
|
|
|
connect(client, &AbstractClient::keepBelowChanged, decoratedClient, &KDecoration2::DecoratedClient::keepBelowChanged);
|
2019-02-20 13:09:37 +00:00
|
|
|
connect(Compositor::self(), &Compositor::aboutToToggleCompositing, this, &DecoratedClientImpl::destroyRenderer);
|
2016-05-23 07:28:27 +00:00
|
|
|
m_compositorToggledConnection = connect(Compositor::self(), &Compositor::compositingToggled, this,
|
2014-07-22 11:11:19 +00:00
|
|
|
[this, decoration]() {
|
|
|
|
createRenderer();
|
|
|
|
decoration->update();
|
|
|
|
}
|
|
|
|
);
|
2016-05-23 07:28:27 +00:00
|
|
|
connect(Compositor::self(), &Compositor::aboutToDestroy, this,
|
|
|
|
[this] {
|
|
|
|
disconnect(m_compositorToggledConnection);
|
|
|
|
m_compositorToggledConnection = QMetaObject::Connection();
|
|
|
|
}
|
|
|
|
);
|
2015-12-03 16:29:06 +00:00
|
|
|
connect(client, &AbstractClient::quickTileModeChanged, decoratedClient,
|
2014-07-25 09:20:34 +00:00
|
|
|
[this, decoratedClient]() {
|
2014-11-11 13:33:31 +00:00
|
|
|
emit decoratedClient->adjacentScreenEdgesChanged(adjacentScreenEdges());
|
2014-07-25 09:20:34 +00:00
|
|
|
}
|
|
|
|
);
|
2015-12-03 16:29:06 +00:00
|
|
|
connect(client, &AbstractClient::closeableChanged, decoratedClient, &KDecoration2::DecoratedClient::closeableChanged);
|
|
|
|
connect(client, &AbstractClient::shadeableChanged, decoratedClient, &KDecoration2::DecoratedClient::shadeableChanged);
|
|
|
|
connect(client, &AbstractClient::minimizeableChanged, decoratedClient, &KDecoration2::DecoratedClient::minimizeableChanged);
|
|
|
|
connect(client, &AbstractClient::maximizeableChanged, decoratedClient, &KDecoration2::DecoratedClient::maximizeableChanged);
|
2015-01-08 11:45:40 +00:00
|
|
|
|
2015-12-03 16:29:06 +00:00
|
|
|
connect(client, &AbstractClient::paletteChanged, decoratedClient, &KDecoration2::DecoratedClient::paletteChanged);
|
2017-01-11 09:21:03 +00:00
|
|
|
|
|
|
|
connect(client, &AbstractClient::hasApplicationMenuChanged, decoratedClient, &KDecoration2::DecoratedClient::hasApplicationMenuChanged);
|
|
|
|
connect(client, &AbstractClient::applicationMenuActiveChanged, decoratedClient, &KDecoration2::DecoratedClient::applicationMenuActiveChanged);
|
Improve tooltips behavior
Summary:
Window buttons tooltips used to appear on hover immediately. As
the result, they mostly appeared when not needed e.g. when user
was closing a window, or when the mouse pointer slightly touched
a button while being moved elsewhere.
This commit changes the tooltips behavior to WakeUp-FallAsleep
approach used by Widgets.
BUG: 392765
FIXED-IN: 5.13
Reviewers: #kwin, graesslin, broulik, #plasma
Reviewed By: #kwin, graesslin, #plasma
Subscribers: zzag, broulik, kwin, hein
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D12404
2018-04-22 17:40:54 +00:00
|
|
|
|
|
|
|
m_toolTipWakeUp.setSingleShot(true);
|
|
|
|
connect(&m_toolTipWakeUp, &QTimer::timeout, this,
|
|
|
|
[this]() {
|
|
|
|
int fallAsleepDelay = QApplication::style()->styleHint(QStyle::SH_ToolTip_FallAsleepDelay);
|
|
|
|
this->m_toolTipFallAsleep.setRemainingTime(fallAsleepDelay);
|
|
|
|
|
2020-04-02 16:18:01 +00:00
|
|
|
QToolTip::showText(Cursors::self()->mouse()->pos(), this->m_toolTipText);
|
2018-06-03 11:29:36 +00:00
|
|
|
m_toolTipShowing = true;
|
Improve tooltips behavior
Summary:
Window buttons tooltips used to appear on hover immediately. As
the result, they mostly appeared when not needed e.g. when user
was closing a window, or when the mouse pointer slightly touched
a button while being moved elsewhere.
This commit changes the tooltips behavior to WakeUp-FallAsleep
approach used by Widgets.
BUG: 392765
FIXED-IN: 5.13
Reviewers: #kwin, graesslin, broulik, #plasma
Reviewed By: #kwin, graesslin, #plasma
Subscribers: zzag, broulik, kwin, hein
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D12404
2018-04-22 17:40:54 +00:00
|
|
|
}
|
|
|
|
);
|
2014-07-22 11:11:19 +00:00
|
|
|
}
|
|
|
|
|
2018-06-03 11:29:36 +00:00
|
|
|
DecoratedClientImpl::~DecoratedClientImpl()
|
|
|
|
{
|
|
|
|
if (m_toolTipShowing) {
|
|
|
|
requestHideToolTip();
|
|
|
|
}
|
|
|
|
}
|
2014-07-22 11:11:19 +00:00
|
|
|
|
2016-01-07 22:12:40 +00:00
|
|
|
void DecoratedClientImpl::signalShadeChange() {
|
|
|
|
emit decoratedClient()->shadedChanged(m_client->isShade());
|
|
|
|
}
|
|
|
|
|
2014-10-23 08:56:43 +00:00
|
|
|
#define DELEGATE(type, name, clientName) \
|
2014-07-22 11:11:19 +00:00
|
|
|
type DecoratedClientImpl::name() const \
|
|
|
|
{ \
|
2014-10-23 08:56:43 +00:00
|
|
|
return m_client->clientName(); \
|
2014-07-22 11:11:19 +00:00
|
|
|
}
|
|
|
|
|
2014-10-23 08:56:43 +00:00
|
|
|
#define DELEGATE2(type, name) DELEGATE(type, name, name)
|
|
|
|
|
|
|
|
DELEGATE2(QString, caption)
|
|
|
|
DELEGATE2(bool, isActive)
|
|
|
|
DELEGATE2(bool, isCloseable)
|
|
|
|
DELEGATE(bool, isMaximizeable, isMaximizable)
|
|
|
|
DELEGATE(bool, isMinimizeable, isMinimizable)
|
|
|
|
DELEGATE2(bool, isModal)
|
|
|
|
DELEGATE(bool, isMoveable, isMovable)
|
|
|
|
DELEGATE(bool, isResizeable, isResizable)
|
|
|
|
DELEGATE2(bool, isShadeable)
|
|
|
|
DELEGATE2(bool, providesContextHelp)
|
|
|
|
DELEGATE2(int, desktop)
|
|
|
|
DELEGATE2(bool, isOnAllDesktops)
|
|
|
|
DELEGATE2(QPalette, palette)
|
|
|
|
DELEGATE2(QIcon, icon)
|
2014-07-22 11:11:19 +00:00
|
|
|
|
2014-10-23 08:56:43 +00:00
|
|
|
#undef DELEGATE2
|
2014-07-22 11:11:19 +00:00
|
|
|
#undef DELEGATE
|
|
|
|
|
|
|
|
#define DELEGATE(type, name, clientName) \
|
|
|
|
type DecoratedClientImpl::name() const \
|
|
|
|
{ \
|
|
|
|
return m_client->clientName(); \
|
|
|
|
}
|
|
|
|
|
|
|
|
DELEGATE(bool, isKeepAbove, keepAbove)
|
|
|
|
DELEGATE(bool, isKeepBelow, keepBelow)
|
|
|
|
DELEGATE(bool, isShaded, isShade)
|
2016-05-02 15:47:39 +00:00
|
|
|
DELEGATE(WId, windowId, windowId)
|
2014-07-22 11:11:19 +00:00
|
|
|
DELEGATE(WId, decorationId, frameId)
|
|
|
|
|
|
|
|
#undef DELEGATE
|
|
|
|
|
|
|
|
#define DELEGATE(name, op) \
|
|
|
|
void DecoratedClientImpl::name() \
|
|
|
|
{ \
|
2014-12-02 09:39:38 +00:00
|
|
|
Workspace::self()->performWindowOperation(m_client, Options::op); \
|
2014-07-22 11:11:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
DELEGATE(requestToggleShade, ShadeOp)
|
|
|
|
DELEGATE(requestToggleOnAllDesktops, OnAllDesktopsOp)
|
|
|
|
DELEGATE(requestToggleKeepAbove, KeepAboveOp)
|
|
|
|
DELEGATE(requestToggleKeepBelow, KeepBelowOp)
|
|
|
|
|
|
|
|
#undef DELEGATE
|
|
|
|
|
|
|
|
#define DELEGATE(name, clientName) \
|
|
|
|
void DecoratedClientImpl::name() \
|
|
|
|
{ \
|
|
|
|
m_client->clientName(); \
|
|
|
|
}
|
|
|
|
|
|
|
|
DELEGATE(requestContextHelp, showContextHelp)
|
|
|
|
DELEGATE(requestMinimize, minimize)
|
|
|
|
|
|
|
|
#undef DELEGATE
|
|
|
|
|
2015-10-19 15:26:17 +00:00
|
|
|
void DecoratedClientImpl::requestClose()
|
|
|
|
{
|
|
|
|
QMetaObject::invokeMethod(m_client, "closeWindow", Qt::QueuedConnection);
|
|
|
|
}
|
|
|
|
|
2015-03-31 13:26:42 +00:00
|
|
|
QColor DecoratedClientImpl::color(KDecoration2::ColorGroup group, KDecoration2::ColorRole role) const
|
|
|
|
{
|
|
|
|
auto dp = m_client->decorationPalette();
|
|
|
|
if (dp) {
|
|
|
|
return dp->color(group, role);
|
|
|
|
}
|
|
|
|
|
|
|
|
return QColor();
|
|
|
|
}
|
|
|
|
|
2018-01-18 18:59:17 +00:00
|
|
|
void DecoratedClientImpl::requestShowToolTip(const QString &text)
|
|
|
|
{
|
2019-02-19 10:18:28 +00:00
|
|
|
if (!DecorationBridge::self()->showToolTips()) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
Improve tooltips behavior
Summary:
Window buttons tooltips used to appear on hover immediately. As
the result, they mostly appeared when not needed e.g. when user
was closing a window, or when the mouse pointer slightly touched
a button while being moved elsewhere.
This commit changes the tooltips behavior to WakeUp-FallAsleep
approach used by Widgets.
BUG: 392765
FIXED-IN: 5.13
Reviewers: #kwin, graesslin, broulik, #plasma
Reviewed By: #kwin, graesslin, #plasma
Subscribers: zzag, broulik, kwin, hein
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D12404
2018-04-22 17:40:54 +00:00
|
|
|
m_toolTipText = text;
|
|
|
|
|
|
|
|
int wakeUpDelay = QApplication::style()->styleHint(QStyle::SH_ToolTip_WakeUpDelay);
|
|
|
|
m_toolTipWakeUp.start(m_toolTipFallAsleep.hasExpired() ? wakeUpDelay : 20);
|
2018-01-18 18:59:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void DecoratedClientImpl::requestHideToolTip()
|
|
|
|
{
|
Improve tooltips behavior
Summary:
Window buttons tooltips used to appear on hover immediately. As
the result, they mostly appeared when not needed e.g. when user
was closing a window, or when the mouse pointer slightly touched
a button while being moved elsewhere.
This commit changes the tooltips behavior to WakeUp-FallAsleep
approach used by Widgets.
BUG: 392765
FIXED-IN: 5.13
Reviewers: #kwin, graesslin, broulik, #plasma
Reviewed By: #kwin, graesslin, #plasma
Subscribers: zzag, broulik, kwin, hein
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D12404
2018-04-22 17:40:54 +00:00
|
|
|
m_toolTipWakeUp.stop();
|
2018-01-18 18:59:17 +00:00
|
|
|
QToolTip::hideText();
|
2018-06-03 11:29:36 +00:00
|
|
|
m_toolTipShowing = false;
|
2018-01-18 18:59:17 +00:00
|
|
|
}
|
|
|
|
|
2014-07-22 11:11:19 +00:00
|
|
|
void DecoratedClientImpl::requestShowWindowMenu()
|
|
|
|
{
|
|
|
|
// TODO: add rect to requestShowWindowMenu
|
2020-04-02 16:18:01 +00:00
|
|
|
Workspace::self()->showWindowMenu(QRect(Cursors::self()->mouse()->pos(), Cursors::self()->mouse()->pos()), m_client);
|
2014-07-22 11:11:19 +00:00
|
|
|
}
|
|
|
|
|
2017-01-11 09:21:03 +00:00
|
|
|
void DecoratedClientImpl::requestShowApplicationMenu(const QRect &rect, int actionId)
|
|
|
|
{
|
|
|
|
Workspace::self()->showApplicationMenu(rect, m_client, actionId);
|
|
|
|
}
|
|
|
|
|
|
|
|
void DecoratedClientImpl::showApplicationMenu(int actionId)
|
|
|
|
{
|
|
|
|
decoration()->showApplicationMenu(actionId);
|
|
|
|
}
|
|
|
|
|
2014-11-11 08:53:54 +00:00
|
|
|
void DecoratedClientImpl::requestToggleMaximization(Qt::MouseButtons buttons)
|
2014-07-22 11:11:19 +00:00
|
|
|
{
|
2016-05-11 11:33:03 +00:00
|
|
|
QMetaObject::invokeMethod(this, "delayedRequestToggleMaximization", Qt::QueuedConnection, Q_ARG(Options::WindowOperation, options->operationMaxButtonClick(buttons)));
|
|
|
|
}
|
|
|
|
|
|
|
|
void DecoratedClientImpl::delayedRequestToggleMaximization(Options::WindowOperation operation)
|
|
|
|
{
|
|
|
|
Workspace::self()->performWindowOperation(m_client, operation);
|
2014-07-22 11:11:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int DecoratedClientImpl::width() const
|
|
|
|
{
|
2016-08-10 08:48:55 +00:00
|
|
|
return m_clientSize.width();
|
2014-07-22 11:11:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int DecoratedClientImpl::height() const
|
|
|
|
{
|
2016-08-10 08:48:55 +00:00
|
|
|
return m_clientSize.height();
|
2014-07-22 11:11:19 +00:00
|
|
|
}
|
|
|
|
|
2020-01-27 13:16:02 +00:00
|
|
|
QSize DecoratedClientImpl::size() const
|
|
|
|
{
|
|
|
|
return m_clientSize;
|
|
|
|
}
|
|
|
|
|
2014-07-22 11:11:19 +00:00
|
|
|
bool DecoratedClientImpl::isMaximizedVertically() const
|
|
|
|
{
|
2018-10-07 16:51:42 +00:00
|
|
|
return m_client->requestedMaximizeMode() & MaximizeVertical;
|
2014-07-22 11:11:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bool DecoratedClientImpl::isMaximized() const
|
|
|
|
{
|
|
|
|
return isMaximizedHorizontally() && isMaximizedVertically();
|
|
|
|
}
|
|
|
|
|
|
|
|
bool DecoratedClientImpl::isMaximizedHorizontally() const
|
|
|
|
{
|
2018-10-07 16:51:42 +00:00
|
|
|
return m_client->requestedMaximizeMode() & MaximizeHorizontal;
|
2014-07-22 11:11:19 +00:00
|
|
|
}
|
|
|
|
|
2014-11-11 13:33:31 +00:00
|
|
|
Qt::Edges DecoratedClientImpl::adjacentScreenEdges() const
|
2014-07-25 09:20:34 +00:00
|
|
|
{
|
|
|
|
Qt::Edges edges;
|
2017-07-18 19:12:37 +00:00
|
|
|
const QuickTileMode mode = m_client->quickTileMode();
|
|
|
|
if (mode.testFlag(QuickTileFlag::Left)) {
|
2014-07-25 09:20:34 +00:00
|
|
|
edges |= Qt::LeftEdge;
|
2017-07-18 19:12:37 +00:00
|
|
|
if (!mode.testFlag(QuickTileFlag::Top) && !mode.testFlag(QuickTileFlag::Bottom)) {
|
2014-07-25 09:20:34 +00:00
|
|
|
// using complete side
|
|
|
|
edges |= Qt::TopEdge | Qt::BottomEdge;
|
|
|
|
}
|
|
|
|
}
|
2017-07-18 19:12:37 +00:00
|
|
|
if (mode.testFlag(QuickTileFlag::Top)) {
|
2014-07-25 09:20:34 +00:00
|
|
|
edges |= Qt::TopEdge;
|
|
|
|
}
|
2017-07-18 19:12:37 +00:00
|
|
|
if (mode.testFlag(QuickTileFlag::Right)) {
|
2014-07-25 09:20:34 +00:00
|
|
|
edges |= Qt::RightEdge;
|
2017-07-18 19:12:37 +00:00
|
|
|
if (!mode.testFlag(QuickTileFlag::Top) && !mode.testFlag(QuickTileFlag::Bottom)) {
|
2014-07-25 09:20:34 +00:00
|
|
|
// using complete side
|
|
|
|
edges |= Qt::TopEdge | Qt::BottomEdge;
|
|
|
|
}
|
|
|
|
}
|
2017-07-18 19:12:37 +00:00
|
|
|
if (mode.testFlag(QuickTileFlag::Bottom)) {
|
2014-07-25 09:20:34 +00:00
|
|
|
edges |= Qt::BottomEdge;
|
|
|
|
}
|
|
|
|
return edges;
|
|
|
|
}
|
|
|
|
|
2017-01-11 09:21:03 +00:00
|
|
|
bool DecoratedClientImpl::hasApplicationMenu() const
|
|
|
|
{
|
|
|
|
return m_client->hasApplicationMenu();
|
|
|
|
}
|
|
|
|
|
|
|
|
bool DecoratedClientImpl::isApplicationMenuActive() const
|
|
|
|
{
|
|
|
|
return m_client->applicationMenuActive();
|
|
|
|
}
|
|
|
|
|
2014-07-22 11:11:19 +00:00
|
|
|
void DecoratedClientImpl::createRenderer()
|
|
|
|
{
|
2017-08-20 20:15:21 +00:00
|
|
|
m_renderer = kwinApp()->platform()->createDecorationRenderer(this);
|
2014-07-22 11:11:19 +00:00
|
|
|
}
|
|
|
|
|
2014-07-25 05:14:21 +00:00
|
|
|
void DecoratedClientImpl::destroyRenderer()
|
|
|
|
{
|
|
|
|
delete m_renderer;
|
|
|
|
m_renderer = nullptr;
|
|
|
|
}
|
|
|
|
|
2014-07-22 11:11:19 +00:00
|
|
|
}
|
|
|
|
}
|