forked from AuroraMiddleware/gtk
x11/surface: Avoid resizing if computed size didn't change
This fixes an issue where we'd resize to the previous window size during interactive resize.
This commit is contained in:
parent
994aa41ccc
commit
fd01723470
@ -325,11 +325,15 @@ compute_toplevel_size (GdkSurface *surface,
|
||||
gdk_surface_constrain_size (&geometry, mask,
|
||||
size.width, size.height,
|
||||
&size.width, &size.height);
|
||||
if ((impl->next_layout.configured_width != size.width ||
|
||||
if ((impl->last_computed_width != size.width ||
|
||||
impl->last_computed_height != size.height) &&
|
||||
(impl->next_layout.configured_width != size.width ||
|
||||
impl->next_layout.configured_height != size.height))
|
||||
{
|
||||
*width = size.width;
|
||||
*height = size.height;
|
||||
impl->last_computed_width = size.width;
|
||||
impl->last_computed_height = size.height;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -72,6 +72,9 @@ struct _GdkX11Surface
|
||||
int unscaled_width;
|
||||
int unscaled_height;
|
||||
|
||||
int last_computed_width;
|
||||
int last_computed_height;
|
||||
|
||||
GdkToplevelLayout *toplevel_layout;
|
||||
|
||||
struct {
|
||||
|
Loading…
Reference in New Issue
Block a user