mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-01 06:55:58 +00:00
Fix global menu on 64-bit systems with X11
When Wayland support for global menu was added (0b86feeeb5
), 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.
This commit is contained in:
@@ -577,7 +577,7 @@ void RegisterAppMenu(QWindow *window, const QString &menuPath) {
|
|||||||
qsl("RegisterWindow"));
|
qsl("RegisterWindow"));
|
||||||
|
|
||||||
message.setArguments({
|
message.setArguments({
|
||||||
window->winId(),
|
uint(window->winId()),
|
||||||
QVariant::fromValue(QDBusObjectPath(menuPath))
|
QVariant::fromValue(QDBusObjectPath(menuPath))
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -598,7 +598,7 @@ void UnregisterAppMenu(QWindow *window) {
|
|||||||
qsl("UnregisterWindow"));
|
qsl("UnregisterWindow"));
|
||||||
|
|
||||||
message.setArguments({
|
message.setArguments({
|
||||||
window->winId()
|
uint(window->winId())
|
||||||
});
|
});
|
||||||
|
|
||||||
QDBusConnection::sessionBus().send(message);
|
QDBusConnection::sessionBus().send(message);
|
||||||
|
Reference in New Issue
Block a user