mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 06:07:06 +02:00
parent
f1ab712f07
commit
94f842a81f
1 changed files with 9 additions and 0 deletions
|
@ -492,6 +492,15 @@ OverlayWidget::OverlayWidget()
|
|||
return base::EventFilterResult::Cancel;
|
||||
} else if (type == QEvent::ThemeChange && Platform::IsLinux()) {
|
||||
_window->setWindowIcon(Window::CreateIcon(_session));
|
||||
} else if (type == QEvent::ContextMenu) {
|
||||
const auto event = static_cast<QContextMenuEvent*>(e.get());
|
||||
const auto mouse = (event->reason() == QContextMenuEvent::Mouse);
|
||||
const auto position = mouse
|
||||
? std::make_optional(event->pos())
|
||||
: std::nullopt;
|
||||
if (handleContextMenu(position)) {
|
||||
return base::EventFilterResult::Cancel;
|
||||
}
|
||||
}
|
||||
return base::EventFilterResult::Continue;
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue