@@ -1055,43 +1055,46 @@ mate_panel_applet_get_preferred_width (GtkWidget *widget,
10551055 int * minimum_width ,
10561056 int * natural_width )
10571057{
1058- MatePanelApplet * applet = MATE_PANEL_APPLET (widget );
1059- gint scale ;
1060-
10611058 GTK_WIDGET_CLASS (mate_panel_applet_parent_class )-> get_preferred_width (widget ,
10621059 minimum_width ,
10631060 natural_width );
10641061
1062+ #if !GTK_CHECK_VERSION (3 , 23 , 0 )
1063+ MatePanelApplet * applet = MATE_PANEL_APPLET (widget );
10651064 if (applet -> priv -> out_of_process ) {
1066- /* Out-of-process applets end up scaled up doubly. We divide by the scale factor to ensure
1065+ /* Out-of-process applets end up scaled up doubly with GTK 3.22.
1066+ * For these builds divide by the scale factor to ensure
10671067 * they are back at their own intended size.
10681068 */
1069+ gint scale ;
10691070 scale = gtk_widget_get_scale_factor (widget );
10701071 * minimum_width /= scale ;
10711072 * natural_width /= scale ;
10721073 }
1074+ #endif
10731075}
10741076
10751077static void
10761078mate_panel_applet_get_preferred_height (GtkWidget * widget ,
10771079 int * minimum_height ,
10781080 int * natural_height )
10791081{
1080- MatePanelApplet * applet = MATE_PANEL_APPLET (widget );
1081- gint scale ;
1082-
10831082 GTK_WIDGET_CLASS (mate_panel_applet_parent_class )-> get_preferred_height (widget ,
10841083 minimum_height ,
10851084 natural_height );
1086-
1085+ #if !GTK_CHECK_VERSION (3 , 23 , 0 )
1086+ MatePanelApplet * applet = MATE_PANEL_APPLET (widget );
10871087 if (applet -> priv -> out_of_process ) {
1088- /* Out-of-process applets end up scaled up doubly. We divide by the scale factor to ensure
1088+ gint scale ;
1089+ /* Out-of-process applets end up scaled up doubly with GTK 3.22.
1090+ * For these builds divide by the scale factor to ensure
10891091 * they are back at their own intended size.
10901092 */
10911093 scale = gtk_widget_get_scale_factor (widget );
10921094 * minimum_height /= scale ;
10931095 * natural_height /= scale ;
10941096 }
1097+ #endif
10951098}
10961099
10971100static GtkSizeRequestMode
0 commit comments