mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-14 20:51:07 +00:00
Merge branch 'matthiasc/for-master' into 'master'
gdk: Short-circuit some surface setters See merge request GNOME/gtk!1947
This commit is contained in:
commit
be8a831496
@ -2118,6 +2118,9 @@ gdk_surface_set_input_region (GdkSurface *surface,
|
||||
if (GDK_SURFACE_DESTROYED (surface))
|
||||
return;
|
||||
|
||||
if (cairo_region_equal (surface->input_region, region))
|
||||
return;
|
||||
|
||||
if (surface->input_region)
|
||||
cairo_region_destroy (surface->input_region);
|
||||
|
||||
@ -2702,6 +2705,12 @@ gdk_surface_set_shadow_width (GdkSurface *surface,
|
||||
g_return_if_fail (!GDK_SURFACE_DESTROYED (surface));
|
||||
g_return_if_fail (left >= 0 && right >= 0 && top >= 0 && bottom >= 0);
|
||||
|
||||
if (surface->shadow_left == left &&
|
||||
surface->shadow_right == right &&
|
||||
surface->shadow_top == top &&
|
||||
surface->shadow_bottom == bottom)
|
||||
return;
|
||||
|
||||
surface->shadow_top = top;
|
||||
surface->shadow_left = left;
|
||||
surface->shadow_right = right;
|
||||
|
Loading…
Reference in New Issue
Block a user