backends/x11: Make OverlayWindow factory function private to the backend
The concept of an overlay window is specific to X11 and it's not present on other platforms.
This commit is contained in:
parent
1f7bfc7902
commit
084f92bd7a
6 changed files with 4 additions and 24 deletions
|
@ -16,6 +16,7 @@
|
|||
#include "surfaceitem_x11.h"
|
||||
#include "workspace.h"
|
||||
#include "x11_standalone_logging.h"
|
||||
#include "x11_standalone_overlaywindow.h"
|
||||
#include "x11_standalone_platform.h"
|
||||
|
||||
#include <QOpenGLContext>
|
||||
|
@ -45,7 +46,7 @@ bool EglLayer::endFrame(const QRegion &renderedRegion, const QRegion &damagedReg
|
|||
EglBackend::EglBackend(Display *display, X11StandalonePlatform *backend)
|
||||
: EglOnXBackend(kwinApp()->x11Connection(), display, kwinApp()->x11RootWindow())
|
||||
, m_backend(backend)
|
||||
, m_overlayWindow(backend->createOverlayWindow())
|
||||
, m_overlayWindow(std::make_unique<OverlayWindowX11>())
|
||||
, m_layer(std::make_unique<EglLayer>(this))
|
||||
{
|
||||
// There is no any way to determine when a buffer swap completes with EGL. Fallback
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include "x11_standalone_glxconvenience.h"
|
||||
#include "x11_standalone_logging.h"
|
||||
#include "x11_standalone_omlsynccontrolvsyncmonitor.h"
|
||||
#include "x11_standalone_overlaywindow.h"
|
||||
#include "x11_standalone_platform.h"
|
||||
#include "x11_standalone_sgivideosyncvsyncmonitor.h"
|
||||
// kwin
|
||||
|
@ -121,7 +122,7 @@ bool GlxLayer::endFrame(const QRegion &renderedRegion, const QRegion &damagedReg
|
|||
|
||||
GlxBackend::GlxBackend(Display *display, X11StandalonePlatform *backend)
|
||||
: OpenGLBackend()
|
||||
, m_overlayWindow(kwinApp()->platform()->createOverlayWindow())
|
||||
, m_overlayWindow(std::make_unique<OverlayWindowX11>())
|
||||
, window(None)
|
||||
, fbconfig(nullptr)
|
||||
, glxWindow(None)
|
||||
|
|
|
@ -37,7 +37,6 @@
|
|||
#include "x11_standalone_logging.h"
|
||||
#include "x11_standalone_non_composited_outline.h"
|
||||
#include "x11_standalone_output.h"
|
||||
#include "x11_standalone_overlaywindow.h"
|
||||
#include "x11_standalone_screenedges_filter.h"
|
||||
#include "xkb.h"
|
||||
|
||||
|
@ -242,11 +241,6 @@ void X11StandalonePlatform::startInteractivePositionSelection(std::function<void
|
|||
m_windowSelector->start(callback);
|
||||
}
|
||||
|
||||
std::unique_ptr<OverlayWindow> X11StandalonePlatform::createOverlayWindow()
|
||||
{
|
||||
return std::make_unique<OverlayWindowX11>();
|
||||
}
|
||||
|
||||
std::unique_ptr<OutlineVisual> X11StandalonePlatform::createOutline(Outline *outline)
|
||||
{
|
||||
// first try composited Outline
|
||||
|
|
|
@ -42,10 +42,7 @@ public:
|
|||
void createPlatformCursor(QObject *parent = nullptr) override;
|
||||
void startInteractiveWindowSelection(std::function<void(KWin::Window *)> callback, const QByteArray &cursorName = QByteArray()) override;
|
||||
void startInteractivePositionSelection(std::function<void(const QPoint &)> callback) override;
|
||||
|
||||
PlatformCursorImage cursorImage() const override;
|
||||
|
||||
std::unique_ptr<OverlayWindow> createOverlayWindow() override;
|
||||
std::unique_ptr<OutlineVisual> createOutline(Outline *outline) override;
|
||||
void createEffectsHandler(Compositor *compositor, Scene *scene) override;
|
||||
QVector<CompositingType> supportedCompositors() const override;
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
#include "outline.h"
|
||||
#include "output.h"
|
||||
#include "outputconfiguration.h"
|
||||
#include "overlaywindow.h"
|
||||
#include "pointer_input.h"
|
||||
#include "qpainterbackend.h"
|
||||
#include "scene.h"
|
||||
|
@ -170,11 +169,6 @@ void Platform::startInteractivePositionSelection(std::function<void(const QPoint
|
|||
input()->startInteractivePositionSelection(callback);
|
||||
}
|
||||
|
||||
std::unique_ptr<OverlayWindow> Platform::createOverlayWindow()
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
std::unique_ptr<OutlineVisual> Platform::createOutline(Outline *outline)
|
||||
{
|
||||
if (Compositor::compositing()) {
|
||||
|
|
|
@ -28,7 +28,6 @@ class Edge;
|
|||
class Compositor;
|
||||
class DmaBufTexture;
|
||||
class InputBackend;
|
||||
class OverlayWindow;
|
||||
class OpenGLBackend;
|
||||
class Outline;
|
||||
class OutlineVisual;
|
||||
|
@ -171,12 +170,6 @@ public:
|
|||
m_initialOutputScale = scale;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates the OverlayWindow required for X11 based compositors.
|
||||
* Default implementation returns @c nullptr.
|
||||
*/
|
||||
virtual std::unique_ptr<OverlayWindow> createOverlayWindow();
|
||||
|
||||
/**
|
||||
* Creates the OutlineVisual for the given @p outline.
|
||||
* Default implementation creates an OutlineVisual suited for composited usage.
|
||||
|
|
Loading…
Reference in a new issue