diff --git a/marco.spec b/marco.spec index 25292f4..5d9c9c0 100644 --- a/marco.spec +++ b/marco.spec @@ -15,7 +15,7 @@ Name: marco Version: %{branch}.1 %if 0%{?rel_build} -Release: 1%{?dist} +Release: 2%{?dist} %else Release: 0.8%{?git_rel}%{?dist} %endif @@ -29,6 +29,11 @@ URL: http://mate-desktop.org # Source for snapshot-builds. %{!?rel_build:Source0: http://git.mate-desktop.org/%{name}/snapshot/%{name}-%{commit}.tar.xz#/%{git_tar}} +# https://github.com/mate-desktop/marco/pull/404 +Patch1: marco_0001-Correct-resize-popup-position-on-HiDPI-displays.patch +# https://github.com/mate-desktop/marco/pull/405 +Patch2: marco_0001-Fix-frame-geometry-to-avoid-stuck-resize-cursor.patch + BuildRequires: desktop-file-utils BuildRequires: gtk3-devel BuildRequires: libcanberra-devel @@ -154,6 +159,9 @@ desktop-file-install \ %changelog +* Wed Apr 25 2018 Wolfgang Ulbrich - 1.20.1-2 +- improve HIDPI support + * Tue Mar 27 2018 Wolfgang Ulbrich - 1.20.1-1 - update to 1.20.1 diff --git a/marco_0001-Correct-resize-popup-position-on-HiDPI-displays.patch b/marco_0001-Correct-resize-popup-position-on-HiDPI-displays.patch new file mode 100644 index 0000000..1a2495a --- /dev/null +++ b/marco_0001-Correct-resize-popup-position-on-HiDPI-displays.patch @@ -0,0 +1,60 @@ +From b1898d7874377dd76f7321e9b3601bdd93fde00b Mon Sep 17 00:00:00 2001 +From: Victor Kareh +Date: Tue, 24 Apr 2018 15:09:08 -0400 +Subject: [PATCH] Correct resize popup position on HiDPI displays + +--- + src/core/window.c | 7 +++++-- + src/ui/resizepopup.c | 8 ++++++++ + 2 files changed, 13 insertions(+), 2 deletions(-) + +diff --git a/src/core/window.c b/src/core/window.c +index abd5af4..44084a0 100644 +--- a/src/core/window.c ++++ b/src/core/window.c +@@ -8073,8 +8073,11 @@ meta_window_refresh_resize_popup (MetaWindow *window) + + if (window->display->grab_resize_popup == NULL) + { +- if (window->size_hints.width_inc > 1 || +- window->size_hints.height_inc > 1) ++ gint scale = gdk_window_get_scale_factor (gdk_get_default_root_window ()); ++ /* Display the resize popup only for windows that report an ++ * increment hint that's larger than the scale factor. */ ++ if (window->size_hints.width_inc > scale || ++ window->size_hints.height_inc > scale) + window->display->grab_resize_popup = + meta_ui_resize_popup_new (window->display->xdisplay, + window->screen->number); +diff --git a/src/ui/resizepopup.c b/src/ui/resizepopup.c +index c60fcd6..0464636 100644 +--- a/src/ui/resizepopup.c ++++ b/src/ui/resizepopup.c +@@ -106,9 +106,11 @@ update_size_window (MetaResizePopup *popup) + char *str; + int x, y; + int width, height; ++ int scale; + + g_return_if_fail (popup->size_window != NULL); + ++ scale = gtk_widget_get_scale_factor (GTK_WIDGET (popup->size_window)); + /* Translators: This represents the size of a window. The first number is + * the width of the window and the second is the height. + */ +@@ -125,6 +127,12 @@ update_size_window (MetaResizePopup *popup) + x = popup->rect.x + (popup->rect.width - width) / 2; + y = popup->rect.y + (popup->rect.height - height) / 2; + ++ if (scale) ++ { ++ x = x / scale; ++ y = y / scale; ++ } ++ + if (gtk_widget_get_realized (popup->size_window)) + { + /* using move_resize to avoid jumpiness */ +-- +2.13.6 + diff --git a/marco_0001-Fix-frame-geometry-to-avoid-stuck-resize-cursor.patch b/marco_0001-Fix-frame-geometry-to-avoid-stuck-resize-cursor.patch new file mode 100644 index 0000000..998ce51 --- /dev/null +++ b/marco_0001-Fix-frame-geometry-to-avoid-stuck-resize-cursor.patch @@ -0,0 +1,28 @@ +From 64ac860fb22157f48e873bca999eeb516f6dfc12 Mon Sep 17 00:00:00 2001 +From: Victor Kareh +Date: Tue, 24 Apr 2018 22:26:41 -0400 +Subject: [PATCH] Fix frame geometry to avoid stuck resize cursor + +--- + src/ui/frames.c | 5 ----- + 1 file changed, 5 deletions(-) + +diff --git a/src/ui/frames.c b/src/ui/frames.c +index 80ee353..90e2b2d 100644 +--- a/src/ui/frames.c ++++ b/src/ui/frames.c +@@ -549,11 +549,6 @@ meta_frames_calc_geometry (MetaFrames *frames, + width / scale, height / scale, + &button_layout, + fgeom); +- +- fgeom->top_height *= scale; +- fgeom->bottom_height *= scale; +- fgeom->left_width *= scale; +- fgeom->right_width *= scale; + } + + MetaFrames* +-- +2.13.6 +