shutter-project / shutter

Screenshot tool for Linux
https://shutter-project.org/
GNU General Public License v3.0
527 stars 36 forks source link

Gtk3 HiDPI: menus #326

Open DarthGandalf opened 3 years ago

DarthGandalf commented 3 years ago

Brief summary of issue

Wrong parts of screen are taken

Steps to reproduce the issue

  1. export GDK_SCALE=2
  2. Try to take picture of menus (with nested/cascaded submenus), or a section of a window
  3. See that the result doesn't look right:

Menu_004

Error output

Extra information, such as Shutter version, operating system and ideas for how to solve:

Linux, Shutter version with #284 merged.

Photon89 commented 3 years ago

Subwindows actually stopped working a long time ago, so the reason is not in the recent changers (after 0.94), here's a (very old) report: https://github.com/shutter-project/shutter/issues/25 Menus and submenus are working in 0.95. But I think, the breakage is not a major thing compared to the progress made since 0.95. If it turns out to be a hard nut to crack, maybe just remove the corresponding button and menu entries for the time being?

DarthGandalf commented 3 years ago

@Photon89 thanks for link. I agree that it may be removed.

Menus is a different case. They work fine in 0.94.

Photon89 commented 3 years ago

Agreed. Though, if the menus bug is hard to fix with the changes made after 0.95, I think it would be fine to remove them as well, temporarily.

I am currently trying to run the latest git commit, need to package perl-gtk3-imageview-8 and, possibly, other deps first though.

DarthGandalf commented 3 years ago

The current workaround I made for the menus bug is to show the warning with the advice to disable scaling. I think it's better than removing the feature altogether.

Photon89 commented 3 years ago

I see, I missed the part where you said that the bug only appears on HiDPI setups. Then your solution is much better than just removing the functionality completely.

DarthGandalf commented 3 years ago

I've disabled the sections buttons

DarthGandalf commented 3 years ago

To clarify: this was not a problem in 0.95 because gtk 2 doesn't have a concept of automatic UI scaling