From d7cac4033241ed13b481410a33ce9763938eac03 Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Wed, 12 Jun 2002 21:12:53 +0000 Subject: [PATCH] Draw the buttons right before the "overlay" piece. 2002-06-12 Havoc Pennington * src/theme.c (meta_frame_style_draw): Draw the buttons right before the "overlay" piece. --- ChangeLog | 5 ++++ src/theme.c | 71 +++++++++++++++++++++++++++-------------------------- 2 files changed, 41 insertions(+), 35 deletions(-) diff --git a/ChangeLog b/ChangeLog index 48537d9dd..07d877882 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-06-12 Havoc Pennington + + * src/theme.c (meta_frame_style_draw): Draw the buttons right + before the "overlay" piece. + 2002-06-12 Jayaraj Rajappan * src/tools/metacity-properties.glade: accessibility work for diff --git a/src/theme.c b/src/theme.c index b96afa209..030925b71 100644 --- a/src/theme.c +++ b/src/theme.c @@ -3621,7 +3621,7 @@ meta_frame_style_draw (MetaFrameStyle *style, GdkPixbuf *mini_icon, GdkPixbuf *icon) { - int i; + int i, j; GdkRectangle titlebar_rect; GdkRectangle left_titlebar_edge; GdkRectangle right_titlebar_edge; @@ -3786,43 +3786,44 @@ meta_frame_style_draw (MetaFrameStyle *style, rect.x, rect.y, rect.width, rect.height); } - ++i; - } - /* Now we draw buttons */ - i = 0; - while (i < META_BUTTON_TYPE_LAST) - { - GdkRectangle rect; - GdkRectangle combined_clip; - - button_rect (i, fgeom, &rect); - - rect.x += x_offset; - rect.y += y_offset; - - if (clip == NULL) - combined_clip = rect; - else - gdk_rectangle_intersect ((GdkRectangle*) clip, /* const cast */ - &rect, - &combined_clip); - - if (combined_clip.width > 0 && combined_clip.height > 0) + /* Draw buttons just before overlay */ + if ((i + 1) == META_FRAME_PIECE_OVERLAY) { - MetaDrawOpList *op_list; - - op_list = get_button (style, i, button_states[i]); - - if (op_list) - meta_draw_op_list_draw (op_list, - widget, - drawable, - &combined_clip, - &draw_info, - rect.x, rect.y, rect.width, rect.height); + j = 0; + while (j < META_BUTTON_TYPE_LAST) + { + button_rect (j, fgeom, &rect); + + rect.x += x_offset; + rect.y += y_offset; + + if (clip == NULL) + combined_clip = rect; + else + gdk_rectangle_intersect ((GdkRectangle*) clip, /* const cast */ + &rect, + &combined_clip); + + if (combined_clip.width > 0 && combined_clip.height > 0) + { + MetaDrawOpList *op_list; + + op_list = get_button (style, j, button_states[j]); + + if (op_list) + meta_draw_op_list_draw (op_list, + widget, + drawable, + &combined_clip, + &draw_info, + rect.x, rect.y, rect.width, rect.height); + } + + ++j; + } } - + ++i; } }