diff options
author | Victor Kareh <[email protected]> | 2019-04-12 07:58:30 -0400 |
---|---|---|
committer | Victor Kareh <[email protected]> | 2019-06-05 10:49:37 -0400 |
commit | c66b32666e48996b97e691ed002f86b6ff18dec5 (patch) | |
tree | 3e5d1b07331ab708cac920fcfe62e504aa2481ad /src/ui/theme-viewer.c | |
parent | 707eb409e7dfeec276f6dfa3e667a0140b3300aa (diff) | |
download | marco-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/ui/theme-viewer.c')
-rw-r--r-- | src/ui/theme-viewer.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/ui/theme-viewer.c b/src/ui/theme-viewer.c index d4331b8e..5903f990 100644 --- a/src/ui/theme-viewer.c +++ b/src/ui/theme-viewer.c @@ -1020,7 +1020,7 @@ run_theme_benchmark (void) GtkWidget* widget; cairo_surface_t *pixmap; cairo_t *cr; - int top_height, bottom_height, left_width, right_width; + MetaFrameBorders borders; MetaButtonState button_states[META_BUTTON_TYPE_LAST] = { META_BUTTON_STATE_NORMAL, @@ -1046,10 +1046,7 @@ run_theme_benchmark (void) META_FRAME_TYPE_NORMAL, get_text_height (widget), get_flags (widget), - &top_height, - &bottom_height, - &left_width, - &right_width); + &borders); layout = create_title_layout (widget); @@ -1084,8 +1081,8 @@ run_theme_benchmark (void) */ pixmap = gdk_window_create_similar_surface (gtk_widget_get_window (widget), CAIRO_CONTENT_COLOR, - client_width + left_width + right_width, - client_height + top_height + bottom_height); + client_width + borders.visible.left + borders.visible.right, + client_height + borders.visible.top + borders.visible.bottom); cr = cairo_create (pixmap); meta_theme_draw_frame (global_theme, |