mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-29 21:57:42 +00:00
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.
This commit is contained in:
parent
1ebf27bfa1
commit
d986e70a89
@ -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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user