kwin/src/layershellv1client.h
Vlad Zahorodnii 5b3c87f105 Rename LayerShellV1Client::output() to desiredOutput()
This is to avoid hitting bugs if the Toplevel class gains an output
property. The new name also better describes what the function returns.
2021-08-25 13:58:49 +00:00

68 lines
1.9 KiB
C++

/*
SPDX-FileCopyrightText: 2020 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
SPDX-License-Identifier: GPL-2.0-or-later
*/
#pragma once
#include "waylandclient.h"
namespace KWaylandServer
{
class LayerSurfaceV1Interface;
}
namespace KWin
{
class AbstractOutput;
class LayerShellV1Integration;
class LayerShellV1Client : public WaylandClient
{
Q_OBJECT
public:
explicit LayerShellV1Client(KWaylandServer::LayerSurfaceV1Interface *shellSurface,
AbstractOutput *output,
LayerShellV1Integration *integration);
KWaylandServer::LayerSurfaceV1Interface *shellSurface() const;
AbstractOutput *desiredOutput() const;
NET::WindowType windowType(bool direct = false, int supported_types = 0) const override;
bool isPlaceable() const override;
bool isCloseable() const override;
bool isMovable() const override;
bool isMovableAcrossScreens() const override;
bool isResizable() const override;
bool takeFocus() override;
bool wantsInput() const override;
StrutRect strutRect(StrutArea area) const override;
bool hasStrut() const override;
void destroyClient() override;
void closeWindow() override;
void setVirtualKeyboardGeometry(const QRect &geo) override;
protected:
Layer belongsToLayer() const override;
bool acceptsFocus() const override;
void moveResizeInternal(const QRect &rect, MoveResizeMode mode) override;
private:
void handleSizeChanged();
void handleUnmapped();
void handleCommitted();
void handleAcceptsFocusChanged();
void handleOutputEnabledChanged();
void handleOutputDestroyed();
void scheduleRearrange();
AbstractOutput *m_desiredOutput;
LayerShellV1Integration *m_integration;
KWaylandServer::LayerSurfaceV1Interface *m_shellSurface;
NET::WindowType m_windowType;
};
} // namespace KWin