summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlberts Muktupāvels <alberts.muktupavels@gmail.com>2015-01-18 16:22:36 +0200
committerAlberts Muktupāvels <alberts.muktupavels@gmail.com>2015-01-19 05:18:00 +0200
commitd919ba735af47c56895a7eb5cae2daefdaa6fddf (patch)
tree841556d1dbe5af8f18fff6a5cb5eacfde5fcda5c
parent3dfef37dd55f9b6f04636529965103a0c125653c (diff)
downloadmetacity-d919ba735af47c56895a7eb5cae2daefdaa6fddf.tar.gz
MetaFrameBorders: add invisible borders
This just adds the invisible border field and populates it with data but doesn't use it in any way. Based on mutter commit: https://git.gnome.org/browse/mutter/commit/?id=a1a2527c75ab0c135f89396ea036336fb67ac538
-rw-r--r--src/core/frame.c8
-rw-r--r--src/include/common.h5
-rw-r--r--src/ui/theme.c10
3 files changed, 19 insertions, 4 deletions
diff --git a/src/core/frame.c b/src/core/frame.c
index cb9e2df5..e29a69bd 100644
--- a/src/core/frame.c
+++ b/src/core/frame.c
@@ -306,10 +306,10 @@ meta_frame_get_flags (MetaFrame *frame)
void
meta_frame_borders_clear (MetaFrameBorders *self)
{
- self->visible.top = 0;
- self->visible.bottom = 0;
- self->visible.left = 0;
- self->visible.right = 0;
+ self->visible.top = self->invisible.top = self->total.top = 0;
+ self->visible.bottom = self->invisible.bottom = self->total.bottom = 0;
+ self->visible.left = self->invisible.left = self->total.left = 0;
+ self->visible.right = self->invisible.right = self->total.right = 0;
}
void
diff --git a/src/include/common.h b/src/include/common.h
index fdd1df13..65ea0f7d 100644
--- a/src/include/common.h
+++ b/src/include/common.h
@@ -269,6 +269,11 @@ struct _MetaFrameBorders
* and an outer portion that is invisible but responds to events.
*/
GtkBorder visible;
+ GtkBorder invisible;
+
+ /* For convenience, we have a "total" border which is equal to the sum
+ * of the two borders above. */
+ GtkBorder total;
};
/* sets all dimensions to zero */
diff --git a/src/ui/theme.c b/src/ui/theme.c
index 9728558f..670a7462 100644
--- a/src/ui/theme.c
+++ b/src/ui/theme.c
@@ -433,6 +433,16 @@ meta_frame_layout_get_borders (const MetaFrameLayout *layout,
meta_frame_borders_clear (borders);
return;
}
+
+ borders->invisible.left = layout->invisible_border.left;
+ borders->invisible.right = layout->invisible_border.right;
+ borders->invisible.bottom = layout->invisible_border.bottom;
+ borders->invisible.top = layout->invisible_border.top;
+
+ borders->total.left = borders->invisible.left + borders->visible.left;
+ borders->total.right = borders->invisible.right + borders->visible.right;
+ borders->total.bottom = borders->invisible.bottom + borders->visible.bottom;
+ borders->total.top = borders->invisible.top + borders->visible.top;
}
static MetaButtonType