Compare commits

..

6 Commits

Author SHA1 Message Date
aac600107a Fix spectacle crash
focusWindow may have no platform window.
2026-03-26 10:25:05 +00:00
9c02b52291 fix cmake warnings 2026-03-22 11:54:02 +01:00
15f108b536 Remove unneeded Qt version check 2026-03-02 10:46:31 +01:00
dd76feea81 Add Window::screenConfiguration() shim
This shim is for 6.6 to maintain compatibility with previous versions.
2026-01-20 14:35:22 +02:00
430ad3630f Allow specifying explicit desired screen
If the window position is not specified, which is a reasonable thing to
do when using the layer shell protocol, setWidth() and setHeight() can
unintentionally change the screen() to the wrong one.

This change adds a setScreen() function so it's harder to shoot
yourself in the foot while using the layer shell protocol.
2026-01-20 14:12:23 +02:00
68df285294 Update version for new release 6.6.80 2026-01-13 21:58:51 +05:30
3 changed files with 4 additions and 7 deletions

View File

@ -4,7 +4,7 @@
cmake_minimum_required(VERSION 3.16)
project(layershellqt)
set(PROJECT_VERSION "6.6.0")
set(PROJECT_VERSION "6.6.80")
set(PROJECT_VERSION_MAJOR 6)
set(CMAKE_C_STANDARD 99)
@ -37,7 +37,7 @@ include(ECMGenerateExportHeader)
find_package(Qt6 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS WaylandClient Qml)
if (Qt6WaylandClient_VERSION VERSION_GREATER_EQUAL "6.10.0")
find_package(Qt6WaylandClientPrivate ${REQUIRED_QT_VERSION} REQUIRED NO_MODULE)
find_package(Qt6WaylandClientPrivate ${QT_MIN_VERSION} REQUIRED NO_MODULE)
endif()
find_package(WaylandScanner REQUIRED)

View File

@ -7,11 +7,8 @@ add_library(LayerShellQtInterface)
qt6_extract_metatypes(LayerShellQtInterface)
if (Qt6_VERSION VERSION_GREATER_EQUAL "6.8.0")
set(private_code_option "PRIVATE_CODE")
endif()
qt6_generate_wayland_protocol_client_sources(LayerShellQtInterface
${private_code_option}
PRIVATE_CODE
FILES
${WaylandProtocols_DATADIR}/stable/xdg-shell/xdg-shell.xml
${WaylandProtocols_DATADIR}/staging/xdg-activation/xdg-activation-v1.xml

View File

@ -204,7 +204,7 @@ bool QWaylandLayerSurface::requestActivate()
return true;
} else {
const auto focusWindow = QGuiApplication::focusWindow();
const auto wlWindow = focusWindow ? static_cast<QtWaylandClient::QWaylandWindow *>(focusWindow->handle()) : window();
const auto wlWindow = focusWindow && focusWindow->handle() ? static_cast<QtWaylandClient::QWaylandWindow *>(focusWindow->handle()) : window();
if (const auto seat = wlWindow->display()->lastInputDevice()) {
const auto tokenProvider = activation->requestXdgActivationToken(wlWindow->display(), wlWindow->wlSurface(), seat->serial(), QString());
connect(tokenProvider, &QWaylandXdgActivationTokenV1::done, this, [this](const QString &token) {