app: fix jumping around of newly created images

Put the center_image_on_size_allocate() code into the canvas'
size-allocate callbacck.

As a side effect we now have a flag in GimpDisplayShell which
indicates that there will be a size allocate before the next frame, so
simply skip drawing the canvas completely. This fixes new images
jumping around when they are first shown.

(cherry picked from commit c0480f502d)

(this fix is actually a side effect from fixing something else in
master)
This commit is contained in:
Michael Natterer
2018-06-28 00:52:08 +02:00
parent 7eee2614f9
commit 21f87d7d82
5 changed files with 16 additions and 67 deletions

View File

@ -179,6 +179,7 @@ struct _GimpDisplayShell
gboolean zoom_on_resize;
gboolean size_allocate_from_configure_event;
gboolean size_allocate_center_image;
/* the state of gimp_display_shell_tool_events() */
gboolean pointer_grabbed;