diff options
author | Alberts Muktupāvels <alberts.muktupavels@gmail.com> | 2016-04-16 21:07:34 +0300 |
---|---|---|
committer | Alberts Muktupāvels <alberts.muktupavels@gmail.com> | 2016-06-28 12:01:17 +0300 |
commit | a77f3cfd27a828cd11c92f06b95ea3fbbe73b63f (patch) | |
tree | cb3483cb997efa4b1e8005e2ee013d1fde3d9a5f | |
parent | 0bcc8b46ce15130003d17be6113b4a0aa3243b02 (diff) | |
download | libwnck-wip/muktupavels/gnome-3-18.tar.gz |
tasklist: ignore size_allocate with invalid sizewip/muktupavels/gnome-3-18
Ignore wnck_tasklist_size_allocate if it is called with invalid
size. It makes no sense to try calculate button allocations if
width or height of tasklist is <=1.
This fixes this warning:
Negative content width -7 (allocation 1, extents 4x4) while
allocating gadget (node button, owner GtkToggleButton)
-rw-r--r-- | libwnck/tasklist.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libwnck/tasklist.c b/libwnck/tasklist.c index bd99489..a106af2 100644 --- a/libwnck/tasklist.c +++ b/libwnck/tasklist.c @@ -1497,6 +1497,12 @@ wnck_tasklist_size_allocate (GtkWidget *widget, GList *windows_sorted = NULL; int grouping_limit; + if (allocation->width <= 1 || allocation->height <= 1) + { + GTK_WIDGET_CLASS (wnck_tasklist_parent_class)->size_allocate (widget, allocation); + return; + } + tasklist = WNCK_TASKLIST (widget); n_windows = g_list_length (tasklist->priv->windows); |