[libwnck] pager: more negative size fixes
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libwnck] pager: more negative size fixes
- Date: Wed, 28 Apr 2021 10:52:21 +0000 (UTC)
commit 5f88fa130785f498aa68e5d57be3a418457a38f3
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Wed Apr 28 13:44:20 2021 +0300
pager: more negative size fixes
wnck_pager_get_preferred_width and wnck_pager_get_preferred_height
also can return negative size if wnck_screen_get_workspace_count
returns 0.
libwnck/pager.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/libwnck/pager.c b/libwnck/pager.c
index c1d4f43..c029287 100644
--- a/libwnck/pager.c
+++ b/libwnck/pager.c
@@ -572,7 +572,7 @@ wnck_pager_get_preferred_width (GtkWidget *widget,
wnck_pager_size_request (widget, &req);
- *minimum_width = *natural_width = req.width;
+ *minimum_width = *natural_width = MAX (req.width, 0);
}
static void
@@ -634,7 +634,7 @@ wnck_pager_get_preferred_height (GtkWidget *widget,
wnck_pager_size_request (widget, &req);
- *minimum_height = *natural_height = req.height;
+ *minimum_height = *natural_height = MAX (req.height, 0);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]