From 166d609c2491b5fe3c0f16267748c545636bd948 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alberts=20Muktup=C4=81vels?= Date: Wed, 15 Oct 2014 07:34:24 +0300 Subject: [PATCH] pager: don't return invalid workspace rect Make sure that get_workspace_rect does not return invalid workspace rectangle. Looks like this functions gets called before allocation is set on pager widget. In this case set rect->{x,y,widht,height} to 0. This fixes following bug in gnome-pane: *** BUG *** In pixman_region32_init_rect: Invalid rectangle passed Set a breakpoint on '_pixman_log_error' to debug --- libwnck/pager.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/libwnck/pager.c b/libwnck/pager.c index 690ed33..eef90c7 100644 --- a/libwnck/pager.c +++ b/libwnck/pager.c @@ -788,6 +788,17 @@ get_workspace_rect (WnckPager *pager, gtk_widget_get_allocation (widget, &allocation); + if (allocation.x == -1 || allocation.y == -1 || + allocation.width == -1 || allocation.height == -1) + { + rect->x = 0; + rect->y = 0; + rect->width = 0; + rect->height = 0; + + return; + } + _wnck_pager_get_padding (pager, &padding); gtk_widget_style_get (widget, "focus-line-width", &focus_width, -- 2.1.0