mirror of
https://invent.kde.org/plasma/layer-shell-qt.git
synced 2025-07-14 11:04:20 -04:00
Compare commits
22 Commits
Author | SHA1 | Date | |
---|---|---|---|
5163cb6f49 | |||
eaac59ef13 | |||
7f555ba9bd | |||
a450e3b4b3 | |||
2d00bfd62d | |||
6c5072cb9e | |||
5217d4cee6 | |||
6107b5a296 | |||
15a66e8960 | |||
e557008b56 | |||
80f6a629bb | |||
662afeba22 | |||
3dac2dd012 | |||
5b280a4602 | |||
eb6fb8ab13 | |||
06815f2817 | |||
dc07e14630 | |||
4a439143ba | |||
331505a4d2 | |||
f6084b2c43 | |||
9af3c35020 | |||
525fa9b819 |
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,3 +1,5 @@
|
|||||||
|
# SPDX-License-Identifier: CC0-1.0
|
||||||
|
# SPDX-FileCopyrightText: none
|
||||||
# Ignore the following files
|
# Ignore the following files
|
||||||
.vscode
|
.vscode
|
||||||
*~
|
*~
|
||||||
|
6
.gitlab-ci.yml
Normal file
6
.gitlab-ci.yml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
# SPDX-FileCopyrightText: None
|
||||||
|
# SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
|
include:
|
||||||
|
- https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/linux.yml
|
||||||
|
- https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/freebsd.yml
|
7
.kde-ci.yml
Normal file
7
.kde-ci.yml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
# SPDX-FileCopyrightText: None
|
||||||
|
# SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
|
Dependencies:
|
||||||
|
- 'on': ['@all']
|
||||||
|
'require':
|
||||||
|
'frameworks/extra-cmake-modules': '@latest'
|
@ -4,11 +4,14 @@
|
|||||||
cmake_minimum_required(VERSION 3.16)
|
cmake_minimum_required(VERSION 3.16)
|
||||||
|
|
||||||
project(layershellqt)
|
project(layershellqt)
|
||||||
set(PROJECT_VERSION "5.21.90")
|
set(PROJECT_VERSION "5.24.7")
|
||||||
set(PROJECT_VERSION_MAJOR 5)
|
set(PROJECT_VERSION_MAJOR 5)
|
||||||
|
|
||||||
|
set(CMAKE_C_STANDARD 99)
|
||||||
|
|
||||||
set(QT_MIN_VERSION "5.15.0")
|
set(QT_MIN_VERSION "5.15.0")
|
||||||
set(KF5_MIN_VERSION "5.82")
|
set(KF5_MIN_VERSION "5.86")
|
||||||
|
set(KDE_COMPILERSETTINGS_LEVEL "5.82")
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 17)
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
@ -29,10 +32,10 @@ include(GenerateExportHeader)
|
|||||||
include(KDEClangFormat)
|
include(KDEClangFormat)
|
||||||
include(ECMQtDeclareLoggingCategory)
|
include(ECMQtDeclareLoggingCategory)
|
||||||
|
|
||||||
find_package(WaylandScanner)
|
find_package(WaylandScanner REQUIRED)
|
||||||
find_package(QtWaylandScanner)
|
find_package(QtWaylandScanner REQUIRED)
|
||||||
find_package(Wayland 1.3 COMPONENTS Client Server)
|
find_package(Wayland 1.3 COMPONENTS Client Server)
|
||||||
find_package(WaylandProtocols)
|
find_package(WaylandProtocols REQUIRED)
|
||||||
find_package(PkgConfig REQUIRED)
|
find_package(PkgConfig REQUIRED)
|
||||||
|
|
||||||
pkg_check_modules(XKBCOMMON xkbcommon REQUIRED IMPORTED_TARGET)
|
pkg_check_modules(XKBCOMMON xkbcommon REQUIRED IMPORTED_TARGET)
|
||||||
|
@ -21,7 +21,7 @@ class LAYERSHELLQT_EXPORT QWaylandLayerShell : public QtWayland::zwlr_layer_shel
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
QWaylandLayerShell(::wl_registry *registry, uint32_t id, uint32_t version);
|
QWaylandLayerShell(::wl_registry *registry, uint32_t id, uint32_t version);
|
||||||
virtual ~QWaylandLayerShell();
|
~QWaylandLayerShell() override;
|
||||||
|
|
||||||
QWaylandLayerSurface *createLayerSurface(QtWaylandClient::QWaylandWindow *window);
|
QWaylandLayerSurface *createLayerSurface(QtWaylandClient::QWaylandWindow *window);
|
||||||
// TODO: Popups
|
// TODO: Popups
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
#include "interfaces/shell.h"
|
#include "interfaces/shell.h"
|
||||||
#include "qwaylandlayershell_p.h"
|
#include "qwaylandlayershell_p.h"
|
||||||
#include "qwaylandlayersurface_p.h"
|
#include "qwaylandlayersurface_p.h"
|
||||||
|
#include "layershellqt_logging.h"
|
||||||
|
|
||||||
#include <QtWaylandClient/private/qwaylandscreen_p.h>
|
#include <QtWaylandClient/private/qwaylandscreen_p.h>
|
||||||
#include <QtWaylandClient/private/qwaylandsurface_p.h>
|
#include <QtWaylandClient/private/qwaylandsurface_p.h>
|
||||||
@ -22,7 +23,14 @@ QWaylandLayerSurface::QWaylandLayerSurface(QWaylandLayerShell *shell, QtWaylandC
|
|||||||
LayerShellQt::Window *interface = Window::get(window->window());
|
LayerShellQt::Window *interface = Window::get(window->window());
|
||||||
Q_ASSERT(interface);
|
Q_ASSERT(interface);
|
||||||
|
|
||||||
init(shell->get_layer_surface(window->waylandSurface()->object(), window->waylandScreen()->output(), interface->layer(), interface->scope()));
|
// Qt will always assign a screen to a window, but if the compositor has no screens available a dummy QScreen object is created
|
||||||
|
// this will not cast to a QWaylandScreen
|
||||||
|
QtWaylandClient::QWaylandScreen *screen = window->waylandScreen();
|
||||||
|
if (screen->isPlaceholder()) {
|
||||||
|
qCWarning(LAYERSHELLQT) << "Creating a layer shell for placeholder screen. This will be positioned incorrectly";
|
||||||
|
}
|
||||||
|
|
||||||
|
init(shell->get_layer_surface(window->waylandSurface()->object(), screen->isPlaceholder() ? nullptr : screen->output(), interface->layer(), interface->scope()));
|
||||||
|
|
||||||
Window::Anchors anchors = interface->anchors();
|
Window::Anchors anchors = interface->anchors();
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ class LAYERSHELLQT_EXPORT QWaylandLayerSurface : public QtWaylandClient::QWaylan
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
QWaylandLayerSurface(QWaylandLayerShell *shell, QtWaylandClient::QWaylandWindow *window);
|
QWaylandLayerSurface(QWaylandLayerShell *shell, QtWaylandClient::QWaylandWindow *window);
|
||||||
virtual ~QWaylandLayerSurface();
|
~QWaylandLayerSurface() override;
|
||||||
|
|
||||||
bool isExposed() const override
|
bool isExposed() const override
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user