diff options
author | Alberts Muktupāvels <alberts.muktupavels@gmail.com> | 2021-04-28 13:44:20 +0300 |
---|---|---|
committer | Alberts Muktupāvels <alberts.muktupavels@gmail.com> | 2021-04-28 13:44:20 +0300 |
commit | 5f88fa130785f498aa68e5d57be3a418457a38f3 (patch) | |
tree | cb31cc93d9f79f52a216c5e3fae71a306249105e | |
parent | b1596999e7f5dbd8eb8d052e1a828506e491985b (diff) | |
download | libwnck-5f88fa130785f498aa68e5d57be3a418457a38f3.tar.gz |
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.
-rw-r--r-- | libwnck/pager.c | 4 |
1 files 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 |