From 9af842571d2a9c8fe14f0485e2689803325a4306 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Thu, 31 Aug 2023 14:14:35 +0400 Subject: [PATCH] Don't call xdg-shell code generation just for xdg_toplevel_show_window_menu --- CMakeLists.txt | 1 - ui/platform/linux/ui_linux_wayland_integration.cpp | 7 ++++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6e207cc..e335b76 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -317,7 +317,6 @@ elseif(LINUX) qt_generate_wayland_protocol_client_sources(lib_ui FILES ${third_party_loc}/wayland/protocol/wayland.xml - ${third_party_loc}/wayland-protocols/stable/xdg-shell/xdg-shell.xml ) target_link_libraries(lib_ui diff --git a/ui/platform/linux/ui_linux_wayland_integration.cpp b/ui/platform/linux/ui_linux_wayland_integration.cpp index 455341b..461c29b 100644 --- a/ui/platform/linux/ui_linux_wayland_integration.cpp +++ b/ui/platform/linux/ui_linux_wayland_integration.cpp @@ -12,7 +12,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "base/qt_signal_producer.h" #include "qwayland-wayland.h" -#include "qwayland-xdg-shell.h" #include #include @@ -22,6 +21,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL using namespace QNativeInterface; using namespace QNativeInterface::Private; using namespace base::Platform::Wayland; +struct xdg_toplevel; namespace Ui { namespace Platform { @@ -103,8 +103,9 @@ void WaylandIntegration::showWindowMenu( return; } - xdg_toplevel_show_window_menu( - toplevel, + wl_proxy_marshal( + reinterpret_cast(toplevel), + 4, // XDG_TOPLEVEL_SHOW_WINDOW_MENU seat, native->lastInputSerial(), point.x(),