File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed
Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -8060,8 +8060,11 @@ meta_window_refresh_resize_popup (MetaWindow *window)
80608060
80618061 if (window -> display -> grab_resize_popup == NULL )
80628062 {
8063- if (window -> size_hints .width_inc > 1 ||
8064- window -> size_hints .height_inc > 1 )
8063+ gint scale = gdk_window_get_scale_factor (gdk_get_default_root_window ());
8064+ /* Display the resize popup only for windows that report an
8065+ * increment hint that's larger than the scale factor. */
8066+ if (window -> size_hints .width_inc > scale ||
8067+ window -> size_hints .height_inc > scale )
80658068 window -> display -> grab_resize_popup =
80668069 meta_ui_resize_popup_new (window -> display -> xdisplay ,
80678070 window -> screen -> number );
Original file line number Diff line number Diff line change @@ -106,9 +106,11 @@ update_size_window (MetaResizePopup *popup)
106106 char * str ;
107107 int x , y ;
108108 int width , height ;
109+ int scale ;
109110
110111 g_return_if_fail (popup -> size_window != NULL );
111112
113+ scale = gtk_widget_get_scale_factor (GTK_WIDGET (popup -> size_window ));
112114 /* Translators: This represents the size of a window. The first number is
113115 * the width of the window and the second is the height.
114116 */
@@ -125,6 +127,12 @@ update_size_window (MetaResizePopup *popup)
125127 x = popup -> rect .x + (popup -> rect .width - width ) / 2 ;
126128 y = popup -> rect .y + (popup -> rect .height - height ) / 2 ;
127129
130+ if (scale )
131+ {
132+ x = x / scale ;
133+ y = y / scale ;
134+ }
135+
128136 if (gtk_widget_get_realized (popup -> size_window ))
129137 {
130138 /* using move_resize to avoid jumpiness */
You can’t perform that action at this time.
0 commit comments