Kaydet (Commit) 1cf3e446 authored tarafından Lucas Baudin's avatar Lucas Baudin

gtk3: Avoid crash with some themes (unico based)

We didn't check wether the window was big enough to draw all the widgets. Sometimes, when the window was displaying, it was too small and drawing outside of the window caused a crash, we didn't take into account that the root point for drawing gtk3 widgets wasn't always (0,0).
üst 5122196a
......@@ -1002,8 +1002,10 @@ void GtkSalGraphics::renderAreaToPix( cairo_t *cr,
unsigned char *src = data.get();
src += (int)ay * nStride + (int)ax * 3;
awidth = MIN (region->width, size.getX() - ax);
aheight = MIN (region->height, size.getY() - ay);
for (int y = 0; y < size.getY(); ++y)
for (int y = 0; y < aheight; ++y)
{
for (int x = 0; x < awidth && y < aheight; ++x)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment