From d986e70a896945914e3217f5b08f52ec9746b17f Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Wed, 28 Jul 2021 22:22:33 +0400 Subject: [PATCH] Fix global menu on 64-bit systems with X11 When Wayland support for global menu was added (0b86feeeb58a0a5302a6811f0f51e97c562a7134), X11 support was broken since QWindow::winId returns WId what is a quintptr that expands to uint32 on 32-bit and to uint64 on 64-bit, while AppMenu d-bus service accepts only uint32. --- Telegram/SourceFiles/platform/linux/main_window_linux.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/platform/linux/main_window_linux.cpp b/Telegram/SourceFiles/platform/linux/main_window_linux.cpp index 241a6ddaa..61fcc69e9 100644 --- a/Telegram/SourceFiles/platform/linux/main_window_linux.cpp +++ b/Telegram/SourceFiles/platform/linux/main_window_linux.cpp @@ -577,7 +577,7 @@ void RegisterAppMenu(QWindow *window, const QString &menuPath) { qsl("RegisterWindow")); message.setArguments({ - window->winId(), + uint(window->winId()), QVariant::fromValue(QDBusObjectPath(menuPath)) }); @@ -598,7 +598,7 @@ void UnregisterAppMenu(QWindow *window) { qsl("UnregisterWindow")); message.setArguments({ - window->winId() + uint(window->winId()) }); QDBusConnection::sessionBus().send(message);