2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-05 00:55:12 +00:00

Add support for showing window menu on Wayland

This commit is contained in:
Ilya Fedin
2020-08-08 01:59:45 +04:00
committed by John Preston
parent 08b67e383e
commit dc9d0aae54
5 changed files with 44 additions and 4 deletions

View File

@@ -418,6 +418,18 @@ bool AutostartSupported() {
return !IsWindowsStoreBuild();
}
bool ShowWindowMenu(QWindow *window) {
const auto pos = QCursor::pos();
SendMessage(
window->winId(),
WM_SYSCOMMAND,
SC_MOUSEMENU,
MAKELPARAM(pos.x(), pos.y()));
return true;
}
Window::ControlsLayout WindowControlsLayout() {
Window::ControlsLayout controls;
controls.right = {