telegramdesktop / tdesktop

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

Pasting image to GIMP does not work #28328

Closed arisudesu closed 1 week ago

arisudesu commented 2 weeks ago

Steps to reproduce

  1. Open any image in full-screen in Telegram Desktop, right-click, select "Copy".
  2. Open GIMP, select menu "File -> Create -> From clipboard" or press Ctrl+V.

OR

  1. Open any image in full-screen in Telegram Desktop, right-click, select "Copy".
  2. Open GIMP, create empty image with "File -> Create project"
  3. Right-click on canvas and select "Edit -> Paste"

Expected behaviour

Copied image is pasted into GIMP.

Actual behaviour

Nothing is pasted with error. See attached video.

https://github.com/user-attachments/assets/2126b1ba-a265-4e52-85ac-68d6c4eeae46

Operating system

Windows 10 22H2

Version of Telegram Desktop

5.4.1 x64

Installation source

Static binary from official website

Crash ID

No response

Logs

No response

arisudesu commented 2 weeks ago

Clipboard issues strike back in Telegram, similar to an old issue that needed 2 years to fix but in reverse direction. Copying works but in one rare case.

Also since the previous bug, in fact, was caused by Telegram and was fixed on its side, I tend to think that the new bug is caused by Telegram too and is not a bug in GIMP.

ilya-fedin commented 2 weeks ago

If you look at the code, you would see that the bug is closed with a workaround with special handling for Firefox. Saying that it is caused by Telegram is incorrect.

arisudesu commented 2 weeks ago

OK, this one may be not on the TDesktop side: https://gitlab.gnome.org/GNOME/gimp/-/issues/3481. I should have looked for similar issue in GIMP bugtracker first. But they marked it as fixed long ago, I'm not sur whether they broke it again or it's another bug on TDesktop side.

Until GIMP confirms the bug on their side, I'd keep this issue open to track it. Fresh bug report on their bugtracker: https://gitlab.gnome.org/GNOME/gimp/-/issues/11971.

Speaking of Firefox fix, does it really matter how it was fixed, it only matters that it is now fixed. But it's always funny how TDesktop devs eventually had to put crutches in their code to fix the framework they built TDesktop on (Qt or whatever crap which can't operate on clipboard just right) and the suspicion about new bug came right there.

ilya-fedin commented 2 weeks ago

Yeah, input and clipboard are two things Qt is pretty bugged at

ilya-fedin commented 2 weeks ago

I suggest to try other Qt applications, e.g. Krita, nomacs

ilya-fedin commented 2 weeks ago

This also might be a problem due to GIMP using a legacy toolkit which likely doesn't support the modern image format on Windows (there are multiple versions of DIB format used by Windows clipboard). Qt likely supports only the newer one while gtk2 only the older one.