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

Re: Bug#443227: fixed upstream



Jay Berkenbilt <qjb@debian.org> writes:

> Turns out this bug has already been fixed upstream.  The upstream fix
> includes the missing set of braces from my patch and also fixes
> another error found inside the block.  Best bet would be to pull the
> patch from upstream.  If you'd like, I'll generate a diff and post it
> here.

Thanks for reviving this bug, Jay!  The patch you sent still yields
incorrect geometry in my original use case, but upstream HEAD works
for me, as does a revised patch (attached) incorporating an additional
logic fix per upstream.

-- 
Aaron M. Ucko, KB1CJC (amu at alum.mit.edu, ucko at debian.org)
http://www.mit.edu/~amu/ | http://stuff.mit.edu/cgi/finger/?amu@monk.mit.edu

Index: x11-apps-7.3+1.0/xclock/Clock.c
===================================================================
--- x11-apps-7.3+1.0.orig/xclock/Clock.c	2008-05-12 19:43:06.000000000 -0400
+++ x11-apps-7.3+1.0/xclock/Clock.c	2008-05-12 20:29:19.000000000 -0400
@@ -656,46 +656,48 @@
 		     2 * w->clock.padding;
        }
        else
+       {
 #endif
 #ifndef NO_I18N 
-       if (!no_locale) {
-	   XFontSetExtents *fse;
+	  if (!no_locale) {
+	      XFontSetExtents *fse;
 
-	   if(w->clock.fontSet == NULL) {
-	       char **missing, *default_str;
-	       int n_missing;
-	       w->clock.fontSet = XCreateFontSet( XtDisplay(w),
-		 XtDefaultFontSet,
-		 &missing,
-		 &n_missing,
-		 &default_str);
-	   }
-	   if (w->clock.fontSet != NULL)
-	   {
-	       /* don't free this... it's freed with the XFontSet. */
-	       fse = XExtentsOfFontSet(w->clock.fontSet);
-	       
-	       min_width = XmbTextEscapement(w->clock.fontSet,str,
-		 len)
-		 + 2 * w->clock.padding;
-	       min_height = fse->max_logical_extent.height +
-		 3 * w->clock.padding;
-	   } else {
-	       no_locale = True;
-	   }
-       }
+	      if(w->clock.fontSet == NULL) {
+		  char **missing, *default_str;
+		  int n_missing;
+		  w->clock.fontSet = XCreateFontSet( XtDisplay(w),
+		    XtDefaultFontSet,
+		    &missing,
+		    &n_missing,
+		    &default_str);
+	      }
+	      if (w->clock.fontSet != NULL)
+	      {
+		  /* don't free this... it's freed with the XFontSet. */
+		  fse = XExtentsOfFontSet(w->clock.fontSet);
+
+		  min_width = XmbTextEscapement(w->clock.fontSet,str,
+		    len)
+		    + 2 * w->clock.padding;
+		  min_height = fse->max_logical_extent.height +
+		    3 * w->clock.padding;
+	      } else {
+		  no_locale = True;
+	      }
+	  }
 
-       if (!no_locale)
-#endif /* NO_I18N */
-       {
-	   if (w->clock.font == NULL)
-	       w->clock.font = XQueryFont( XtDisplay(w),
-					   XGContextFromGC(
-					    DefaultGCOfScreen(XtScreen(w))) );
-	   min_width = XTextWidth(w->clock.font, str, len) +
-	       2 * w->clock.padding;
-	   min_height = w->clock.font->ascent +
-	       w->clock.font->descent + 2 * w->clock.padding;
+	  if (no_locale)
+   #endif /* NO_I18N */
+	  {
+	      if (w->clock.font == NULL)
+		  w->clock.font = XQueryFont( XtDisplay(w),
+					      XGContextFromGC(
+					       DefaultGCOfScreen(XtScreen(w))) );
+	      min_width = XTextWidth(w->clock.font, str, len) +
+		  2 * w->clock.padding;
+	      min_height = w->clock.font->ascent +
+		  w->clock.font->descent + 2 * w->clock.padding;
+	  }
        }
     }
     if (w->core.width == 0)

Reply to: