From c66b32666e48996b97e691ed002f86b6ff18dec5 Mon Sep 17 00:00:00 2001 From: Victor Kareh Date: Fri, 12 Apr 2019 07:58:30 -0400 Subject: 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. --- src/core/display.c | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) (limited to 'src/core/display.c') diff --git a/src/core/display.c b/src/core/display.c index 216688ec..e25300d0 100644 --- a/src/core/display.c +++ b/src/core/display.c @@ -4470,11 +4470,7 @@ process_request_frame_extents (MetaDisplay *display, &hints); if ((hints_set && hints->decorations) || !hints_set) { - int top = 0; - int bottom = 0; - int left = 0; - int right = 0; - + MetaFrameBorders borders; MetaScreen *screen; screen = meta_display_screen_for_xwindow (display, @@ -4492,15 +4488,12 @@ process_request_frame_extents (MetaDisplay *display, meta_ui_theme_get_frame_borders (screen->ui, META_FRAME_TYPE_NORMAL, 0, - &top, - &bottom, - &left, - &right); - - data[0] = left; - data[1] = right; - data[2] = top; - data[3] = bottom; + &borders); + + data[0] = borders.visible.left; + data[1] = borders.visible.right; + data[2] = borders.visible.top; + data[3] = borders.visible.bottom; } meta_topic (META_DEBUG_GEOMETRY, -- cgit v1.2.1