2006-05-12 Erwann Chenede - <[email protected]>
authorerwannc
Fri, 12 May 2006 12:13:20 +0000
changeset 7272 c1a2990cec04
parent 7271 ab1135d9e9f9
child 7273 e071e75cfc76
2006-05-12 Erwann Chenede - <[email protected]> * patches/metacity-09-branding-hack.diff: hack to get nimbus theme remove 1 pixel at each corner instead of the normal rounded aspect. * patches/metacity-01-default-theme.diff: changed default theme to nimbus * metacity.spec : bumped release, added patch 09
ChangeLog
metacity.spec
patches/metacity-01-default-theme.diff
patches/metacity-09-branding-hack.diff
--- a/ChangeLog	Fri May 12 10:29:58 2006 +0000
+++ b/ChangeLog	Fri May 12 12:13:20 2006 +0000
@@ -1,3 +1,12 @@
+2006-05-12 Erwann Chenede - <[email protected]>
+	
+	* patches/metacity-09-branding-hack.diff: hack to get nimbus
+	  theme remove 1 pixel at each corner instead of the normal
+	  rounded aspect.
+	* patches/metacity-01-default-theme.diff: changed default 
+	  theme to nimbus
+	* metacity.spec : bumped release, added patch 09
+
 2006-05-12 Erwann Chenede - <[email protected]>
 
 	* patches/gdm-11-gtk-button-autosize.diff: added missing logic
--- a/metacity.spec	Fri May 12 10:29:58 2006 +0000
+++ b/metacity.spec	Fri May 12 12:13:20 2006 +0000
@@ -9,7 +9,7 @@
 License:      GPL
 Group:        System/GUI/GNOME
 Version:      2.14.3
-Release:      1
+Release:      2
 Distribution: Java Desktop System
 Vendor:       Sun Microsystems, Inc.
 Summary:      GNOME Window Manager
@@ -26,6 +26,7 @@
 Patch6:       metacity-06-logout-shortcut.diff
 Patch7:       metacity-07-window-title.diff
 Patch8:       metacity-08-pretty-function.diff
+Patch9:       metacity-09-branding-hack.diff
 URL:          http://www.gnome.org
 BuildRoot:    %{_tmppath}/%{name}-%{version}-build
 Docdir:       %{_defaultdocdir}/doc
@@ -57,6 +58,7 @@
 %patch6 -p1
 %patch7 -p1
 %patch8 -p1
+%patch9 -p1
 
 
 %build
--- a/patches/metacity-01-default-theme.diff	Fri May 12 10:29:58 2006 +0000
+++ b/patches/metacity-01-default-theme.diff	Fri May 12 12:13:20 2006 +0000
@@ -5,7 +5,7 @@
        <owner>metacity</owner>
        <type>string</type>
 -      <default>Clearlooks</default>
-+      <default>blueprint</default>
++      <default>nimbus</default>
        <locale name="C">
           <short>Current theme</short>
           <long>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/metacity-09-branding-hack.diff	Fri May 12 12:13:20 2006 +0000
