Updating branch refs/heads/master to 3eb8ce0e0903d64fbe4ec0e9f0a79c1a955ae6df (commit) from 0bd4a57aff4bd07611245040df2426b58d7521ac (commit)
commit 3eb8ce0e0903d64fbe4ec0e9f0a79c1a955ae6df Author: Andrzej <ndrwr...@gmail.com> Date: Wed Jan 25 14:35:21 2012 +0900 Panel: Removed item size checks. Problem: get_requisition on external plugins returns an old size_request value when the size of the panel is changed quickly (e.g. when user controls the "size" slider using cursor keys). In case of "small" external plugins this means that they are "losing" their "small" status when the user quickly decreases the panel size. This is because their get_requisition size is temporarily larger than the row size. This in turn causes a lot of flicker when the user changes (decreases) the panel size. (the above was tested using an xfce4-mixer plugin with a patch from: https://bugzilla.xfce.org/show_bug.cgi?id=8350 ) Arguably, the itembar doesn't have to check the plugin size, only the "small" flag. It's then the plugins responsibility to render itself in such a way it fits in a single row. The itembar is still using the plugin size to decide the row height. It may temporarily be incorrect when the panel size changes quickly but that doesn't cause flicker. panel/panel-itembar.c | 13 +++---------- 1 files changed, 3 insertions(+), 10 deletions(-) diff --git a/panel/panel-itembar.c b/panel/panel-itembar.c index 2f3564c..e670caa 100644 --- a/panel/panel-itembar.c +++ b/panel/panel-itembar.c @@ -296,10 +296,6 @@ panel_itembar_finalize (GObject *object) (*G_OBJECT_CLASS (panel_itembar_parent_class)->finalize) (object); } -#define CHILD_FITS_IN_ROW(child_req, itembar) \ - ((IS_HORIZONTAL (itembar) && child_req.height <= (itembar)->size) \ - || (!IS_HORIZONTAL (itembar) && child_req.width <= (itembar)->size)) - #define CHILD_LENGTH(child_req, itembar) \ (IS_HORIZONTAL (itembar) ? child_req.width : child_req.height) @@ -339,8 +335,7 @@ panel_itembar_size_request (GtkWidget *widget, /* check if the small child fits in a row */ if (child->option == CHILD_OPTION_SMALL - && itembar->nrows > 1 - && CHILD_FITS_IN_ROW (child_req, itembar)) + && itembar->nrows > 1) { child_len = CHILD_LENGTH (child_req, itembar); @@ -453,8 +448,7 @@ panel_itembar_size_allocate (GtkWidget *widget, child_len = CHILD_LENGTH (child_req, itembar); if (G_UNLIKELY (child->option == CHILD_OPTION_SMALL - && itembar->nrows > 1 - && CHILD_FITS_IN_ROW (child_req, itembar))) + && itembar->nrows > 1)) { /* extract from the available space */ if (child_len > row_max_size) @@ -586,8 +580,7 @@ panel_itembar_size_allocate (GtkWidget *widget, child_len = 1; if (child->option == CHILD_OPTION_SMALL - && itembar->nrows > 1 - && CHILD_FITS_IN_ROW (child_req, itembar)) + && itembar->nrows > 1) { if (row_max_size < child_len) row_max_size = child_len; _______________________________________________ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits