telegramdesktop / tdesktop

Telegram Desktop messaging app
https://desktop.telegram.org/
Other
26.23k stars 5.2k forks source link

Window minimal size works wrong when resize in split screen mode #27378

Closed b-kamalov-diginavis closed 9 months ago

b-kamalov-diginavis commented 9 months ago

Steps to reproduce

  1. Open Telegram in split screen mode with other app
  2. Resize Telegram to minimal size Запись экрана от 2024-01-17 17-49-20.webm

Expected behaviour

Telegram doesn't let other app to move above Telegram

Actual behaviour

Telegram lets other app to overlap Telegram app

Operating system

Fedora Linux

Version of Telegram Desktop

4.14.5

Installation source

Flatpak

Crash ID

No response

Logs

No response

ilya-fedin commented 9 months ago

This looks like a GNOME bug

b-kamalov-diginavis commented 9 months ago

This looks like a GNOME bug

Is it? Are there any other apps with this behaviour?

b-kamalov-diginavis commented 9 months ago

The bug has appeared somewhere in between 4.8.1 and 4.8.3

@ilya-fedin @Aokromes I don't think that this is the GNOME bug

https://github.com/telegramdesktop/tdesktop/assets/84175904/0fbea44b-2750-41df-86b5-82a5dfb4857d

ilya-fedin commented 9 months ago

Is it? Are there any other apps with this behaviour?

Other Qt 6 applications perhaps? GNOME is known to do everything for Qt applications to work buggy.

The bug has appeared somewhere in between 4.8.1 and 4.8.3

Apparently a Qt update?

b-kamalov-diginavis commented 9 months ago

@ilya-fedin, I created an issue for QT and they said that it could be already fixed in QT 6.7. Can you make testing build with recent QT to see if it will be fixed after update?

https://bugreports.qt.io/browse/QTBUG-121381

This may already be fixed by https://codereview.qt-project.org/c/qt/qtwayland/+/524982

Could you please re-test with a recent Qt 6.7 snapshot or the second beta once that is released?

ilya-fedin commented 9 months ago

Sorry but I won't. tdesktop building process is too long to do unnecessary builds. Feel free to do that yourself, i can guide you.

If they removed the forcing of the minimum size then it's going to be a regression for tdesktop because QWidget has API promise that it couldn't be less than minimum size and tdesktop relies on that.

b-kamalov-diginavis commented 9 months ago

If they removed the forcing of the minimum size then it's going to be a regression for tdesktop because QWidget has API promise that it couldn't be less than minimum size and tdesktop relies on that.

Looks like now it will be done with xdg-shell/qt-shell (I don't know what it means)

ilya-fedin commented 9 months ago

This means it's no longer forced. If your compositor properly respects the hints, nothing will be changed for you. If it doesn't, you will be able to resize it smaller than currently but you will have graphical artifacts or crashes.

Compositor can't do anything if you supply a buffer not less than your minimum size (what is removed in the linked commit) but it can ignore the hints and send lesser sizes via the configure event just fine.

ilya-fedin commented 9 months ago

This logic is like ~10 years old so I'm very doubt it's the cause. The issue looks to me like GNOME bugs due to some valid but unexpected (to it) thing like a different order of requests than gtk does or etc.

ilya-fedin commented 9 months ago

I did a report that they break the API promise with the commit. Hopefully it will be reverted or tdesktop is going to be crashy on Linux again.

b-kamalov-diginavis commented 9 months ago

I did a report that they break the API promise with the commit. Hopefully it will be reverted or tdesktop is going to be crashy on Linux again.

Can you share the link to issue so I could monitor how the process is going?

ilya-fedin commented 9 months ago

https://bugreports.qt.io/browse/QTBUG-121445