mirror of
https://github.com/Qz3rK/tdesktop.git
synced 2026-07-03 14:15:08 +02:00
Extents should be updated on each event only on Wayland
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user