summaryrefslogtreecommitdiff
path: root/gdk
diff options
context:
space:
mode:
authorBenjamin Otte <otte.benjamin@googlemail.com>2023-03-16 20:59:17 +0000
committerBenjamin Otte <otte.benjamin@googlemail.com>2023-03-16 17:05:40 -0400
commitd31dc4343bb153dc241e862c6d194c5571d20472 (patch)
treeb65d7634a51f07903e4de7614b75f46f5e18367b /gdk
parentce651ee92476f8c888b3f22c58ab23695a41f42e (diff)
downloadgtk+-d31dc4343bb153dc241e862c6d194c5571d20472.tar.gz
Merge branch 'wip/otte/for-main' into 'main'
Various small fixes Closes #5380 See merge request GNOME/gtk!5662 (cherry picked from commit fbc8bfb3031cbbdddc4978d6326d68ae19f3f3e3) 707c63c6 win32: Fix rowstride math ef3c515c rowstrides are gsize, not int a0382ef4 listview: Fix culling issues when using CSS padding
Diffstat (limited to 'gdk')
-rw-r--r--gdk/gdktexture.c2
-rw-r--r--gdk/win32/gdkcursor-win32.c9
2 files changed, 6 insertions, 5 deletions
diff --git a/gdk/gdktexture.c b/gdk/gdktexture.c
index 007901ffe8..41cb8ea11a 100644
--- a/gdk/gdktexture.c
+++ b/gdk/gdktexture.c
@@ -395,7 +395,7 @@ gdk_texture_new_for_pixbuf (GdkPixbuf *pixbuf)
bytes = g_bytes_new_with_free_func (gdk_pixbuf_get_pixels (pixbuf),
gdk_pixbuf_get_height (pixbuf)
- * gdk_pixbuf_get_rowstride (pixbuf),
+ * (gsize) gdk_pixbuf_get_rowstride (pixbuf),
g_object_unref,
g_object_ref (pixbuf));
texture = gdk_memory_texture_new (gdk_pixbuf_get_width (pixbuf),
diff --git a/gdk/win32/gdkcursor-win32.c b/gdk/win32/gdkcursor-win32.c
index dc707d5674..5d388d04b2 100644
--- a/gdk/win32/gdkcursor-win32.c
+++ b/gdk/win32/gdkcursor-win32.c
@@ -1005,7 +1005,8 @@ gdk_win32_icon_to_pixbuf_libgtk_only (HICON hicon,
} bmi;
HDC hdc;
uint8_t *pixels, *bits;
- int rowstride, x, y, w, h;
+ int x, y, w, h;
+ gsize rowstride;
if (!GDI_CALL (GetIconInfo, (hicon, &ii)))
return NULL;
@@ -1057,7 +1058,7 @@ gdk_win32_icon_to_pixbuf_libgtk_only (HICON hicon,
no_alpha = FALSE;
pixels += 4;
}
- pixels += (w * 4 - rowstride);
+ pixels += rowstride - w * 4;
}
/* mask */
@@ -1072,7 +1073,7 @@ gdk_win32_icon_to_pixbuf_libgtk_only (HICON hicon,
pixels[3] = 255 - bits[(x + y * w) * 4];
pixels += 4;
}
- pixels += (w * 4 - rowstride);
+ pixels += rowstride - w * 4;
}
}
}
@@ -1146,7 +1147,7 @@ gdk_win32_icon_to_pixbuf_libgtk_only (HICON hicon,
xorp++;
}
}
- pixels += (w * 4 - rowstride);
+ pixels += rowstride - w * 4;
}
}