summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Thurman <tthurman@gnome.org>2009-10-23 21:56:34 -0400
committerThomas Thurman <tthurman@gnome.org>2009-10-23 21:56:34 -0400
commit0ee077d40ac1c194bb4c2150361b6ae70db34705 (patch)
treede77ac050d76a0e40959d2cb62e3e79f97437fa6
parent52c81d64fde2f6e46675854c10b8278abb4a438b (diff)
downloadmetacity-0ee077d40ac1c194bb4c2150361b6ae70db34705.tar.gz
right-hand buttons in the correct order
-rw-r--r--src/ui/theme.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/ui/theme.c b/src/ui/theme.c
index 71e494dd..f4230371 100644
--- a/src/ui/theme.c
+++ b/src/ui/theme.c
@@ -855,14 +855,17 @@ meta_theme_calc_geometry (MetaTheme *theme,
(fgeom->areas[CC_TITLEBAR].left_edge +
fgeom->areas[CC_TITLEBAR].right_edge));
- for (i=0; i<MAX_BUTTONS_PER_CORNER; i++)
+ /* we want to go over them backwards */
+ i=0;
+ while (i+1<MAX_BUTTONS_PER_CORNER &&
+ button_layout->right_buttons[i]!=META_BUTTON_FUNCTION_LAST)
+ i++;
+
+ for (i--; i>=0; i--)
{
int button = button_layout->right_buttons[i];
CopperClasses cc;
- if (button == META_BUTTON_FUNCTION_LAST)
- break;
-
cc = copper_class_for_button(button);
/* so allocate it */