summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Kareh <[email protected]>2018-03-02 16:07:04 -0500
committerraveit65 <[email protected]>2018-03-20 07:23:20 +0100
commita32c8da1bd262cc0e80b3ace033335120ffbe0b7 (patch)
tree8487ebcd6ed8af74daa573cb21c790ffaabe02bb
parent976ae5cc10c72cff456b405a710f90850d6a488d (diff)
downloadmate-panel-a32c8da1bd262cc0e80b3ace033335120ffbe0b7.tar.bz2
mate-panel-a32c8da1bd262cc0e80b3ace033335120ffbe0b7.tar.xz
Fix out-of-process applet sizes for HiDPI
-rw-r--r--libmate-panel-applet/mate-panel-applet.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/libmate-panel-applet/mate-panel-applet.c b/libmate-panel-applet/mate-panel-applet.c
index 25430ae8..a1b49122 100644
--- a/libmate-panel-applet/mate-panel-applet.c
+++ b/libmate-panel-applet/mate-panel-applet.c
@@ -1026,10 +1026,8 @@ mate_panel_applet_get_preferred_width (GtkWidget *widget,
* they are back at their own intended size.
*/
scale = gtk_widget_get_scale_factor (widget);
- if (scale) {
- *minimum_width /= scale;
- *natural_width /= scale;
- }
+ *minimum_width /= scale;
+ *natural_width /= scale;
}
}
@@ -1050,10 +1048,8 @@ mate_panel_applet_get_preferred_height (GtkWidget *widget,
* they are back at their own intended size.
*/
scale = gtk_widget_get_scale_factor (widget);
- if (scale) {
- *minimum_height /= scale;
- *natural_height /= scale;
- }
+ *minimum_height /= scale;
+ *natural_height /= scale;
}
}
@@ -1063,6 +1059,9 @@ 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)
@@ -1500,9 +1499,9 @@ mate_panel_applet_change_background(MatePanelApplet *applet,
GdkWindow* window;
if (applet->priv->out_of_process)
- window = gtk_widget_get_window (applet->priv->plug);
+ window = gtk_widget_get_window (GTK_WIDGET (applet->priv->plug));
else
- window = gtk_widget_get_window GTK_WIDGET((applet));
+ window = gtk_widget_get_window (GTK_WIDGET (applet));
gtk_widget_set_app_paintable(GTK_WIDGET(applet),TRUE);