[metacity/cowbell] right-hand buttons in the correct order



commit 0ee077d40ac1c194bb4c2150361b6ae70db34705
Author: Thomas Thurman <tthurman gnome org>
Date:   Fri Oct 23 21:56:34 2009 -0400

    right-hand buttons in the correct order

 src/ui/theme.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/src/ui/theme.c b/src/ui/theme.c
index 71e494d..f423037 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 */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]