fix mate-panel workspace-switcher aspect ratio
This commit is contained in:
parent
a65a7e6b97
commit
e20600dcd0
@ -3,11 +3,13 @@
|
|||||||
Summary: Window Navigator Construction Kit
|
Summary: Window Navigator Construction Kit
|
||||||
Name: libwnck3
|
Name: libwnck3
|
||||||
Version: 40.0
|
Version: 40.0
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
URL: http://download.gnome.org/sources/%{source_name}/
|
URL: http://download.gnome.org/sources/%{source_name}/
|
||||||
Source0: http://download.gnome.org/sources/%{source_name}/40/%{source_name}-%{version}.tar.xz
|
Source0: http://download.gnome.org/sources/%{source_name}/40/%{source_name}-%{version}.tar.xz
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
|
|
||||||
|
Patch1: libwnck_0001-Revert-pager-do-not-change-workspace-size-from-size_.patch
|
||||||
|
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
BuildRequires: meson
|
BuildRequires: meson
|
||||||
BuildRequires: gettext
|
BuildRequires: gettext
|
||||||
@ -36,7 +38,7 @@ developing applications that use %{name}.
|
|||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{source_name}-%{version}
|
%autosetup -n %{source_name}-%{version} -p1
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@ -70,6 +72,11 @@ developing applications that use %{name}.
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Jun 11 2021 Wolfgang Ulbrich <fedora@raveit.de> - 40.0-2
|
||||||
|
- revert https://gitlab.gnome.org/GNOME/libwnck/-/commit/3456b74
|
||||||
|
- fixes rhbz #1971048
|
||||||
|
- and https://github.com/mate-desktop/mate-panel/issues/1230
|
||||||
|
|
||||||
* Wed May 26 2021 Kalev Lember <klember@redhat.com> - 40.0-1
|
* Wed May 26 2021 Kalev Lember <klember@redhat.com> - 40.0-1
|
||||||
- Update to 40.0
|
- Update to 40.0
|
||||||
- Tighten soname globs
|
- Tighten soname globs
|
||||||
|
@ -0,0 +1,98 @@
|
|||||||
|
From 89a5825eb20bfa91b91055e5a3dfe6445e6b9bd2 Mon Sep 17 00:00:00 2001
|
||||||
|
From: raveit65 <mate@raveit.de>
|
||||||
|
Date: Fri, 11 Jun 2021 21:26:40 +0200
|
||||||
|
Subject: [PATCH] Revert "pager: do not change workspace size from
|
||||||
|
size_allocate"
|
||||||
|
|
||||||
|
This reverts commit 3456b747b6381f17d48629dd8fdd4d511e739b10.
|
||||||
|
---
|
||||||
|
libwnck/pager.c | 59 +++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
1 file changed, 59 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/libwnck/pager.c b/libwnck/pager.c
|
||||||
|
index c769d62..a563a4d 100644
|
||||||
|
--- a/libwnck/pager.c
|
||||||
|
+++ b/libwnck/pager.c
|
||||||
|
@@ -122,6 +122,8 @@ static void wnck_pager_get_preferred_height_for_width (GtkWidget *widget,
|
||||||
|
int width,
|
||||||
|
int *minimum_height,
|
||||||
|
int *natural_height);
|
||||||
|
+static void wnck_pager_size_allocate (GtkWidget *widget,
|
||||||
|
+ GtkAllocation *allocation);
|
||||||
|
static gboolean wnck_pager_draw (GtkWidget *widget,
|
||||||
|
cairo_t *cr);
|
||||||
|
static gboolean wnck_pager_button_press (GtkWidget *widget,
|
||||||
|
@@ -247,6 +249,7 @@ wnck_pager_class_init (WnckPagerClass *klass)
|
||||||
|
widget_class->get_preferred_width_for_height = wnck_pager_get_preferred_width_for_height;
|
||||||
|
widget_class->get_preferred_height = wnck_pager_get_preferred_height;
|
||||||
|
widget_class->get_preferred_height_for_width = wnck_pager_get_preferred_height_for_width;
|
||||||
|
+ widget_class->size_allocate = wnck_pager_size_allocate;
|
||||||
|
widget_class->draw = wnck_pager_draw;
|
||||||
|
widget_class->button_press_event = wnck_pager_button_press;
|
||||||
|
widget_class->button_release_event = wnck_pager_button_release;
|
||||||
|
@@ -684,6 +687,62 @@ wnck_pager_get_preferred_height_for_width (GtkWidget *widget,
|
||||||
|
*natural_height = *minimum_height = MAX (height, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
+static gboolean
|
||||||
|
+_wnck_pager_queue_resize (gpointer data)
|
||||||
|
+{
|
||||||
|
+ gtk_widget_queue_resize (GTK_WIDGET (data));
|
||||||
|
+ return FALSE;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static void
|
||||||
|
+wnck_pager_size_allocate (GtkWidget *widget,
|
||||||
|
+ GtkAllocation *allocation)
|
||||||
|
+{
|
||||||
|
+ WnckPager *pager;
|
||||||
|
+ int workspace_size;
|
||||||
|
+ GtkBorder padding;
|
||||||
|
+ int width;
|
||||||
|
+ int height;
|
||||||
|
+
|
||||||
|
+ pager = WNCK_PAGER (widget);
|
||||||
|
+
|
||||||
|
+ width = allocation->width;
|
||||||
|
+ height = allocation->height;
|
||||||
|
+
|
||||||
|
+ _wnck_pager_get_padding (pager, &padding);
|
||||||
|
+ width -= padding.left + padding.right;
|
||||||
|
+ height -= padding.top + padding.bottom;
|
||||||
|
+
|
||||||
|
+ g_assert (pager->priv->n_rows > 0);
|
||||||
|
+
|
||||||
|
+ if (pager->priv->orientation == GTK_ORIENTATION_VERTICAL)
|
||||||
|
+ {
|
||||||
|
+ if (pager->priv->show_all_workspaces)
|
||||||
|
+ workspace_size = (width - (pager->priv->n_rows - 1)) / pager->priv->n_rows;
|
||||||
|
+ else
|
||||||
|
+ workspace_size = width;
|
||||||
|
+ }
|
||||||
|
+ else
|
||||||
|
+ {
|
||||||
|
+ if (pager->priv->show_all_workspaces)
|
||||||
|
+ workspace_size = (height - (pager->priv->n_rows - 1))/ pager->priv->n_rows;
|
||||||
|
+ else
|
||||||
|
+ workspace_size = height;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ workspace_size = MAX (workspace_size, 1);
|
||||||
|
+
|
||||||
|
+ if (workspace_size != pager->priv->workspace_size)
|
||||||
|
+ {
|
||||||
|
+ pager->priv->workspace_size = workspace_size;
|
||||||
|
+ g_idle_add (_wnck_pager_queue_resize, pager);
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ GTK_WIDGET_CLASS (wnck_pager_parent_class)->size_allocate (widget,
|
||||||
|
+ allocation);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
static void
|
||||||
|
get_workspace_rect (WnckPager *pager,
|
||||||
|
int space,
|
||||||
|
--
|
||||||
|
2.31.1
|
||||||
|
|
Loading…
Reference in New Issue
Block a user