]> Pileus Git - ~andy/gtk/commitdiff
Correct the calculation of maskstride. (#320152, Peter Zelezny)
authorTor Lillqvist <tml@novell.com>
Mon, 7 Nov 2005 08:16:29 +0000 (08:16 +0000)
committerTor Lillqvist <tml@src.gnome.org>
Mon, 7 Nov 2005 08:16:29 +0000 (08:16 +0000)
2005-11-07  Tor Lillqvist  <tml@novell.com>

* gdk/win32/gdkcursor-win32.c (pixbuf_to_hbitmaps_normal):
Correct the calculation of maskstride. (#320152, Peter Zelezny)

ChangeLog
ChangeLog.pre-2-10
gdk/win32/gdkcursor-win32.c

index 3bed44b886767c664936f9eb2b49be08965a38f5..8e4615d7bd9d6ff106d3f9ea9f37f329875e2f77 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-11-07  Tor Lillqvist  <tml@novell.com>
+
+       * gdk/win32/gdkcursor-win32.c (pixbuf_to_hbitmaps_normal):
+       Correct the calculation of maskstride. (#320152, Peter Zelezny)
+       
 2005-11-06  Michael Natterer  <mitch@imendio.com>
 
        * gtk/Makefile.am (icons): fixed rule to actually create the
index 3bed44b886767c664936f9eb2b49be08965a38f5..8e4615d7bd9d6ff106d3f9ea9f37f329875e2f77 100644 (file)
@@ -1,3 +1,8 @@
+2005-11-07  Tor Lillqvist  <tml@novell.com>
+
+       * gdk/win32/gdkcursor-win32.c (pixbuf_to_hbitmaps_normal):
+       Correct the calculation of maskstride. (#320152, Peter Zelezny)
+       
 2005-11-06  Michael Natterer  <mitch@imendio.com>
 
        * gtk/Makefile.am (icons): fixed rule to actually create the
index d3ff185fa8ce0959cd977725cd1cf8d520e631cd..ea82597385c9f3a889606f071e3019690fab325a 100644 (file)
@@ -756,11 +756,7 @@ pixbuf_to_hbitmaps_normal (GdkPixbuf *pixbuf,
     bmstride += 4 - (bmstride % 4);
 
   /* MSDN says mask rows are aligned to "LONG" boundaries */
-  maskstride = width / 8;
-  if (maskstride % 4 != 0)
-    maskstride += 4 - (maskstride % 4);
-  if (maskstride < 4)  /* one word minimum */
-    maskstride = 4;
+  maskstride = (((width + 31) & ~31) >> 3);
 
   indata = gdk_pixbuf_get_pixels (pixbuf);
   rowstride = gdk_pixbuf_get_rowstride (pixbuf);