@@ -0,0 +1,267 @@
+--- metacity-2.14.3/src/frames.c	2006-01-21 20:15:47.000000000 +0100
++++ /shared/build/jds/packages/BUILD/SUNWgnome-wm-2.13.92/metacity-2.13.89/src/frames.c	2006-02-24 19:26:36.659248000 +0100
+@@ -757,6 +757,8 @@
+   XRectangle xrect;
+   Region corners_xregion;
+   Region window_xregion;
++  /* hack for nimbus theme */
++  gboolean nimbus_theme = (strcmp ("nimbus", meta_prefs_get_theme ()) == 0) ? TRUE : FALSE; 
+   
+   frame = meta_frames_lookup_window (frames, xwindow);
+   g_return_if_fail (frame != NULL);
+@@ -793,100 +795,149 @@
+   
+   if (fgeom.top_left_corner_rounded)
+     {
+-      xrect.x = 0;
+-      xrect.y = 0;
+-      xrect.width = 5;
+-      xrect.height = 1;
+-      
+-      XUnionRectWithRegion (&xrect, corners_xregion, corners_xregion);
+-
+-      xrect.y = 1;
+-      xrect.width = 3;
+-      XUnionRectWithRegion (&xrect, corners_xregion, corners_xregion);
+-      
+-      xrect.y = 2;
+-      xrect.width = 2;
+-      XUnionRectWithRegion (&xrect, corners_xregion, corners_xregion);
+-
+-      xrect.y = 3;
+-      xrect.width = 1;
+-      xrect.height = 2;
+-      XUnionRectWithRegion (&xrect, corners_xregion, corners_xregion);
++      if (nimbus_theme)
++	{
++	  xrect.x = 0;
++	  xrect.y = 0;
++	  xrect.width = 1;
++	  xrect.height = 1;
++	  
++	  XUnionRectWithRegion (&xrect, corners_xregion, corners_xregion);
++	}
++      else
++	{
++	  xrect.x = 0;
++	  xrect.y = 0;
++	  xrect.width = 5;
++	  xrect.height = 1;
++	  
++	  XUnionRectWithRegion (&xrect, corners_xregion, corners_xregion);
++
++	  xrect.y = 1;
++	  xrect.width = 3;
++	  XUnionRectWithRegion (&xrect, corners_xregion, corners_xregion);
++	  
++	  xrect.y = 2;
++	  xrect.width = 2;
++	  XUnionRectWithRegion (&xrect, corners_xregion, corners_xregion);
++
++	  xrect.y = 3;
++	  xrect.width = 1;
++	  xrect.height = 2;
++	  XUnionRectWithRegion (&xrect, corners_xregion, corners_xregion);
++	}
+     }
+ 
+   if (fgeom.top_right_corner_rounded)
+     {
+-      xrect.x = new_window_width - 5;
+-      xrect.y = 0;
+-      xrect.width = 5;
+-      xrect.height = 1;
+-      
+-      XUnionRectWithRegion (&xrect, corners_xregion, corners_xregion);
+-
+-      xrect.y = 1;
+-      xrect.x = new_window_width - 3;
+-      xrect.width = 3;
+-      XUnionRectWithRegion (&xrect, corners_xregion, corners_xregion);
+-      
+-      xrect.y = 2;
+-      xrect.x = new_window_width - 2;
+-      xrect.width = 2;
+-      XUnionRectWithRegion (&xrect, corners_xregion, corners_xregion);
+-
+-      xrect.y = 3;
+-      xrect.x = new_window_width - 1;
+-      xrect.width = 1;
+-      xrect.height = 2;
+-      XUnionRectWithRegion (&xrect, corners_xregion, corners_xregion);
++      if (nimbus_theme)
++	{
++	  xrect.x = new_window_width - 1;
++	  xrect.y = 0;
++	  xrect.width = 1;
++	  xrect.height = 1;
++	  
++	  XUnionRectWithRegion (&xrect, corners_xregion, corners_xregion);
++
++	}
++      else
++	{
++	  xrect.x = new_window_width - 5;
++	  xrect.y = 0;
++	  xrect.width = 5;
++	  xrect.height = 1;
++	  
++	  XUnionRectWithRegion (&xrect, corners_xregion, corners_xregion);
++
++	  xrect.y = 1;
++	  xrect.x = new_window_width - 3;
++	  xrect.width = 3;
++	  XUnionRectWithRegion (&xrect, corners_xregion, corners_xregion);
++	  
++	  xrect.y = 2;
++	  xrect.x = new_window_width - 2;
++	  xrect.width = 2;
++	  XUnionRectWithRegion (&xrect, corners_xregion, corners_xregion);
++
++	  xrect.y = 3;
++	  xrect.x = new_window_width - 1;
++	  xrect.width = 1;
++	  xrect.height = 2;
++	  XUnionRectWithRegion (&xrect, corners_xregion, corners_xregion);
++	}
+     }
+ 
+   if (fgeom.bottom_left_corner_rounded)
+     {
+-      xrect.x = 0;
+-      xrect.y = new_window_height - 1;
+-      xrect.width = 5;
+-      xrect.height = 1;
+-      
+-      XUnionRectWithRegion (&xrect, corners_xregion, corners_xregion);
+-      
+-      xrect.y = new_window_height - 2;
+-      xrect.width = 3;
+-      XUnionRectWithRegion (&xrect, corners_xregion, corners_xregion);
+-      
+-      xrect.y = new_window_height - 3;
+-      xrect.width = 2;
+-      XUnionRectWithRegion (&xrect, corners_xregion, corners_xregion);
+-
+-      xrect.y = new_window_height - 5;
+-      xrect.width = 1;
+-      xrect.height = 2;
+-      XUnionRectWithRegion (&xrect, corners_xregion, corners_xregion);
++      if (nimbus_theme)
++	{
++	  xrect.x = 0;
++	  xrect.y = new_window_height - 1;
++	  xrect.width = 1;
++	  xrect.height = 1;
++	  
++	  XUnionRectWithRegion (&xrect, corners_xregion, corners_xregion);
++	}
++      else
++	{
++	  xrect.x = 0;
++	  xrect.y = new_window_height - 1;
++	  xrect.width = 5;
++	  xrect.height = 1;
++	  
++	  XUnionRectWithRegion (&xrect, corners_xregion, corners_xregion);
++	  
++	  xrect.y = new_window_height - 2;
++	  xrect.width = 3;
++	  XUnionRectWithRegion (&xrect, corners_xregion, corners_xregion);
++	  
++	  xrect.y = new_window_height - 3;
++	  xrect.width = 2;
++	  XUnionRectWithRegion (&xrect, corners_xregion, corners_xregion);
++
++	  xrect.y = new_window_height - 5;
++	  xrect.width = 1;
++	  xrect.height = 2;
++	  XUnionRectWithRegion (&xrect, corners_xregion, corners_xregion);
++	}
+     }
+ 
+   if (fgeom.bottom_right_corner_rounded)
+     {
+-      xrect.x = new_window_width - 5;
+-      xrect.y = new_window_height - 1;
+-      xrect.width = 5;
+-      xrect.height = 1;
+-      
+-      XUnionRectWithRegion (&xrect, corners_xregion, corners_xregion);
+-      
+-      xrect.y = new_window_height - 2;
+-      xrect.x = new_window_width - 3;
+-      xrect.width = 3;
+-      XUnionRectWithRegion (&xrect, corners_xregion, corners_xregion);
+-      
+-      xrect.y = new_window_height - 3;
+-      xrect.x = new_window_width - 2;
+-      xrect.width = 2;
+-      XUnionRectWithRegion (&xrect, corners_xregion, corners_xregion);
+-
+-      xrect.y = new_window_height - 5;
+-      xrect.x = new_window_width - 1;
+-      xrect.width = 1;
+-      xrect.height = 2;
+-      XUnionRectWithRegion (&xrect, corners_xregion, corners_xregion);
++      if (nimbus_theme)
++	{
++	  xrect.x = new_window_width - 1;
++	  xrect.y = new_window_height - 1;
++	  xrect.width = 1;
++	  xrect.height = 1;
++	  
++	  XUnionRectWithRegion (&xrect, corners_xregion, corners_xregion);
++	}
++      else
++	{
++	  xrect.x = new_window_width - 5;
++	  xrect.y = new_window_height - 1;
++	  xrect.width = 5;
++	  xrect.height = 1;
++	  
++	  XUnionRectWithRegion (&xrect, corners_xregion, corners_xregion);
++	  
++	  xrect.y = new_window_height - 2;
++	  xrect.x = new_window_width - 3;
++	  xrect.width = 3;
++	  XUnionRectWithRegion (&xrect, corners_xregion, corners_xregion);
++	  
++	  xrect.y = new_window_height - 3;
++	  xrect.x = new_window_width - 2;
++	  xrect.width = 2;
++	  XUnionRectWithRegion (&xrect, corners_xregion, corners_xregion);
++
++	  xrect.y = new_window_height - 5;
++	  xrect.x = new_window_width - 1;
++	  xrect.width = 1;
++	  xrect.height = 2;
++	  XUnionRectWithRegion (&xrect, corners_xregion, corners_xregion);
++	}
+     }
+   
+   window_xregion = XCreateRegion ();
+--- metacity-2.14.3/src/theme-parser.c	2005-11-01 19:49:34.000000000 +0100
++++ /shared/build/jds/packages/BUILD/SUNWgnome-wm-2.13.92/metacity-2.13.89/src/theme-parser.c	2006-02-28 18:35:50.075883000 +0100
+@@ -827,6 +827,21 @@
+       if (rounded_bottom_right && !parse_boolean (rounded_bottom_right, &rounded_bottom_right_val, context, error))
+         return;
+       
++	{ /* Hack for Nimbus theme - pretend we have rounded corners this way the theme will 
++	     look Ok in non-patches version of metacity */
++	  gboolean nimbus_theme = (strcmp ("nimbus", info->theme_name) == 0) ? TRUE : FALSE;
++	  if (nimbus_theme)
++	    {
++	      rounded_top_left_val = TRUE;
++	      rounded_top_right_val = TRUE;
++	      rounded_bottom_left_val = TRUE;
++	      rounded_bottom_right_val = TRUE;
++	      rounded_top_left = TRUE;
++	      rounded_top_right = TRUE;
++	      rounded_bottom_left = TRUE;
++	      rounded_bottom_right = TRUE;
++	    }
++	}
+       title_scale_val = 1.0;
+       if (title_scale && !parse_title_scale (title_scale, &title_scale_val, context, error))
+         return;