summaryrefslogtreecommitdiff
path: root/src/core/frame-private.h
diff options
context:
space:
mode:
authorVictor Kareh <[email protected]>2019-04-12 07:58:30 -0400
committerVictor Kareh <[email protected]>2019-06-05 10:49:37 -0400
commitc66b32666e48996b97e691ed002f86b6ff18dec5 (patch)
tree3e5d1b07331ab708cac920fcfe62e504aa2481ad /src/core/frame-private.h
parent707eb409e7dfeec276f6dfa3e667a0140b3300aa (diff)
downloadmarco-c66b32666e48996b97e691ed002f86b6ff18dec5.tar.bz2
marco-c66b32666e48996b97e691ed002f86b6ff18dec5.tar.xz
Replace public MetaFrameGeometry with MetaFrameBorders
There were actually *two* MetaFrameGeometry structs: one in theme-private.h, one in frame.h. The latter public struct was populated by a mix of (void*) casting and int pointers, usually pulling directly from the data in the private struct. Remove the public struct, replace it with MetaFrameBorders and scrap all the pointer hacks to populate it, instead relying on both structs being used in common code. This commit should be relatively straightforward, and it should not do any tricky logic at all, just a sophisticated find and replace. https://bugzilla.gnome.org/show_bug.cgi?id=644930 upstream commit: https://gitlab.gnome.org/GNOME/metacity/commit/72224a165 NOTE: Patch copied from metacity and adapted for marco.
Diffstat (limited to 'src/core/frame-private.h')
-rw-r--r--src/core/frame-private.h29
1 files changed, 9 insertions, 20 deletions
diff --git a/src/core/frame-private.h b/src/core/frame-private.h
index 24ec3cc1..a5c01995 100644
--- a/src/core/frame-private.h
+++ b/src/core/frame-private.h
@@ -27,17 +27,6 @@
#include "frame.h"
#include "window-private.h"
-typedef struct _MetaFrameGeometry MetaFrameGeometry;
-
-struct _MetaFrameGeometry
-{
- /* border sizes (space between frame and child) */
- int left_width;
- int right_width;
- int top_height;
- int bottom_height;
-};
-
struct _MetaFrame
{
/* window we frame */
@@ -71,15 +60,15 @@ void meta_frame_queue_draw (MetaFrame *frame);
MetaFrameFlags meta_frame_get_flags (MetaFrame *frame);
/* These should ONLY be called from meta_window_move_resize_internal */
-void meta_frame_calc_geometry (MetaFrame *frame,
- MetaFrameGeometry *geomp);
-void meta_frame_sync_to_window (MetaFrame *frame,
- int gravity,
- gboolean need_move,
- gboolean need_resize);
-
-void meta_frame_set_screen_cursor (MetaFrame *frame,
- MetaCursor cursor);
+void meta_frame_calc_borders (MetaFrame *frame,
+ MetaFrameBorders *borders);
+void meta_frame_sync_to_window (MetaFrame *frame,
+ int gravity,
+ gboolean need_move,
+ gboolean need_resize);
+
+void meta_frame_set_screen_cursor (MetaFrame *frame,
+ MetaCursor cursor);
#endif