client: Remove support for surface extension
Qt Wayland Compositor does not implement this anymore. Change-Id: If7a780218991aa35e9a34cd0eda3ae59a99844a2 Reviewed-by: David Edmundson <davidedmundson@kde.org>
This commit is contained in:
parent
c1e0ffd286
commit
56e4b5fa01
@ -1,62 +0,0 @@
|
||||
<protocol name="surface_extension">
|
||||
|
||||
<copyright>
|
||||
Copyright (C) 2015 The Qt Company Ltd.
|
||||
SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
||||
</copyright>
|
||||
|
||||
<interface name="qt_surface_extension" version="1">
|
||||
<request name="get_extended_surface">
|
||||
<arg name="id" type="new_id" interface="qt_extended_surface"/>
|
||||
<arg name="surface" type="object" interface="wl_surface"/>
|
||||
</request>
|
||||
</interface>
|
||||
|
||||
<interface name="qt_extended_surface" version="1">
|
||||
<event name="onscreen_visibility">
|
||||
<arg name="visible" type="int"/>
|
||||
</event>
|
||||
|
||||
<event name="set_generic_property">
|
||||
<arg name="name" type="string"/>
|
||||
<arg name="value" type="array"/>
|
||||
</event>
|
||||
|
||||
<event name="close">
|
||||
</event>
|
||||
|
||||
<request name="update_generic_property">
|
||||
<arg name="name" type="string"/>
|
||||
<arg name="value" type="array"/>
|
||||
</request>
|
||||
|
||||
<enum name="orientation">
|
||||
<entry name="PrimaryOrientation" value="0"/>
|
||||
<entry name="PortraitOrientation" value="1"/>
|
||||
<entry name="LandscapeOrientation" value="2"/>
|
||||
<entry name="InvertedPortraitOrientation" value="4"/>
|
||||
<entry name="InvertedLandscapeOrientation" value="8"/>
|
||||
</enum>
|
||||
|
||||
<request name="set_content_orientation_mask">
|
||||
<arg name="orientation" type="int"/>
|
||||
</request>
|
||||
|
||||
<enum name="windowflag">
|
||||
<entry name="OverridesSystemGestures" value="1"/>
|
||||
<entry name="StaysOnTop" value="2"/>
|
||||
<entry name="BypassWindowManager" value="4"/>
|
||||
</enum>
|
||||
|
||||
<request name="set_window_flags">
|
||||
<arg name="flags" type="int"/>
|
||||
</request>
|
||||
|
||||
<request name="raise">
|
||||
</request>
|
||||
|
||||
<request name="lower">
|
||||
</request>
|
||||
|
||||
</interface>
|
||||
</protocol>
|
@ -30,7 +30,6 @@ qt_internal_add_module(WaylandClient
|
||||
qwaylanddecorationfactory.cpp qwaylanddecorationfactory_p.h
|
||||
qwaylanddecorationplugin.cpp qwaylanddecorationplugin_p.h
|
||||
qwaylanddisplay.cpp qwaylanddisplay_p.h
|
||||
qwaylandextendedsurface.cpp qwaylandextendedsurface_p.h
|
||||
qwaylandfractionalscale.cpp qwaylandfractionalscale_p.h
|
||||
qwaylandinputcontext.cpp qwaylandinputcontext_p.h
|
||||
qwaylandtextinputv1.cpp qwaylandtextinputv1_p.h
|
||||
@ -99,7 +98,6 @@ qt6_generate_wayland_protocol_client_sources(WaylandClient
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../extensions/qt-key-unstable-v1.xml
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../extensions/qt-text-input-method-unstable-v1.xml
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../extensions/qt-windowmanager.xml
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../extensions/surface-extension.xml
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../extensions/touch-extension.xml
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hardwareintegration/../../extensions/hardware-integration.xml
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hardwareintegration/../../extensions/server-buffer-extension.xml
|
||||
|
@ -8,7 +8,6 @@
|
||||
#include <QtWaylandClient/private/qwaylandinputdevice_p.h>
|
||||
#include <QtWaylandClient/private/qwaylandabstractdecoration_p.h>
|
||||
#include <QtWaylandClient/private/qwaylandscreen_p.h>
|
||||
#include <QtWaylandClient/private/qwaylandextendedsurface_p.h>
|
||||
|
||||
#include <QtCore/QDebug>
|
||||
|
||||
@ -21,9 +20,6 @@ QWaylandWlShellSurface::QWaylandWlShellSurface(struct ::wl_shell_surface *shell_
|
||||
, QtWayland::wl_shell_surface(shell_surface)
|
||||
, m_window(window)
|
||||
{
|
||||
if (window->display()->windowExtension())
|
||||
m_extendedWindow = new QWaylandExtendedSurface(window);
|
||||
|
||||
Qt::WindowType type = window->window()->type();
|
||||
auto *transientParent = window->transientParent();
|
||||
if (type == Qt::Popup && transientParent && transientParent->wlSurface())
|
||||
@ -37,7 +33,6 @@ QWaylandWlShellSurface::QWaylandWlShellSurface(struct ::wl_shell_surface *shell_
|
||||
QWaylandWlShellSurface::~QWaylandWlShellSurface()
|
||||
{
|
||||
wl_shell_surface_destroy(object());
|
||||
delete m_extendedWindow;
|
||||
}
|
||||
|
||||
bool QWaylandWlShellSurface::resize(QWaylandInputDevice *inputDevice, Qt::Edges edges)
|
||||
@ -64,36 +59,6 @@ void QWaylandWlShellSurface::setAppId(const QString & appId)
|
||||
return QtWayland::wl_shell_surface::set_class(appId);
|
||||
}
|
||||
|
||||
void QWaylandWlShellSurface::raise()
|
||||
{
|
||||
if (m_extendedWindow)
|
||||
m_extendedWindow->raise();
|
||||
}
|
||||
|
||||
void QWaylandWlShellSurface::lower()
|
||||
{
|
||||
if (m_extendedWindow)
|
||||
m_extendedWindow->lower();
|
||||
}
|
||||
|
||||
void QWaylandWlShellSurface::setContentOrientationMask(Qt::ScreenOrientations orientation)
|
||||
{
|
||||
if (m_extendedWindow)
|
||||
m_extendedWindow->setContentOrientationMask(orientation);
|
||||
}
|
||||
|
||||
void QWaylandWlShellSurface::setWindowFlags(Qt::WindowFlags flags)
|
||||
{
|
||||
if (m_extendedWindow)
|
||||
m_extendedWindow->setWindowFlags(flags);
|
||||
}
|
||||
|
||||
void QWaylandWlShellSurface::sendProperty(const QString &name, const QVariant &value)
|
||||
{
|
||||
if (m_extendedWindow)
|
||||
m_extendedWindow->updateGenericProperty(name, value);
|
||||
}
|
||||
|
||||
void QWaylandWlShellSurface::applyConfigure()
|
||||
{
|
||||
if ((m_pending.states & (Qt::WindowMaximized|Qt::WindowFullScreen))
|
||||
|
@ -48,12 +48,6 @@ public:
|
||||
void setTitle(const QString & title) override;
|
||||
void setAppId(const QString &appId) override;
|
||||
|
||||
void raise() override;
|
||||
void lower() override;
|
||||
void setContentOrientationMask(Qt::ScreenOrientations orientation) override;
|
||||
void setWindowFlags(Qt::WindowFlags flags) override;
|
||||
void sendProperty(const QString &name, const QVariant &value) override;
|
||||
|
||||
void applyConfigure() override;
|
||||
bool wantsDecorations() const override;
|
||||
|
||||
|
@ -34,7 +34,6 @@
|
||||
#include "qwaylandshellintegration_p.h"
|
||||
#include "qwaylandclientbufferintegration_p.h"
|
||||
|
||||
#include "qwaylandextendedsurface_p.h"
|
||||
#include "qwaylandpointergestures_p.h"
|
||||
#include "qwaylandsubsurface_p.h"
|
||||
#include "qwaylandtouch_p.h"
|
||||
@ -642,10 +641,6 @@ void QWaylandDisplay::registry_global(uint32_t id, const QString &interface, uin
|
||||
} else if (interface == QLatin1String(QWaylandDataDeviceManager::interface()->name)) {
|
||||
mGlobals.dndSelectionHandler.reset(new QWaylandDataDeviceManager(this, version, id));
|
||||
#endif
|
||||
} else if (interface == QLatin1String(QtWayland::qt_surface_extension::interface()->name)) {
|
||||
mGlobals.surfaceExtension.reset(
|
||||
new WithDestructor<QtWayland::qt_surface_extension, qt_surface_extension_destroy>(
|
||||
registry, id, 1));
|
||||
} else if (interface == QLatin1String(QtWayland::wl_subcompositor::interface()->name)) {
|
||||
mGlobals.subCompositor.reset(
|
||||
new WithDestructor<QtWayland::wl_subcompositor, wl_subcompositor_destroy>(registry,
|
||||
|
@ -48,7 +48,6 @@ class QPlatformScreen;
|
||||
class QPlatformPlaceholderScreen;
|
||||
|
||||
namespace QtWayland {
|
||||
class qt_surface_extension;
|
||||
class zwp_text_input_manager_v1;
|
||||
class zwp_text_input_manager_v2;
|
||||
class zwp_text_input_manager_v3;
|
||||
@ -153,10 +152,6 @@ public:
|
||||
return mGlobals.primarySelectionManager.get();
|
||||
}
|
||||
#endif
|
||||
QtWayland::qt_surface_extension *windowExtension() const
|
||||
{
|
||||
return mGlobals.surfaceExtension.get();
|
||||
}
|
||||
#if QT_CONFIG(tabletevent)
|
||||
QWaylandTabletManagerV2 *tabletManager() const
|
||||
{
|
||||
@ -323,7 +318,6 @@ private:
|
||||
#if QT_CONFIG(wayland_datadevice)
|
||||
std::unique_ptr<QWaylandDataDeviceManager> dndSelectionHandler;
|
||||
#endif
|
||||
std::unique_ptr<QtWayland::qt_surface_extension> surfaceExtension;
|
||||
std::unique_ptr<QtWayland::wl_subcompositor> subCompositor;
|
||||
std::unique_ptr<QWaylandTouchExtension> touchExtension;
|
||||
std::unique_ptr<QWaylandQtKeyExtension> qtKeyExtension;
|
||||
|
@ -1,92 +0,0 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
#include "qwaylandextendedsurface_p.h"
|
||||
|
||||
#include "qwaylandwindow_p.h"
|
||||
|
||||
#include "qwaylanddisplay_p.h"
|
||||
|
||||
#include "qwaylandnativeinterface_p.h"
|
||||
|
||||
#include <QtGui/QGuiApplication>
|
||||
#include <qpa/qplatformnativeinterface.h>
|
||||
#include <qpa/qwindowsysteminterface.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
namespace QtWaylandClient {
|
||||
|
||||
QWaylandExtendedSurface::QWaylandExtendedSurface(QWaylandWindow *window)
|
||||
: QtWayland::qt_extended_surface(window->display()->windowExtension()->get_extended_surface(window->wlSurface()))
|
||||
, m_window(window)
|
||||
{
|
||||
}
|
||||
|
||||
QWaylandExtendedSurface::~QWaylandExtendedSurface()
|
||||
{
|
||||
qt_extended_surface_destroy(object());
|
||||
}
|
||||
|
||||
void QWaylandExtendedSurface::updateGenericProperty(const QString &name, const QVariant &value)
|
||||
{
|
||||
QByteArray byteValue;
|
||||
QDataStream ds(&byteValue, QIODevice::WriteOnly);
|
||||
ds << value;
|
||||
|
||||
update_generic_property(name, byteValue);
|
||||
}
|
||||
|
||||
void QWaylandExtendedSurface::setContentOrientationMask(Qt::ScreenOrientations mask)
|
||||
{
|
||||
int32_t wlmask = 0;
|
||||
if (mask & Qt::PrimaryOrientation)
|
||||
wlmask |= QT_EXTENDED_SURFACE_ORIENTATION_PRIMARYORIENTATION;
|
||||
if (mask & Qt::PortraitOrientation)
|
||||
wlmask |= QT_EXTENDED_SURFACE_ORIENTATION_PORTRAITORIENTATION;
|
||||
if (mask & Qt::LandscapeOrientation)
|
||||
wlmask |= QT_EXTENDED_SURFACE_ORIENTATION_LANDSCAPEORIENTATION;
|
||||
if (mask & Qt::InvertedPortraitOrientation)
|
||||
wlmask |= QT_EXTENDED_SURFACE_ORIENTATION_INVERTEDPORTRAITORIENTATION;
|
||||
if (mask & Qt::InvertedLandscapeOrientation)
|
||||
wlmask |= QT_EXTENDED_SURFACE_ORIENTATION_INVERTEDLANDSCAPEORIENTATION;
|
||||
set_content_orientation_mask(wlmask);
|
||||
}
|
||||
|
||||
void QWaylandExtendedSurface::extended_surface_onscreen_visibility(int32_t visibility)
|
||||
{
|
||||
m_window->window()->setVisibility(static_cast<QWindow::Visibility>(visibility));
|
||||
}
|
||||
|
||||
void QWaylandExtendedSurface::extended_surface_set_generic_property(const QString &name, wl_array *value)
|
||||
{
|
||||
QByteArray data = QByteArray::fromRawData(static_cast<char *>(value->data), value->size);
|
||||
|
||||
QVariant variantValue;
|
||||
QDataStream ds(data);
|
||||
ds >> variantValue;
|
||||
|
||||
m_window->setProperty(name, variantValue);
|
||||
}
|
||||
|
||||
void QWaylandExtendedSurface::extended_surface_close()
|
||||
{
|
||||
QWindowSystemInterface::handleCloseEvent(m_window->window());
|
||||
}
|
||||
|
||||
Qt::WindowFlags QWaylandExtendedSurface::setWindowFlags(Qt::WindowFlags flags)
|
||||
{
|
||||
uint wlFlags = 0;
|
||||
|
||||
if (flags & Qt::WindowStaysOnTopHint) wlFlags |= QT_EXTENDED_SURFACE_WINDOWFLAG_STAYSONTOP;
|
||||
if (flags & Qt::WindowOverridesSystemGestures) wlFlags |= QT_EXTENDED_SURFACE_WINDOWFLAG_OVERRIDESSYSTEMGESTURES;
|
||||
if (flags & Qt::BypassWindowManagerHint) wlFlags |= QT_EXTENDED_SURFACE_WINDOWFLAG_BYPASSWINDOWMANAGER;
|
||||
|
||||
set_window_flags(wlFlags);
|
||||
|
||||
return flags & (Qt::WindowStaysOnTopHint | Qt::WindowOverridesSystemGestures | Qt::BypassWindowManagerHint);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
@ -1,59 +0,0 @@
|
||||
// Copyright (C) 2018 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
#ifndef QWAYLANDEXTENDEDSURFACE_H
|
||||
#define QWAYLANDEXTENDEDSURFACE_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include <QtCore/QString>
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtCore/QMap> // for QVariantMap
|
||||
|
||||
#include <QtWaylandClient/qtwaylandclientglobal.h>
|
||||
|
||||
#include <QtWaylandClient/private/qwayland-surface-extension.h>
|
||||
#include <QtCore/private/qglobal_p.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
namespace QtWaylandClient {
|
||||
|
||||
class QWaylandDisplay;
|
||||
class QWaylandWindow;
|
||||
|
||||
class Q_WAYLANDCLIENT_EXPORT QWaylandExtendedSurface : public QtWayland::qt_extended_surface
|
||||
{
|
||||
public:
|
||||
QWaylandExtendedSurface(QWaylandWindow *window);
|
||||
~QWaylandExtendedSurface() override;
|
||||
|
||||
void setContentOrientationMask(Qt::ScreenOrientations mask);
|
||||
|
||||
void updateGenericProperty(const QString &name, const QVariant &value);
|
||||
|
||||
Qt::WindowFlags setWindowFlags(Qt::WindowFlags flags);
|
||||
|
||||
private:
|
||||
void extended_surface_onscreen_visibility(int32_t visibility) override;
|
||||
void extended_surface_set_generic_property(const QString &name, wl_array *value) override;
|
||||
void extended_surface_close() override;
|
||||
|
||||
QWaylandWindow *m_window = nullptr;
|
||||
QVariantMap m_properties;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QWAYLANDEXTENDEDSURFACE_H
|
@ -6,7 +6,6 @@
|
||||
#include "qwaylandwindow_p.h"
|
||||
#include "qwaylandshellintegration_p.h"
|
||||
#include "qwaylandsubsurface_p.h"
|
||||
#include "qwaylandextendedsurface_p.h"
|
||||
#include "qwaylandintegration_p.h"
|
||||
#include "qwaylanddisplay_p.h"
|
||||
#include "qwaylandwindowmanagerintegration_p.h"
|
||||
|
@ -3,7 +3,6 @@
|
||||
|
||||
#include "qwaylandshellsurface_p.h"
|
||||
#include "qwaylandwindow_p.h"
|
||||
#include "qwaylandextendedsurface_p.h"
|
||||
#include "qwaylandinputdevice_p.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
Loading…
x
Reference in New Issue
Block a user