[metacity] window-props: use memcmp() to compare GtkBorder structs
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [metacity] window-props: use memcmp() to compare GtkBorder structs
- Date: Sun, 26 Feb 2017 22:22:56 +0000 (UTC)
commit a67b6762aa708b6dbe41e964ae41548cdcce6968
Author: Cosimo Cecchi <cosimo endlessm com>
Date: Fri Feb 13 14:54:37 2015 -0800
window-props: use memcmp() to compare GtkBorder structs
Saves some code.
https://bugzilla.gnome.org/show_bug.cgi?id=744500
src/core/window-props.c | 13 ++-----------
1 files changed, 2 insertions(+), 11 deletions(-)
---
diff --git a/src/core/window-props.c b/src/core/window-props.c
index 35a8dfd..dde9818 100644
--- a/src/core/window-props.c
+++ b/src/core/window-props.c
@@ -310,23 +310,14 @@ reload_kwm_win_icon (MetaWindow *window,
reload_icon (window, window->display->atom__KWM_WIN_ICON);
}
-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
meta_window_set_custom_frame_extents (MetaWindow *window,
GtkBorder *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;
window->has_custom_frame_extents = TRUE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]