Wayland: focus bug on canvas (another)
GIMP version: master
Operating System: Wayland/Linux
Description of the bug
When creating a new image with GIMP window not fullscreen, the canvas is created but at full image size. If you create a big image, it means the whole GIMP window ends up resized bigger than your display.
This is a variant of #5324 (closed), except that this other one only happens with GIMP window being fullscreen whereas this one only when the window is not fullscreen. Also @ell investigated the other bug and confirmed this is a different issue as he is able to fix the other issue (gtk#2907 (closed)), but it doesn't help with this one.
This is a very blocker bug as it messes greatly the GUI.
Is the bug reproducible? Always
- Have GIMP in SWM and not full-screen.
- Create a new image with Ctrl+n and Enter ⇒ the tab appears with the image but the whole canvas widget is full size of the image (scrollbars are present on right/bottom but since the canvas is image-size, it's not scrollable)! GIMP window gets resized as much as needed for the full image to be shown, even if it means to be out-of-display.
- Switch to another application, for instance with Alt+Tab
- Switch back to GIMP ⇒ the image is displayed and finally has scrollbars and GIMP gets resized to full-screen.
Expected result: the canvas widget should not be resized and its contents (the image) should just adapt within the scrolled view; GIMP window should never be resized unless the user explicitly resize it. In particular, if you downsize the window on some part of your screen, you don't want it to become fullscreen just because you open an image.
Actual result: canvas widget gets resized and force the window to be resized too.