mirror of
https://github.com/brl/mutter.git
synced 2024-11-29 11:30:45 -05:00
window-props: use memcmp() to compare GtkBorder structs
Saves some code. https://bugzilla.gnome.org/show_bug.cgi?id=744500
This commit is contained in:
parent
de71fd0941
commit
11a9b4baa0
@ -338,16 +338,6 @@ reload_icon_geometry (MetaWindow *window,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
|
||||||
gtk_border_equal (GtkBorder *a,
|
|
||||||
GtkBorder *b)
|
|
||||||
{
|
|
||||||
return (a->left == b->left &&
|
|
||||||
a->right == b->right &&
|
|
||||||
a->top == b->top &&
|
|
||||||
a->bottom == b->bottom);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
meta_window_set_custom_frame_extents (MetaWindow *window,
|
meta_window_set_custom_frame_extents (MetaWindow *window,
|
||||||
GtkBorder *extents,
|
GtkBorder *extents,
|
||||||
@ -355,7 +345,8 @@ meta_window_set_custom_frame_extents (MetaWindow *window,
|
|||||||
{
|
{
|
||||||
if (extents)
|
if (extents)
|
||||||
{
|
{
|
||||||
if (window->has_custom_frame_extents && gtk_border_equal (&window->custom_frame_extents, extents))
|
if (window->has_custom_frame_extents &&
|
||||||
|
memcmp (&window->custom_frame_extents, extents, sizeof (GtkBorder)) == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
window->has_custom_frame_extents = TRUE;
|
window->has_custom_frame_extents = TRUE;
|
||||||
|
Loading…
Reference in New Issue
Block a user