mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 22:54:01 +02:00
Extents should be updated on each event only on Wayland
This commit is contained in:
parent
ea8e256a23
commit
78a2835bbf
1 changed files with 9 additions and 2 deletions
|
@ -8,6 +8,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "window/window_title_qt.h"
|
||||
|
||||
#include "platform/platform_specific.h"
|
||||
#include "base/platform/base_platform_info.h"
|
||||
#include "ui/platform/ui_platform_utility.h"
|
||||
#include "ui/widgets/buttons.h"
|
||||
#include "ui/widgets/shadow.h"
|
||||
|
@ -237,9 +238,10 @@ void TitleWidgetQt::mouseDoubleClickEvent(QMouseEvent *e) {
|
|||
|
||||
bool TitleWidgetQt::eventFilter(QObject *obj, QEvent *e) {
|
||||
// I tried to listen only QEvent::Move and QEvent::Resize
|
||||
// but that didn't work
|
||||
// but that doesn't work on Wayland
|
||||
if (obj->isWidgetType()
|
||||
&& window() == static_cast<QWidget*>(obj)) {
|
||||
&& window() == static_cast<QWidget*>(obj)
|
||||
&& Platform::IsWayland()) {
|
||||
updateWindowExtents();
|
||||
}
|
||||
|
||||
|
@ -265,6 +267,11 @@ bool TitleWidgetQt::eventFilter(QObject *obj, QEvent *e) {
|
|||
if (window() == static_cast<QWidget*>(obj)) {
|
||||
restoreCursor();
|
||||
}
|
||||
} else if (e->type() == QEvent::Move
|
||||
|| e->type() == QEvent::Resize) {
|
||||
if (window() == static_cast<QWidget*>(obj)) {
|
||||
updateWindowExtents();
|
||||
}
|
||||
}
|
||||
|
||||
return TitleWidget::eventFilter(obj, e);
|
||||
|
|
Loading…
Add table
Reference in a new issue