Skip to content

Commit

Permalink
fix rendering and removal of in-process applets on unexpanded panel
Browse files Browse the repository at this point in the history
Fix #797 and #799
  • Loading branch information
lukefromdc authored and raveit65 committed May 12, 2018
1 parent bc79584 commit 6e0188b
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions libmate-panel-applet/mate-panel-applet.c
Original file line number Diff line number Diff line change
Expand Up @@ -1096,18 +1096,15 @@ mate_panel_applet_get_preferred_height (GtkWidget *widget,
static GtkSizeRequestMode
mate_panel_applet_get_request_mode (GtkWidget *widget)
{
MatePanelApplet *applet = MATE_PANEL_APPLET (widget);
MatePanelAppletOrient orientation;

if (applet->priv->out_of_process)
return GTK_SIZE_REQUEST_CONSTANT_SIZE;

orientation = mate_panel_applet_get_orient (applet);
if (orientation == MATE_PANEL_APPLET_ORIENT_UP ||
orientation == MATE_PANEL_APPLET_ORIENT_DOWN)
return GTK_SIZE_REQUEST_HEIGHT_FOR_WIDTH;

return GTK_SIZE_REQUEST_WIDTH_FOR_HEIGHT;
/*Do not use GTK_SIZE_REQUEST_HEIGHT_FOR_WIDTH
*or GTK_SIZE_REQUEST_WIDTH_FOR_HEIGHT
*to avoid problems with in-process applets
*when the panel is not expanded
*See https://github.com/mate-desktop/mate-panel/issues/797
*and https://github.com/mate-desktop/mate-panel/issues/799
*Out of process applets already use GTK_SIZE_REQUEST_CONSTANT_SIZE
*/
return GTK_SIZE_REQUEST_CONSTANT_SIZE;
}

static void
Expand Down

0 comments on commit 6e0188b

Please sign in to comment.