summaryrefslogtreecommitdiff
path: root/src/include/common.h
diff options
context:
space:
mode:
authorVictor Kareh <[email protected]>2025-09-09 10:34:49 -0400
committerLuke from DC <[email protected]>2025-11-01 18:55:54 +0000
commit3261bbdce6cc0fa494c257849cb69c640f1aeade (patch)
treeb08c09c0f49f9f4b2b300eed6e68723b5ebe9e2b /src/include/common.h
parent158e2e64b7fe584ea8fe782e4608df25d6103fc3 (diff)
downloadmarco-3261bbdce6cc0fa494c257849cb69c640f1aeade.tar.bz2
marco-3261bbdce6cc0fa494c257849cb69c640f1aeade.tar.xz
theme: Include shadow and resize borders
Extend MetaFrameBorders to include shadow and resize borders to calculate invisible border size. Also added border caching to prevent recalculating borders on every frame operation. This is a backport of the following commits from Metacity: - https://gitlab.gnome.org/GNOME/metacity/-/commit/21e664af - https://gitlab.gnome.org/GNOME/metacity/-/commit/3c6e269b - https://gitlab.gnome.org/GNOME/metacity/-/commit/700e87ea
Diffstat (limited to 'src/include/common.h')
-rw-r--r--src/include/common.h14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/include/common.h b/src/include/common.h
index 031274f6..a0dfb69c 100644
--- a/src/include/common.h
+++ b/src/include/common.h
@@ -310,15 +310,11 @@ struct _MetaButtonLayout
typedef struct _MetaFrameBorders MetaFrameBorders;
struct _MetaFrameBorders
{
- /* The frame border is made up of two pieces - an inner visible portion
- * 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;
+ GtkBorder visible; /* Visible window frame decoration */
+ GtkBorder shadow; /* Extra size needed for shadow */
+ GtkBorder resize; /* Extra size used for resize cursor area */
+ GtkBorder invisible; /* Max of shadow and resize borders */
+ GtkBorder total; /* Sum of visible and invisible borders */
};
/* sets all dimensions to zero */