Draw the buttons right before the "overlay" piece.

2002-06-12  Havoc Pennington  <hp@redhat.com>

	* src/theme.c (meta_frame_style_draw): Draw the buttons right
	before the "overlay" piece.
This commit is contained in:
Havoc Pennington 2002-06-12 21:12:53 +00:00 committed by Havoc Pennington
parent e0e6dab50f
commit d7cac40332
2 changed files with 41 additions and 35 deletions

View File

@ -1,3 +1,8 @@
2002-06-12 Havoc Pennington <hp@redhat.com>
* src/theme.c (meta_frame_style_draw): Draw the buttons right
before the "overlay" piece.
2002-06-12 Jayaraj Rajappan <jayaraj.rajappan@wipro.com> 2002-06-12 Jayaraj Rajappan <jayaraj.rajappan@wipro.com>
* src/tools/metacity-properties.glade: accessibility work for * src/tools/metacity-properties.glade: accessibility work for

View File

@ -3621,7 +3621,7 @@ meta_frame_style_draw (MetaFrameStyle *style,
GdkPixbuf *mini_icon, GdkPixbuf *mini_icon,
GdkPixbuf *icon) GdkPixbuf *icon)
{ {
int i; int i, j;
GdkRectangle titlebar_rect; GdkRectangle titlebar_rect;
GdkRectangle left_titlebar_edge; GdkRectangle left_titlebar_edge;
GdkRectangle right_titlebar_edge; GdkRectangle right_titlebar_edge;
@ -3786,41 +3786,42 @@ meta_frame_style_draw (MetaFrameStyle *style,
rect.x, rect.y, rect.width, rect.height); rect.x, rect.y, rect.width, rect.height);
} }
++i;
}
/* Now we draw buttons */ /* Draw buttons just before overlay */
i = 0; if ((i + 1) == META_FRAME_PIECE_OVERLAY)
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)
{ {
MetaDrawOpList *op_list; j = 0;
while (j < META_BUTTON_TYPE_LAST)
{
button_rect (j, fgeom, &rect);
op_list = get_button (style, i, button_states[i]); rect.x += x_offset;
rect.y += y_offset;
if (op_list) if (clip == NULL)
meta_draw_op_list_draw (op_list, combined_clip = rect;
widget, else
drawable, gdk_rectangle_intersect ((GdkRectangle*) clip, /* const cast */
&combined_clip, &rect,
&draw_info, &combined_clip);
rect.x, rect.y, rect.width, rect.height);
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; ++i;