summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhoton892021-01-21 16:18:40 +0100
committerPhoton892021-01-21 16:18:40 +0100
commit677c14449501eae8ca661b57dc6fe38aa240faa8 (patch)
tree4b417e3f275c63575e89f42e23d6d0c8560f6487
parenta81c75f75a8b05a1c42fa0a38c50ad991946cd06 (diff)
downloadaur-677c14449501eae8ca661b57dc6fe38aa240faa8.tar.gz
Update to 4.16.0, thanks erikjanp for updating the patches!
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD29
-rw-r--r--fix-scrolling.patch716
-rw-r--r--fix-scrolling2.patch58
-rw-r--r--fix-scrolling3.patch290
-rw-r--r--pager-dimensions.patch67
-rw-r--r--wrap-workspaces.patch184
7 files changed, 844 insertions, 518 deletions
diff --git a/.SRCINFO b/.SRCINFO
index cf17fc996e8..ea04c8d9a40 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = xfce4-panel-compiz
pkgdesc = Panel for the Xfce desktop environment with fixes for Compiz
- pkgver = 4.14.4
+ pkgver = 4.16.0
pkgrel = 1
url = https://www.xfce.org/
arch = i686
@@ -17,18 +17,14 @@ pkgbase = xfce4-panel-compiz
depends = hicolor-icon-theme
depends = desktop-file-utils
depends = libwnck3
- provides = xfce4-panel=4.14.4
+ provides = xfce4-panel=4.16.0
conflicts = xfce4-panel
- source = https://archive.xfce.org/src/xfce/xfce4-panel/4.14/xfce4-panel-4.14.4.tar.bz2
- source = fix-scrolling2.patch
- source = fix-scrolling3.patch
- source = pager-dimensions.patch
+ source = https://archive.xfce.org/src/xfce/xfce4-panel/4.16/xfce4-panel-4.16.0.tar.bz2
+ source = fix-scrolling.patch
source = wrap-workspaces.patch
- sha256sums = 8e5ea79412ba84cfada897ff309cbe2cd4aca16b9bd4f93df060229528576fd5
- sha256sums = 2bbcace9c0c25c14fc1180a1064329240867a0b83c1c668aadc8c77f92ee0aab
- sha256sums = 5e17300981a6030a2a3d4172b897e7aea0037401c8c9866cc03d82e0629c7fe2
- sha256sums = 7055df37c000731057af828ef99ffb7193a18b3f2ab7dee541d79de029995cae
- sha256sums = 063f11ddbf695d0f7b819209245e201c8d7420cbf94a6c557593deb2aa061f82
+ sha256sums = 5e979aeeb37d306d72858b1bc67448222ea7a68de01409055b846cd31f3cc53d
+ sha256sums = bff4205da99f706bf931b5624cfeb5586145203048bd4b27609e46e907051136
+ sha256sums = 3c4720674d4cc3d987a254b2f108892a542d97e351fcbacf6dc4c4af395e0c13
pkgname = xfce4-panel-compiz
diff --git a/PKGBUILD b/PKGBUILD
index ec6e60a5f9e..cf772d4da2e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,7 +5,7 @@
pkgname=xfce4-panel-compiz
_realname=xfce4-panel
-pkgver=4.14.4
+pkgver=4.16.0
pkgrel=1
pkgdesc="Panel for the Xfce desktop environment with fixes for Compiz"
arch=('i686' 'x86_64')
@@ -18,34 +18,21 @@ makedepends=('intltool' 'gtk-doc' 'xfce4-dev-tools')
provides=("$_realname=$pkgver")
conflicts=("$_realname")
source=("https://archive.xfce.org/src/xfce/$_realname/${pkgver%.*}/$_realname-$pkgver.tar.bz2"
- fix-scrolling2.patch
- fix-scrolling3.patch
- pager-dimensions.patch
+ fix-scrolling.patch
wrap-workspaces.patch)
-sha256sums=('8e5ea79412ba84cfada897ff309cbe2cd4aca16b9bd4f93df060229528576fd5'
- '2bbcace9c0c25c14fc1180a1064329240867a0b83c1c668aadc8c77f92ee0aab'
- '5e17300981a6030a2a3d4172b897e7aea0037401c8c9866cc03d82e0629c7fe2'
- '7055df37c000731057af828ef99ffb7193a18b3f2ab7dee541d79de029995cae'
- '063f11ddbf695d0f7b819209245e201c8d7420cbf94a6c557593deb2aa061f82')
+sha256sums=('5e979aeeb37d306d72858b1bc67448222ea7a68de01409055b846cd31f3cc53d'
+ 'bff4205da99f706bf931b5624cfeb5586145203048bd4b27609e46e907051136'
+ '3c4720674d4cc3d987a254b2f108892a542d97e351fcbacf6dc4c4af395e0c13')
prepare() {
cd "$srcdir/$_realname-$pkgver"
- # See https://bugzilla.xfce.org/show_bug.cgi?id=3361#c28
- echo "Applying fix-scrolling2.patch:"
- patch -p1 -i "$srcdir/fix-scrolling2.patch"
+ # See https://gitlab.xfce.org/xfce/xfwm4/-/issues/6#note_23168
+ echo "Applying fix-scrolling.patch:"
+ patch -p1 -i "$srcdir/fix-scrolling.patch"
- # See https://bugzilla.xfce.org/show_bug.cgi?id=3361#c32
- echo "Applying fix-scrolling3.patch:"
- patch -p1 -i "$srcdir/fix-scrolling3.patch"
-
- # See https://bugzilla.xfce.org/show_bug.cgi?id=3361#c30
echo "Applying wrap-workspaces.patch:"
patch -p1 -i "$srcdir/wrap-workspaces.patch"
-
- # See https://bugzilla.xfce.org/show_bug.cgi?id=11697
- echo "Applying pager-dimensions.patch:"
- patch -p1 -i "$srcdir/pager-dimensions.patch"
}
build() {
diff --git a/fix-scrolling.patch b/fix-scrolling.patch
new file mode 100644
index 00000000000..49da2958deb
--- /dev/null
+++ b/fix-scrolling.patch
@@ -0,0 +1,716 @@
+diff '--color=auto' -Naur xfce4-panel-4.16.0-orig/plugins/pager/Makefile.in xfce4-panel-4.16.0/plugins/pager/Makefile.in
+--- xfce4-panel-4.16.0-orig/plugins/pager/Makefile.in 2020-12-23 00:01:41.000000000 +0100
++++ xfce4-panel-4.16.0/plugins/pager/Makefile.in 2021-01-19 23:23:26.875526146 +0100
+@@ -894,8 +894,8 @@
+
+ @INTLTOOL_DESKTOP_RULE@
+
+-@MAINTAINER_MODE_TRUE@pager-dialog_ui.h: pager-dialog.glade
+-@MAINTAINER_MODE_TRUE@ $(AM_V_GEN) xdt-csource --static --strip-comments --strip-content --name=pager_dialog_ui $< >$@
++pager-dialog_ui.h: pager-dialog.glade
++ $(AM_V_GEN) xdt-csource --static --strip-comments --strip-content --name=pager_dialog_ui $< >$@
+
+ # vi:set ts=8 sw=8 noet ai nocindent syntax=automake:
+
+diff '--color=auto' -Naur xfce4-panel-4.16.0-orig/plugins/pager/pager.c xfce4-panel-4.16.0/plugins/pager/pager.c
+--- xfce4-panel-4.16.0-orig/plugins/pager/pager.c 2020-12-11 00:14:07.000000000 +0100
++++ xfce4-panel-4.16.0/plugins/pager/pager.c 2021-01-19 23:23:34.819563569 +0100
+@@ -53,8 +53,11 @@
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec);
+-static gboolean pager_plugin_scroll_event (GtkWidget *widget,
++static gboolean pager_buttons_scroll_event (GtkWidget *widget,
+ GdkEventScroll *event);
++static gboolean pager_plugin_scroll_event (GtkWidget *widget,
++ GdkEventScroll *event,
++ gpointer user_data);
+ static void pager_plugin_drag_begin_event (GtkWidget *widget,
+ GdkDragContext *context,
+ gpointer user_data);
+@@ -74,6 +77,7 @@
+ static void pager_plugin_configure_workspace_settings (GtkWidget *button);
+ static void pager_plugin_configure_plugin (XfcePanelPlugin *panel_plugin);
+ static void pager_plugin_screen_layout_changed (PagerPlugin *plugin);
++static void pager_plugin_get_ratio (PagerPlugin *plugin);
+ static void pager_plugin_get_preferred_width (GtkWidget *widget,
+ gint *minimum_width,
+ gint *natural_width);
+@@ -101,15 +105,15 @@
+ XfcePanelPlugin __parent__;
+
+ GtkWidget *pager;
+- GObject *numbering_switch;
+- GObject *numbering_label;
+- GObject *scrolling_switch;
+- GObject *scrolling_label;
++ GObject *numbering_toggle;
++ GObject *scrolling_toggle;
++ GObject *invert_scrolling_toggle;
+
+ WnckScreen *wnck_screen;
+
+ /* settings */
+ guint scrolling : 1;
++ guint invert_scrolling : 1;
+ guint wrap_workspaces : 1;
+ guint miniature_view : 1;
+ gint rows;
+@@ -121,6 +125,7 @@
+ {
+ PROP_0,
+ PROP_WORKSPACE_SCROLLING,
++ PROP_INVERT_WORKSPACE_SCROLLING,
+ PROP_WRAP_WORKSPACES,
+ PROP_MINIATURE_VIEW,
+ PROP_ROWS,
+@@ -147,7 +152,7 @@
+ gobject_class->set_property = pager_plugin_set_property;
+
+ widget_class = GTK_WIDGET_CLASS (klass);
+- widget_class->scroll_event = pager_plugin_scroll_event;
++ widget_class->scroll_event = pager_buttons_scroll_event;
+ widget_class->get_preferred_width = pager_plugin_get_preferred_width;
+ widget_class->get_preferred_width_for_height = pager_plugin_get_preferred_width_for_height;
+ widget_class->get_preferred_height = pager_plugin_get_preferred_height;
+@@ -175,6 +180,13 @@
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ g_object_class_install_property (gobject_class,
++ PROP_INVERT_WORKSPACE_SCROLLING,
++ g_param_spec_boolean ("workspace-invert-scrolling",
++ NULL, NULL,
++ TRUE,
++ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
++
++ g_object_class_install_property (gobject_class,
+ PROP_MINIATURE_VIEW,
+ g_param_spec_boolean ("miniature-view",
+ NULL, NULL,
+@@ -203,6 +215,7 @@
+ {
+ plugin->wnck_screen = NULL;
+ plugin->scrolling = TRUE;
++ plugin->invert_scrolling = FALSE;
+ plugin->wrap_workspaces = FALSE;
+ plugin->miniature_view = TRUE;
+ plugin->rows = 1;
+@@ -225,6 +238,15 @@
+ {
+ case PROP_WORKSPACE_SCROLLING:
+ g_value_set_boolean (value, plugin->scrolling);
++
++ if (G_IS_OBJECT (plugin->invert_scrolling_toggle))
++ gtk_widget_set_sensitive (GTK_WIDGET (plugin->invert_scrolling_toggle), plugin->scrolling);
++
++ pager_plugin_screen_layout_changed (plugin);
++ break;
++
++ case PROP_INVERT_WORKSPACE_SCROLLING:
++ g_value_set_boolean (value, plugin->invert_scrolling);
+ break;
+
+ case PROP_WRAP_WORKSPACES:
+@@ -234,14 +256,8 @@
+ case PROP_MINIATURE_VIEW:
+ g_value_set_boolean (value, plugin->miniature_view);
+
+- if (G_IS_OBJECT (plugin->numbering_label))
+- gtk_widget_set_visible (GTK_WIDGET (plugin->numbering_label), !plugin->miniature_view);
+- if (G_IS_OBJECT (plugin->numbering_switch))
+- gtk_widget_set_visible (GTK_WIDGET (plugin->numbering_switch), !plugin->miniature_view);
+- if (G_IS_OBJECT (plugin->scrolling_label))
+- gtk_widget_set_visible (GTK_WIDGET (plugin->scrolling_label), !plugin->miniature_view);
+- if (G_IS_OBJECT (plugin->scrolling_switch))
+- gtk_widget_set_visible (GTK_WIDGET (plugin->scrolling_switch), !plugin->miniature_view);
++ if (G_IS_OBJECT (plugin->numbering_toggle))
++ gtk_widget_set_sensitive (GTK_WIDGET (plugin->numbering_toggle), !plugin->miniature_view);
+
+ pager_plugin_screen_layout_changed (plugin);
+ break;
+@@ -276,6 +292,10 @@
+ plugin->scrolling = g_value_get_boolean (value);
+ break;
+
++ case PROP_INVERT_WORKSPACE_SCROLLING:
++ plugin->invert_scrolling = g_value_get_boolean (value);
++ break;
++
+ case PROP_WRAP_WORKSPACES:
+ plugin->wrap_workspaces = g_value_get_boolean (value);
+ break;
+@@ -355,10 +375,20 @@
+
+
+ static gboolean
++pager_buttons_scroll_event (GtkWidget *widget,
++ GdkEventScroll *event)
++{
++ pager_plugin_scroll_event(widget, event, XFCE_PAGER_PLUGIN (widget));
++}
++
++
++
++static gboolean
+ pager_plugin_scroll_event (GtkWidget *widget,
+- GdkEventScroll *event)
++ GdkEventScroll *event,
++ gpointer user_data)
+ {
+- PagerPlugin *plugin = XFCE_PAGER_PLUGIN (widget);
++ PagerPlugin *plugin = user_data;
+ WnckWorkspace *active_ws;
+ WnckWorkspace *new_ws;
+ gint active_n;
+@@ -390,31 +420,91 @@
+ active_ws = wnck_screen_get_active_workspace (plugin->wnck_screen);
+ active_n = wnck_workspace_get_number (active_ws);
+
+- if (scrolling_direction == GDK_SCROLL_UP
+- || scrolling_direction == GDK_SCROLL_LEFT)
+- active_n--;
+- else
+- active_n++;
+-
+ n_workspaces = wnck_screen_get_workspace_count (plugin->wnck_screen) - 1;
+
+- if (plugin->wrap_workspaces == TRUE)
++ if (n_workspaces == 0)
+ {
+- /* wrap around */
+- if (active_n < 0)
+- active_n = n_workspaces;
+- else if (active_n > n_workspaces)
+- active_n = 0;
++ /* do we have only one workspace or are we in viewport mode (compiz) */
++ if (wnck_workspace_is_virtual (active_ws))
++ {
++ /* viewport mode */
++ int viewport_x;
++ int viewport_y;
++ int screen_width, screen_height;
++ int workspace_width, workspace_height;
++ int scroll_direction;
++
++ /* total workspacesize, e.g. 5120x1024 (5120=4x1280) */
++ workspace_width = wnck_workspace_get_width (active_ws);
++ workspace_height = wnck_workspace_get_height (active_ws);
++ /* current screensize, e.g. 1280x1024 */
++ screen_width = wnck_screen_get_width (plugin->wnck_screen);
++ screen_height = wnck_screen_get_height (plugin->wnck_screen);
++ /* current viewportcoordinates, e.g. 0,0 or 1280,0 */
++ viewport_x = wnck_workspace_get_viewport_x (active_ws);
++ viewport_y = wnck_workspace_get_viewport_y (active_ws);
++
++ if (scrolling_direction == GDK_SCROLL_UP
++ || scrolling_direction == GDK_SCROLL_LEFT)
++ scroll_direction = (plugin->invert_scrolling ? +1 : -1);
++ else
++ scroll_direction = (plugin->invert_scrolling ? -1 : +1);
++
++ /* viewportscroll is only in x-direction */
++ viewport_x = viewport_x + (scroll_direction * screen_width);
++
++ if (plugin->wrap_workspaces == TRUE)
++ {
++ /* wrap if needed */
++ if (viewport_x > workspace_width)
++ viewport_x = 0;
++ if (viewport_x < 0)
++ viewport_x = workspace_width - screen_width;
++ }
++ else if (viewport_x < 0 || viewport_x >= workspace_width)
++ {
++ /* we do not need to do anything */
++ return TRUE;
++ }
++
++ wnck_screen_move_viewport (plugin->wnck_screen,
++ viewport_x, viewport_y);
++ }
++ else
++ {
++ /* only one workspace, no need to do anything */
++ return TRUE;
++ }
++
++
+ }
+- else if (active_n < 0 || active_n > n_workspaces )
++ else
+ {
+- /* we do not need to do anything */
+- return TRUE;
+- }
++ /* real workspaces */
++ if (scrolling_direction == GDK_SCROLL_UP
++ || scrolling_direction == GDK_SCROLL_LEFT)
++ active_n = active_n + (plugin->invert_scrolling ? +1 : -1);
++ else
++ active_n = active_n + (plugin->invert_scrolling ? -1 : +1);
++
++ if (plugin->wrap_workspaces == TRUE)
++ {
++ /* wrap around */
++ if (active_n < 0)
++ active_n = n_workspaces;
++ else if (active_n > n_workspaces)
++ active_n = 0;
++ }
++ else if (active_n < 0 || active_n > n_workspaces )
++ {
++ /* we do not need to do anything */
++ return TRUE;
++ }
+
+- new_ws = wnck_screen_get_workspace (plugin->wnck_screen, active_n);
+- if (new_ws != NULL && active_ws != new_ws)
+- wnck_workspace_activate (new_ws, event->time);
++ new_ws = wnck_screen_get_workspace (plugin->wnck_screen, active_n);
++ if (new_ws != NULL && active_ws != new_ws)
++ wnck_workspace_activate (new_ws, event->time);
++ }
+
+ return TRUE;
+ }
+@@ -475,13 +565,13 @@
+ g_message ("Setting the pager rows returned false. Maybe the setting is not applied.");
+
+ wnck_pager_set_orientation (WNCK_PAGER (plugin->pager), orientation);
+-G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+- plugin->ratio = (gfloat) gdk_screen_width () / (gfloat) gdk_screen_height ();
+-G_GNUC_END_IGNORE_DEPRECATIONS
+ g_signal_connect_after (G_OBJECT (plugin->pager), "drag-begin",
+ G_CALLBACK (pager_plugin_drag_begin_event), plugin);
+ g_signal_connect_after (G_OBJECT (plugin->pager), "drag-end",
+ G_CALLBACK (pager_plugin_drag_end_event), plugin);
++ /* overwrite default WnckPager widget scroll-event */
++ g_signal_connect(G_OBJECT(plugin->pager), "scroll-event",
++ G_CALLBACK(pager_plugin_scroll_event), plugin);
+ }
+ else
+ {
+@@ -537,6 +627,7 @@
+ const PanelProperty properties[] =
+ {
+ { "workspace-scrolling", G_TYPE_BOOLEAN },
++ { "workspace-invert-scrolling", G_TYPE_BOOLEAN },
+ { "wrap-workspaces", G_TYPE_BOOLEAN },
+ { "miniature-view", G_TYPE_BOOLEAN },
+ { "rows", G_TYPE_UINT },
+@@ -690,6 +781,14 @@
+
+
+ static void
++workspace_scrolling_toggled (GtkWidget *widget, GtkWidget *invert)
++{
++ gtk_widget_set_sensitive (invert, gtk_toggle_button_get_active GTK_TOGGLE_BUTTON (widget));
++}
++
++
++
++static void
+ pager_plugin_configure_plugin (XfcePanelPlugin *panel_plugin)
+ {
+ PagerPlugin *plugin = XFCE_PAGER_PLUGIN (panel_plugin);
+@@ -717,13 +816,24 @@
+ g_signal_connect (G_OBJECT (object), "clicked",
+ G_CALLBACK (pager_plugin_configure_workspace_settings), dialog);
+
+- plugin->scrolling_label = gtk_builder_get_object (builder, "workspace-scrolling-label");
+- plugin->scrolling_switch = gtk_builder_get_object (builder, "workspace-scrolling");
+- panel_return_if_fail (GTK_IS_SWITCH (plugin->scrolling_switch));
++ plugin->scrolling_toggle = gtk_builder_get_object (builder, "workspace-scrolling");
++ panel_return_if_fail (GTK_IS_TOGGLE_BUTTON (plugin->scrolling_toggle));
+ g_object_bind_property (G_OBJECT (plugin), "workspace-scrolling",
+- G_OBJECT (plugin->scrolling_switch), "active",
++ G_OBJECT (plugin->scrolling_toggle), "active",
+ G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL);
+
++ plugin->invert_scrolling_toggle = gtk_builder_get_object (builder, "workspace-invert-scrolling");
++ panel_return_if_fail (GTK_IS_TOGGLE_BUTTON (plugin->invert_scrolling_toggle));
++ g_object_bind_property (G_OBJECT (plugin), "workspace-invert-scrolling",
++ G_OBJECT (plugin->invert_scrolling_toggle), "active",
++ G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL);
++
++ gtk_widget_set_sensitive (GTK_WIDGET (plugin->invert_scrolling_toggle),
++ gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (plugin->scrolling_toggle)));
++
++ g_signal_connect (G_OBJECT (plugin->scrolling_toggle), "toggled",
++ G_CALLBACK (workspace_scrolling_toggled), plugin->invert_scrolling_toggle);
++
+ object = gtk_builder_get_object (builder, "appearance");
+ panel_return_if_fail (GTK_IS_COMBO_BOX (object));
+ g_object_bind_property (G_OBJECT (plugin), "miniature-view",
+@@ -736,17 +846,13 @@
+ G_OBJECT (object), "value",
+ G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL);
+
+- plugin->numbering_label = gtk_builder_get_object (builder, "numbering-label");
+- plugin->numbering_switch = gtk_builder_get_object (builder, "numbering");
+- panel_return_if_fail (GTK_IS_SWITCH (plugin->numbering_switch));
++ plugin->numbering_toggle = gtk_builder_get_object (builder, "numbering");
++ panel_return_if_fail (GTK_IS_TOGGLE_BUTTON (plugin->numbering_toggle));
+ g_object_bind_property (G_OBJECT (plugin), "numbering",
+- G_OBJECT (plugin->numbering_switch), "active",
++ G_OBJECT (plugin->numbering_toggle), "active",
+ G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL);
+
+- gtk_widget_set_visible (GTK_WIDGET (plugin->numbering_label), !plugin->miniature_view);
+- gtk_widget_set_visible (GTK_WIDGET (plugin->numbering_switch), !plugin->miniature_view);
+- gtk_widget_set_visible (GTK_WIDGET (plugin->scrolling_label), !plugin->miniature_view);
+- gtk_widget_set_visible (GTK_WIDGET (plugin->scrolling_switch), !plugin->miniature_view);
++ gtk_widget_set_sensitive (GTK_WIDGET (plugin->numbering_toggle), !plugin->miniature_view);
+
+ /* update the rows limit */
+ pager_plugin_configure_n_workspaces_changed (plugin->wnck_screen, NULL, builder);
+@@ -756,6 +862,30 @@
+
+
+ static void
++pager_plugin_get_ratio (PagerPlugin *plugin)
++{
++ WnckWorkspace *active_ws;
++ GdkRectangle geometry = {0};
++
++ panel_return_if_fail (XFCE_IS_PAGER_PLUGIN (plugin));
++ panel_return_if_fail (WNCK_IS_SCREEN (plugin->wnck_screen));
++
++ active_ws = wnck_screen_get_active_workspace (plugin->wnck_screen);
++ if (wnck_workspace_is_virtual (active_ws))
++ {
++ /* Calculate the ratio for a virtual workspace as used by Compiz */
++ plugin->ratio = (gfloat) wnck_workspace_get_width (active_ws) / (gfloat) wnck_workspace_get_height (active_ws);
++ }
++ else
++ {
++ /* Calculate the ratio for a non-virtual workspace */
++ gdk_monitor_get_geometry(gdk_display_get_primary_monitor(gdk_display_get_default()), &geometry);
++ plugin->ratio = (gfloat) geometry.width / (gfloat) geometry.height;
++ }
++}
++
++
++static void
+ pager_plugin_get_preferred_width (GtkWidget *widget,
+ gint *minimum_width,
+ gint *natural_width)
+@@ -777,6 +907,9 @@
+ {
+ n_workspaces = wnck_screen_get_workspace_count (plugin->wnck_screen);
+ n_cols = MAX (1, (n_workspaces + plugin->rows - 1) / plugin->rows);
++
++ pager_plugin_get_ratio(plugin);
++
+ min_width = nat_width = (gint) (xfce_panel_plugin_get_size (XFCE_PANEL_PLUGIN (plugin)) / plugin->rows * plugin->ratio * n_cols);
+ }
+
+@@ -808,6 +941,9 @@
+ {
+ n_workspaces = wnck_screen_get_workspace_count (plugin->wnck_screen);
+ n_cols = MAX (1, (n_workspaces + plugin->rows - 1) / plugin->rows);
++
++ pager_plugin_get_ratio(plugin);
++
+ if (mode == XFCE_PANEL_PLUGIN_MODE_VERTICAL)
+ min_height = nat_height = (gint) (xfce_panel_plugin_get_size (XFCE_PANEL_PLUGIN (plugin)) / plugin->rows / plugin->ratio * n_cols);
+ else /* (mode == XFCE_PANEL_PLUGIN_MODE_DESKBAR) */
+diff '--color=auto' -Naur xfce4-panel-4.16.0-orig/plugins/pager/pager-dialog.glade xfce4-panel-4.16.0/plugins/pager/pager-dialog.glade
+--- xfce4-panel-4.16.0-orig/plugins/pager/pager-dialog.glade 2020-08-22 00:05:41.000000000 +0200
++++ xfce4-panel-4.16.0/plugins/pager/pager-dialog.glade 2021-01-19 23:23:26.879526164 +0100
+@@ -115,111 +115,64 @@
+ <property name="position">0</property>
+ </packing>
+ </child>
++
++ <!-- Switcher options -->
+ <child>
+- <object class="GtkGrid">
++ <object class="GtkBox">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
++ <property name="spacing">6</property>
++ <property name="orientation">vertical</property>
+ <property name="border_width">6</property>
+- <property name="row_spacing">6</property>
+- <property name="column_spacing">12</property>
++
++ <!-- Appearance label -->
+ <child>
+- <object class="GtkLabel" id="label4">
++ <object class="GtkLabel" id="label5">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+- <property name="margin_left">12</property>
+- <property name="label" translatable="yes">Number of _rows:</property>
+- <property name="use_underline">True</property>
+- <property name="xalign">0</property>
+- </object>
+- <packing>
+- <property name="left_attach">0</property>
+- <property name="top_attach">1</property>
+- </packing>
+- </child>
+- <child>
+- <object class="GtkSpinButton" id="spin1">
+- <property name="visible">True</property>
+- <property name="can_focus">True</property>
+- <property name="halign">end</property>
+- <property name="adjustment">rows</property>
+- <property name="snap_to_ticks">True</property>
+- <property name="numeric">True</property>
+- <property name="update_policy">if-valid</property>
+- </object>
+- <packing>
+- <property name="left_attach">1</property>
+- <property name="top_attach">1</property>
+- </packing>
+- </child>
+- <child>
+- <object class="GtkSwitch" id="numbering">
+- <property name="visible">True</property>
+- <property name="can_focus">True</property>
+- <property name="halign">end</property>
+- <property name="valign">center</property>
+- </object>
+- <packing>
+- <property name="left_attach">1</property>
+- <property name="top_attach">2</property>
+- </packing>
+- </child>
+- <child>
+- <object class="GtkSwitch" id="workspace-scrolling">
+- <property name="visible">True</property>
+- <property name="can_focus">True</property>
+- <property name="halign">end</property>
+- <property name="valign">center</property>
+- </object>
+- <packing>
+- <property name="left_attach">1</property>
+- <property name="top_attach">3</property>
+- </packing>
+- </child>
+- <child>
+- <object class="GtkLabel" id="numbering-label">
+- <property name="visible">True</property>
+- <property name="can_focus">False</property>
+- <property name="margin_left">12</property>
+- <property name="label" translatable="yes">Show workspace number</property>
+- <property name="xalign">0</property>
+- </object>
+- <packing>
+- <property name="left_attach">0</property>
+- <property name="top_attach">2</property>
+- </packing>
+- </child>
+- <child>
+- <object class="GtkLabel" id="workspace-scrolling-label">
+- <property name="visible">True</property>
+- <property name="can_focus">False</property>
+- <property name="margin_left">12</property>
+- <property name="label" translatable="yes">Switch workspaces using the mouse wheel</property>
++ <property name="label" translatable="yes">&lt;b&gt;Appearance&lt;/b&gt;</property>
++ <property name="use_markup">True</property>
+ <property name="xalign">0</property>
++ <property name="margin_left">6</property>
++ <property name="margin_top">6</property>
+ </object>
+ <packing>
+- <property name="left_attach">0</property>
+- <property name="top_attach">3</property>
++ <property name="expand">False</property>
++ <property name="fill">True</property>
++ <property name="position">0</property>
+ </packing>
+ </child>
++
++ <!-- Grid for combobox and spinbox -->
+ <child>
+- <object class="GtkBox">
++ <object class="GtkGrid">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+- <property name="spacing">12</property>
++ <property name="border_width">6</property>
++ <property name="row_spacing">6</property>
++ <property name="column_spacing">12</property>
++ <property name="margin_left">6</property>
++
++ <!-- Mode label -->
+ <child>
+- <object class="GtkLabel" id="label5">
++ <object class="GtkLabel" id="appearance-label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+- <property name="label" translatable="yes">&lt;b&gt;Appearance&lt;/b&gt;</property>
++ <property name="label" translatable="yes">Mode:</property>
++ <property name="tooltip_text" translatable="yes">Switch between different workspace switcher layouts</property>
+ <property name="use_markup">True</property>
++ <property name="margin_left">6</property>
+ <property name="xalign">0</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+- <property name="position">0</property>
++ <property name="left_attach">0</property>
++ <property name="top_attach">0</property>
+ </packing>
+ </child>
++
++ <!-- Mode combobox -->
+ <child>
+ <object class="GtkComboBox" id="appearance">
+ <property name="visible">True</property>
+@@ -229,6 +182,7 @@
+ <property name="model">appearance-model</property>
+ <property name="active">0</property>
+ <property name="id_column">1</property>
++ <property name="tooltip_text" translatable="yes">Switch between different workspace switcher layouts</property>
+ <child>
+ <object class="GtkCellRendererText" id="renderer"/>
+ <attributes>
+@@ -239,25 +193,134 @@
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+- <property name="position">1</property>
++ <property name="left_attach">1</property>
++ <property name="top_attach">0</property>
++ </packing>
++ </child>
++
++ <!-- Number of rows label -->
++ <child>
++ <object class="GtkLabel" id="label4">
++ <property name="visible">True</property>
++ <property name="can_focus">False</property>
++ <property name="margin_left">6</property>
++ <property name="label" translatable="yes">Number of _rows:</property>
++ <property name="tooltip_text" translatable="yes">Number of rows in the workspace switcher</property>
++ <property name="use_underline">True</property>
++ <property name="xalign">0</property>
++ </object>
++ <packing>
++ <property name="expand">False</property>
++ <property name="fill">True</property>
++ <property name="left_attach">0</property>
++ <property name="top_attach">1</property>
++ </packing>
++ </child>
++
++ <!-- Number of rows spinbutton -->
++ <child>
++ <object class="GtkSpinButton" id="spin1">
++ <property name="visible">True</property>
++ <property name="can_focus">True</property>
++ <property name="halign">end</property>
++ <property name="adjustment">rows</property>
++ <property name="snap_to_ticks">True</property>
++ <property name="numeric">True</property>
++ <property name="update_policy">if-valid</property>
++ <property name="tooltip_text" translatable="yes">Number of rows in the workspace switcher</property>
++ </object>
++ <packing>
++ <property name="expand">False</property>
++ <property name="fill">True</property>
++ <property name="left_attach">1</property>
++ <property name="top_attach">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+- <property name="left_attach">0</property>
+- <property name="top_attach">0</property>
+- <property name="width">2</property>
++ <property name="expand">True</property>
++ <property name="fill">True</property>
++ <property name="position">1</property>
++ </packing>
++ </child>
++
++ <!-- Show workspace number toggle -->
++ <child>
++ <object class="GtkCheckButton" id="numbering">
++ <property name="label" translatable="yes">Show workspace _number</property>
++ <property name="tooltip_text" translatable="yes">Show the workspace number in the button</property>
++ <property name="visible">True</property>
++ <property name="can_focus">True</property>
++ <property name="margin_left">12</property>
++ <property name="receives_default">False</property>
++ <property name="use_underline">True</property>
++ </object>
++ <packing>
++ <property name="expand">True</property>
++ <property name="fill">True</property>
++ <property name="position">2</property>
++ </packing>
++ </child>
++
++ <!-- Behaviour label -->
++ <child>
++ <object class="GtkLabel" id="behaviour-label">
++ <property name="visible">True</property>
++ <property name="can_focus">False</property>
++ <property name="label" translatable="yes">&lt;b&gt;Behaviour&lt;/b&gt;</property>
++ <property name="use_markup">True</property>
++ <property name="xalign">0</property>
++ <property name="margin_left">6</property>
++ <property name="margin_top">6</property>
++ </object>
++ <packing>
++ <property name="expand">False</property>
++ <property name="fill">True</property>
++ <property name="position">3</property>
++ </packing>
++ </child>
++
++ <!-- Scrolling behaviour toggle -->
++ <child>
++ <object class="GtkCheckButton" id="workspace-scrolling">
++ <property name="label" translatable="yes">Switch _workspaces using the mouse wheel</property>
++ <property name="tooltip_text" translatable="yes">Switch workspaces using the mouse wheel on the workspace switcher</property>
++ <property name="visible">True</property>
++ <property name="can_focus">True</property>
++ <property name="margin_left">12</property>
++ <property name="receives_default">False</property>
++ <property name="use_underline">True</property>
++ </object>
++ <packing>
++ <property name="expand">False</property>
++ <property name="fill">True</property>
++ <property name="position">4</property>
++ </packing>
++ </child>
++
++ <!-- Invert scrolling toggle -->
++ <child>
++ <object class="GtkCheckButton" id="workspace-invert-scrolling">
++ <property name="label" translatable="yes">_Invert mouse wheel workspace switching direction</property>
++ <property name="tooltip_text" translatable="yes">Invert the direction in which the workspaces are switched</property>
++ <property name="visible">True</property>
++ <property name="can_focus">True</property>
++ <property name="margin_left">24</property>
++ <property name="receives_default">False</property>
++ <property name="use_underline">True</property>
++ <property name="draw_indicator">True</property>
++ </object>
++ <packing>
++ <property name="expand">False</property>
++ <property name="fill">True</property>
++ <property name="position">5</property>
+ </packing>
+ </child>
+ </object>
+- <packing>
+- <property name="expand">True</property>
+- <property name="fill">True</property>
+- <property name="position">1</property>
+- </packing>
+ </child>
+ </object>
+ </child>
++
+ <action-widgets>
+ <action-widget response="0">help-button</action-widget>
+ <action-widget response="0">close-button</action-widget>
diff --git a/fix-scrolling2.patch b/fix-scrolling2.patch
deleted file mode 100644
index b744c688d08..00000000000
--- a/fix-scrolling2.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-diff -Naur xfce4-panel-4.14.0-orig/plugins/pager/pager.c xfce4-panel-4.14.0/plugins/pager/pager.c
---- xfce4-panel-4.14.0-orig/plugins/pager/pager.c 2019-09-04 15:35:31.954681740 +0200
-+++ xfce4-panel-4.14.0/plugins/pager/pager.c 2019-09-04 15:39:59.057180601 +0200
-@@ -53,8 +53,11 @@
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec);
--static gboolean pager_plugin_scroll_event (GtkWidget *widget,
-+static gboolean pager_buttons_scroll_event (GtkWidget *widget,
- GdkEventScroll *event);
-+static gboolean pager_plugin_scroll_event (GtkWidget *widget,
-+ GdkEventScroll *event,
-+ gpointer user_data);
- static void pager_plugin_drag_begin_event (GtkWidget *widget,
- GdkDragContext *context,
- gpointer user_data);
-@@ -141,7 +144,7 @@
- gobject_class->set_property = pager_plugin_set_property;
-
- widget_class = GTK_WIDGET_CLASS (klass);
-- widget_class->scroll_event = pager_plugin_scroll_event;
-+ widget_class->scroll_event = pager_buttons_scroll_event;
- widget_class->get_preferred_width = pager_plugin_get_preferred_width;
- widget_class->get_preferred_width_for_height = pager_plugin_get_preferred_width_for_height;
- widget_class->get_preferred_height = pager_plugin_get_preferred_height;
-@@ -318,10 +321,20 @@
-
-
- static gboolean
-+pager_buttons_scroll_event (GtkWidget *widget,
-+ GdkEventScroll *event)
-+{
-+ pager_plugin_scroll_event(widget, event, XFCE_PAGER_PLUGIN (widget));
-+}
-+
-+
-+
-+static gboolean
- pager_plugin_scroll_event (GtkWidget *widget,
-- GdkEventScroll *event)
-+ GdkEventScroll *event,
-+ gpointer user_data)
- {
-- PagerPlugin *plugin = XFCE_PAGER_PLUGIN (widget);
-+ PagerPlugin *plugin = user_data;
- WnckWorkspace *active_ws;
- WnckWorkspace *new_ws;
- gint active_n;
-@@ -445,6 +458,9 @@
- G_CALLBACK (pager_plugin_drag_begin_event), plugin);
- g_signal_connect_after (G_OBJECT (plugin->pager), "drag-end",
- G_CALLBACK (pager_plugin_drag_end_event), plugin);
-+ /* overwrite default WnckPager widget scroll-event */
-+ g_signal_connect(G_OBJECT(plugin->pager), "scroll-event",
-+ G_CALLBACK(pager_plugin_scroll_event), plugin);
- }
- else
- {
diff --git a/fix-scrolling3.patch b/fix-scrolling3.patch
deleted file mode 100644
index 17ae58c8987..00000000000
--- a/fix-scrolling3.patch
+++ /dev/null
@@ -1,290 +0,0 @@
-diff -Naur xfce4-panel-4.14.0-orig/plugins/pager/Makefile.in xfce4-panel-4.14.0/plugins/pager/Makefile.in
---- xfce4-panel-4.14.0-orig/plugins/pager/Makefile.in 2019-08-11 23:08:31.000000000 +0200
-+++ xfce4-panel-4.14.0/plugins/pager/Makefile.in 2019-09-04 16:03:48.581443183 +0200
-@@ -892,8 +892,8 @@
-
- @INTLTOOL_DESKTOP_RULE@
-
--@MAINTAINER_MODE_TRUE@pager-dialog_ui.h: pager-dialog.glade
--@MAINTAINER_MODE_TRUE@ $(AM_V_GEN) xdt-csource --static --strip-comments --strip-content --name=pager_dialog_ui $< >$@
-+pager-dialog_ui.h: pager-dialog.glade
-+ $(AM_V_GEN) xdt-csource --static --strip-comments --strip-content --name=pager_dialog_ui $< >$@
-
- # vi:set ts=8 sw=8 noet ai nocindent syntax=automake:
-
-diff -Naur xfce4-panel-4.14.0-orig/plugins/pager/pager.c xfce4-panel-4.14.0/plugins/pager/pager.c
---- xfce4-panel-4.14.0-orig/plugins/pager/pager.c 2019-09-04 16:03:36.257339222 +0200
-+++ xfce4-panel-4.14.0/plugins/pager/pager.c 2019-09-04 16:03:48.581443183 +0200
-@@ -109,6 +109,7 @@
-
- /* settings */
- guint scrolling : 1;
-+ guint invert_scrolling : 1;
- guint wrap_workspaces : 1;
- guint miniature_view : 1;
- gint rows;
-@@ -119,6 +120,7 @@
- {
- PROP_0,
- PROP_WORKSPACE_SCROLLING,
-+ PROP_INVERT_WORKSPACE_SCROLLING,
- PROP_WRAP_WORKSPACES,
- PROP_MINIATURE_VIEW,
- PROP_ROWS
-@@ -172,6 +174,13 @@
- G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
- g_object_class_install_property (gobject_class,
-+ PROP_INVERT_WORKSPACE_SCROLLING,
-+ g_param_spec_boolean ("workspace-invert-scrolling",
-+ NULL, NULL,
-+ TRUE,
-+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-+
-+ g_object_class_install_property (gobject_class,
- PROP_MINIATURE_VIEW,
- g_param_spec_boolean ("miniature-view",
- NULL, NULL,
-@@ -193,6 +202,7 @@
- {
- plugin->wnck_screen = NULL;
- plugin->scrolling = TRUE;
-+ plugin->invert_scrolling = FALSE;
- plugin->wrap_workspaces = FALSE;
- plugin->miniature_view = TRUE;
- plugin->rows = 1;
-@@ -216,6 +226,10 @@
- g_value_set_boolean (value, plugin->scrolling);
- break;
-
-+ case PROP_INVERT_WORKSPACE_SCROLLING:
-+ g_value_set_boolean (value, plugin->invert_scrolling);
-+ break;
-+
- case PROP_WRAP_WORKSPACES:
- g_value_set_boolean (value, plugin->wrap_workspaces);
- break;
-@@ -252,6 +266,10 @@
- plugin->scrolling = g_value_get_boolean (value);
- break;
-
-+ case PROP_INVERT_WORKSPACE_SCROLLING:
-+ plugin->invert_scrolling = g_value_get_boolean (value);
-+ break;
-+
- case PROP_WRAP_WORKSPACES:
- plugin->wrap_workspaces = g_value_get_boolean (value);
- break;
-@@ -366,31 +384,89 @@
- active_ws = wnck_screen_get_active_workspace (plugin->wnck_screen);
- active_n = wnck_workspace_get_number (active_ws);
-
-- if (scrolling_direction == GDK_SCROLL_UP
-- || scrolling_direction == GDK_SCROLL_LEFT)
-- active_n--;
-- else
-- active_n++;
--
- n_workspaces = wnck_screen_get_workspace_count (plugin->wnck_screen) - 1;
-
-- if (plugin->wrap_workspaces == TRUE)
-+ if (n_workspaces == 0)
- {
-- /* wrap around */
-- if (active_n < 0)
-- active_n = n_workspaces;
-- else if (active_n > n_workspaces)
-- active_n = 0;
-+ /* do we have only one workspace or are we in viewport mode (compiz) */
-+ if (wnck_workspace_is_virtual (active_ws))
-+ {
-+ /* viewport mode */
-+ int viewport_x;
-+ int viewport_y;
-+ int screen_width, screen_height;
-+ int workspace_width, workspace_height;
-+ int scroll_direction;
-+
-+ /* total workspacesize, e.g. 5120x1024 (5120=4x1280) */
-+ workspace_width = wnck_workspace_get_width (active_ws);
-+ workspace_height = wnck_workspace_get_height (active_ws);
-+ /* current screensize, e.g. 1280x1024 */
-+ screen_width = wnck_screen_get_width (plugin->wnck_screen);
-+ screen_height = wnck_screen_get_height (plugin->wnck_screen);
-+ /* current viewportcoordinates, e.g. 0,0 or 1280,0 */
-+ viewport_x = wnck_workspace_get_viewport_x (active_ws);
-+ viewport_y = wnck_workspace_get_viewport_y (active_ws);
-+
-+ if (scrolling_direction == GDK_SCROLL_UP
-+ || scrolling_direction == GDK_SCROLL_LEFT)
-+ scroll_direction = (plugin->invert_scrolling ? +1 : -1);
-+ else
-+ scroll_direction = (plugin->invert_scrolling ? -1 : +1);
-+
-+ /* viewportscroll is only in x-direction */
-+ viewport_x = viewport_x + (scroll_direction * screen_width);
-+
-+ if (plugin->wrap_workspaces == TRUE)
-+ {
-+ /* wrap if needed */
-+ if (viewport_x > workspace_width)
-+ viewport_x = 0;
-+ if (viewport_x < 0)
-+ viewport_x = workspace_width - screen_width;
-+ }
-+ else if (viewport_x < 0 || viewport_x >= workspace_width)
-+ {
-+ /* we do not need to do anything */
-+ return TRUE;
-+ }
-+
-+ wnck_screen_move_viewport (plugin->wnck_screen,
-+ viewport_x, viewport_y);
-+ }
-+ else
-+ {
-+ /* only one workspace, no need to do anything */
-+ return TRUE;
-+ }
- }
-- else if (active_n < 0 || active_n > n_workspaces )
-+ else
- {
-- /* we do not need to do anything */
-- return TRUE;
-- }
-+ /* real workspaces */
-+ if (scrolling_direction == GDK_SCROLL_UP
-+ || scrolling_direction == GDK_SCROLL_LEFT)
-+ active_n = active_n + (plugin->invert_scrolling ? +1 : -1);
-+ else
-+ active_n = active_n + (plugin->invert_scrolling ? -1 : +1);
-
-- new_ws = wnck_screen_get_workspace (plugin->wnck_screen, active_n);
-- if (new_ws != NULL && active_ws != new_ws)
-- wnck_workspace_activate (new_ws, event->time);
-+ if (plugin->wrap_workspaces == TRUE)
-+ {
-+ /* wrap around */
-+ if (active_n < 0)
-+ active_n = n_workspaces;
-+ else if (active_n > n_workspaces)
-+ active_n = 0;
-+ }
-+ else if (active_n < 0 || active_n > n_workspaces )
-+ {
-+ /* we do not need to do anything */
-+ return TRUE;
-+ }
-+
-+ new_ws = wnck_screen_get_workspace (plugin->wnck_screen, active_n);
-+ if (new_ws != NULL && active_ws != new_ws)
-+ wnck_workspace_activate (new_ws, event->time);
-+ }
-
- return TRUE;
- }
-@@ -515,6 +591,7 @@
- const PanelProperty properties[] =
- {
- { "workspace-scrolling", G_TYPE_BOOLEAN },
-+ { "workspace-invert-scrolling", G_TYPE_BOOLEAN },
- { "wrap-workspaces", G_TYPE_BOOLEAN },
- { "miniature-view", G_TYPE_BOOLEAN },
- { "rows", G_TYPE_UINT },
-@@ -667,11 +744,20 @@
-
-
- static void
-+workspace_scrolling_toggled (GtkWidget *widget, GtkWidget *invert)
-+{
-+ gtk_widget_set_sensitive (invert, gtk_toggle_button_get_active GTK_TOGGLE_BUTTON (widget));
-+}
-+
-+
-+
-+static void
- pager_plugin_configure_plugin (XfcePanelPlugin *panel_plugin)
- {
- PagerPlugin *plugin = XFCE_PAGER_PLUGIN (panel_plugin);
- GtkBuilder *builder;
- GObject *dialog, *object;
-+ GtkWidget *scroll_option;
-
- panel_return_if_fail (XFCE_IS_PAGER_PLUGIN (plugin));
-
-@@ -700,6 +786,19 @@
- G_OBJECT (object), "active",
- G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL);
-
-+ scroll_option = GTK_WIDGET(gtk_builder_get_object(builder, "workspace-invert-scrolling"));
-+ gtk_widget_set_sensitive (GTK_WIDGET (scroll_option),
-+ gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (object)));
-+
-+ g_signal_connect (object, "toggled",
-+ G_CALLBACK (workspace_scrolling_toggled), scroll_option);
-+
-+ object = gtk_builder_get_object (builder, "workspace-invert-scrolling");
-+ panel_return_if_fail (GTK_IS_TOGGLE_BUTTON (object));
-+ g_object_bind_property (G_OBJECT (plugin), "workspace-invert-scrolling",
-+ G_OBJECT (object), "active",
-+ G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL);
-+
- object = gtk_builder_get_object (builder, "miniature-view");
- panel_return_if_fail (GTK_IS_TOGGLE_BUTTON (object));
- g_object_bind_property (G_OBJECT (plugin), "miniature-view",
-diff -Naur xfce4-panel-4.14.0-orig/plugins/pager/pager-dialog.glade xfce4-panel-4.14.0/plugins/pager/pager-dialog.glade
---- xfce4-panel-4.14.0-orig/plugins/pager/pager-dialog.glade 2018-11-26 21:38:09.000000000 +0100
-+++ xfce4-panel-4.14.0/plugins/pager/pager-dialog.glade 2019-09-04 16:03:48.581443183 +0200
-@@ -221,13 +221,45 @@
- <property name="left_padding">18</property>
- <property name="right_padding">6</property>
- <child>
-- <object class="GtkCheckButton" id="workspace-scrolling">
-- <property name="label" translatable="yes">Switch workspaces using the mouse _wheel</property>
-+ <object class="GtkVBox" id="vbox1">
- <property name="visible">True</property>
-- <property name="can_focus">True</property>
-- <property name="receives_default">False</property>
-- <property name="use_underline">True</property>
-- <property name="draw_indicator">True</property>
-+ <property name="orientation">vertical</property>
-+ <property name="spacing">6</property>
-+ <child>
-+ <object class="GtkCheckButton" id="workspace-scrolling">
-+ <property name="label" translatable="yes">Switch workspaces using the mouse _wheel</property>
-+ <property name="visible">True</property>
-+ <property name="can_focus">True</property>
-+ <property name="receives_default">False</property>
-+ <property name="use_underline">True</property>
-+ <property name="draw_indicator">True</property>
-+ </object>
-+ <packing>
-+ <property name="position">0</property>
-+ </packing>
-+ </child>
-+ <child>
-+ <object class="GtkAlignment" id="alignment4">
-+ <property name="visible">True</property>
-+ <property name="left_padding">12</property>
-+ <child>
-+ <object class="GtkCheckButton" id="workspace-invert-scrolling">
-+ <property name="label" translatable="yes">_Invert mouse wheel workspace switching direction</property>
-+ <property name="visible">True</property>
-+ <property name="sensitive">True</property>
-+ <property name="can_focus">True</property>
-+ <property name="receives_default">False</property>
-+ <property name="use_underline">True</property>
-+ <property name="draw_indicator">True</property>
-+ </object>
-+ </child>
-+ </object>
-+ <packing>
-+ <property name="expand">False</property>
-+ <property name="fill">False</property>
-+ <property name="position">1</property>
-+ </packing>
-+ </child>
- </object>
- </child>
- </object>
diff --git a/pager-dimensions.patch b/pager-dimensions.patch
deleted file mode 100644
index e8726206741..00000000000
--- a/pager-dimensions.patch
+++ /dev/null
@@ -1,67 +0,0 @@
---- xfce4-panel-4.14.0-orig/plugins/pager/pager.c 2019-09-05 17:11:16.690993341 +0200
-+++ xfce4-panel-4.14.0/plugins/pager/pager.c 2019-09-05 17:09:02.205850264 +0200
-@@ -77,6 +77,7 @@
- static void pager_plugin_configure_workspace_settings (GtkWidget *button);
- static void pager_plugin_configure_plugin (XfcePanelPlugin *panel_plugin);
- static void pager_plugin_screen_layout_changed (PagerPlugin *plugin);
-+static void pager_plugin_get_ratio (PagerPlugin *plugin);
- static void pager_plugin_get_preferred_width (GtkWidget *widget,
- gint *minimum_width,
- gint *natural_width);
-@@ -527,9 +528,6 @@
- g_message ("Setting the pager rows returned false. Maybe the setting is not applied.");
-
- wnck_pager_set_orientation (WNCK_PAGER (plugin->pager), orientation);
--G_GNUC_BEGIN_IGNORE_DEPRECATIONS
-- plugin->ratio = (gfloat) gdk_screen_width () / (gfloat) gdk_screen_height ();
--G_GNUC_END_IGNORE_DEPRECATIONS
- g_signal_connect_after (G_OBJECT (plugin->pager), "drag-begin",
- G_CALLBACK (pager_plugin_drag_begin_event), plugin);
- g_signal_connect_after (G_OBJECT (plugin->pager), "drag-end",
-@@ -825,6 +823,26 @@
-
-
- static void
-+pager_plugin_get_ratio (PagerPlugin *plugin)
-+{
-+ WnckWorkspace *active_ws;
-+
-+ panel_return_if_fail (XFCE_IS_PAGER_PLUGIN (plugin));
-+ panel_return_if_fail (WNCK_IS_SCREEN (plugin->wnck_screen));
-+
-+ active_ws = wnck_screen_get_active_workspace (plugin->wnck_screen);
-+ if (wnck_workspace_is_virtual (active_ws))
-+ {
-+ plugin->ratio = (gfloat) wnck_workspace_get_width (active_ws) / (gfloat) wnck_workspace_get_height (active_ws);
-+ }
-+ else
-+ {
-+ plugin->ratio = (gfloat) gdk_screen_width () / (gfloat) gdk_screen_height ();
-+ }
-+}
-+
-+
-+static void
- pager_plugin_get_preferred_width (GtkWidget *widget,
- gint *minimum_width,
- gint *natural_width)
-@@ -846,6 +864,9 @@
- {
- n_workspaces = wnck_screen_get_workspace_count (plugin->wnck_screen);
- n_cols = MAX (1, (n_workspaces + plugin->rows - 1) / plugin->rows);
-+
-+ pager_plugin_get_ratio(plugin);
-+
- min_width = nat_width = (gint) (xfce_panel_plugin_get_size (XFCE_PANEL_PLUGIN (plugin)) / plugin->rows * plugin->ratio * n_cols);
- }
-
-@@ -877,6 +898,9 @@
- {
- n_workspaces = wnck_screen_get_workspace_count (plugin->wnck_screen);
- n_cols = MAX (1, (n_workspaces + plugin->rows - 1) / plugin->rows);
-+
-+ pager_plugin_get_ratio(plugin);
-+
- if (mode == XFCE_PANEL_PLUGIN_MODE_VERTICAL)
- min_height = nat_height = (gint) (xfce_panel_plugin_get_size (XFCE_PANEL_PLUGIN (plugin)) / plugin->rows / plugin->ratio * n_cols);
- else /* (mode == XFCE_PANEL_PLUGIN_MODE_DESKBAR) */
diff --git a/wrap-workspaces.patch b/wrap-workspaces.patch
index 74e92e128f6..a5e337ffa1d 100644
--- a/wrap-workspaces.patch
+++ b/wrap-workspaces.patch
@@ -1,84 +1,126 @@
-diff -Naur xfce4-panel-4.14.0-orig/plugins/pager/pager.c xfce4-panel-4.14.0/plugins/pager/pager.c
---- xfce4-panel-4.14.0-orig/plugins/pager/pager.c 2019-09-04 17:18:06.995162924 +0200
-+++ xfce4-panel-4.14.0/plugins/pager/pager.c 2019-09-04 17:16:38.674429040 +0200
-@@ -757,7 +757,7 @@
- PagerPlugin *plugin = XFCE_PAGER_PLUGIN (panel_plugin);
- GtkBuilder *builder;
- GObject *dialog, *object;
-- GtkWidget *scroll_option;
-+ GtkWidget *scroll_options;
+diff -Naur xfce4-panel-4.16.0-orig/plugins/pager/pager.c xfce4-panel-4.16.0/plugins/pager/pager.c
+--- xfce4-panel-4.16.0-orig/plugins/pager/pager.c 2021-01-19 22:31:30.317186954 +0100
++++ xfce4-panel-4.16.0/plugins/pager/pager.c 2021-01-19 22:32:02.773341344 +0100
+@@ -106,7 +106,7 @@
+ GtkWidget *pager;
+ GObject *numbering_toggle;
+ GObject *scrolling_toggle;
+- GObject *invert_scrolling_toggle;
++ GObject *scroll_options_box;
- panel_return_if_fail (XFCE_IS_PAGER_PLUGIN (plugin));
+ WnckScreen *wnck_screen;
-@@ -786,12 +786,12 @@
- G_OBJECT (object), "active",
- G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL);
+@@ -238,8 +238,8 @@
+ case PROP_WORKSPACE_SCROLLING:
+ g_value_set_boolean (value, plugin->scrolling);
-- scroll_option = GTK_WIDGET(gtk_builder_get_object(builder, "workspace-invert-scrolling"));
-- gtk_widget_set_sensitive (GTK_WIDGET (scroll_option),
-+ scroll_options = GTK_WIDGET(gtk_builder_get_object(builder, "scroll-options"));
-+ gtk_widget_set_sensitive (GTK_WIDGET (scroll_options),
- gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (object)));
+- if (G_IS_OBJECT (plugin->invert_scrolling_toggle))
+- gtk_widget_set_sensitive (GTK_WIDGET (plugin->invert_scrolling_toggle), plugin->scrolling);
++ if (G_IS_OBJECT (plugin->scroll_options_box))
++ gtk_widget_set_sensitive (GTK_WIDGET (plugin->scroll_options_box), plugin->scrolling);
- g_signal_connect (object, "toggled",
-- G_CALLBACK (workspace_scrolling_toggled), scroll_option);
-+ G_CALLBACK (workspace_scrolling_toggled), scroll_options);
+ pager_plugin_screen_layout_changed (plugin);
+ break;
+@@ -824,17 +824,29 @@
+ G_OBJECT (plugin->scrolling_toggle), "active",
+ G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL);
- object = gtk_builder_get_object (builder, "workspace-invert-scrolling");
- panel_return_if_fail (GTK_IS_TOGGLE_BUTTON (object));
-@@ -799,6 +799,12 @@
- G_OBJECT (object), "active",
+- plugin->invert_scrolling_toggle = gtk_builder_get_object (builder, "workspace-invert-scrolling");
+- panel_return_if_fail (GTK_IS_TOGGLE_BUTTON (plugin->invert_scrolling_toggle));
+- g_object_bind_property (G_OBJECT (plugin), "workspace-invert-scrolling",
+- G_OBJECT (plugin->invert_scrolling_toggle), "active",
++ plugin->scroll_options_box = gtk_builder_get_object (builder, "scroll-options");
++ panel_return_if_fail (GTK_IS_BOX (plugin->scroll_options_box));
++ g_object_bind_property (G_OBJECT (plugin), "scroll_options",
++ G_OBJECT (plugin->scroll_options_box), "active",
G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL);
+- gtk_widget_set_sensitive (GTK_WIDGET (plugin->invert_scrolling_toggle),
++ gtk_widget_set_sensitive (GTK_WIDGET (plugin->scroll_options_box),
+ gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (plugin->scrolling_toggle)));
+
+ g_signal_connect (G_OBJECT (plugin->scrolling_toggle), "toggled",
+- G_CALLBACK (workspace_scrolling_toggled), plugin->invert_scrolling_toggle);
++ G_CALLBACK (workspace_scrolling_toggled), plugin->scroll_options_box);
++
++ object = gtk_builder_get_object (builder, "workspace-invert-scrolling");
++ panel_return_if_fail (GTK_IS_TOGGLE_BUTTON (object));
++ g_object_bind_property (G_OBJECT (plugin), "workspace-invert-scrolling",
++ G_OBJECT (object), "active",
++ G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL);
++
+ object = gtk_builder_get_object (builder, "wrap-workspaces");
+ panel_return_if_fail (GTK_IS_TOGGLE_BUTTON (object));
+ g_object_bind_property (G_OBJECT (plugin), "wrap-workspaces",
+ G_OBJECT (object), "active",
+ G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL);
+
+ object = gtk_builder_get_object (builder, "appearance");
+ panel_return_if_fail (GTK_IS_COMBO_BOX (object));
+diff -Naur xfce4-panel-4.16.0-orig/plugins/pager/pager-dialog.glade xfce4-panel-4.16.0/plugins/pager/pager-dialog.glade
+--- xfce4-panel-4.16.0-orig/plugins/pager/pager-dialog.glade 2021-01-19 22:31:30.317186954 +0100
++++ xfce4-panel-4.16.0/plugins/pager/pager-dialog.glade 2021-01-19 22:32:08.933370647 +0100
+@@ -298,17 +298,54 @@
+ </packing>
+ </child>
+
+- <!-- Invert scrolling toggle -->
++ <!-- Scroll options depending on workspace scrolling option -->
+ <child>
+- <object class="GtkCheckButton" id="workspace-invert-scrolling">
+- <property name="label" translatable="yes">_Invert mouse wheel workspace switching direction</property>
+- <property name="tooltip_text" translatable="yes">Invert the direction in which the workspaces are switched</property>
++ <object class="GtkBox" id="scroll-options">
+ <property name="visible">True</property>
+- <property name="can_focus">True</property>
+- <property name="margin_left">24</property>
+- <property name="receives_default">False</property>
+- <property name="use_underline">True</property>
+- <property name="draw_indicator">True</property>
++ <property name="can_focus">False</property>
++ <property name="spacing">6</property>
++ <property name="orientation">vertical</property>
++
++ <!-- Invert scrolling toggle -->
++ <child>
++ <object class="GtkCheckButton" id="workspace-invert-scrolling">
++ <property name="label" translatable="yes">_Invert mouse wheel workspace switching direction</property>
++ <property name="tooltip_text" translatable="yes">Invert the direction in which the workspaces are switched</property>
++ <property name="visible">True</property>
++ <property name="can_focus">True</property>
++ <property name="margin_left">24</property>
++ <property name="receives_default">False</property>
++ <property name="use_underline">True</property>
++ <property name="draw_indicator">True</property>
++ </object>
++ <packing>
++ <property name="expand">False</property>
++ <property name="fill">True</property>
++ <property name="position">0</property>
++ </packing>
++ </child>
++
++ <!-- Wrap workspaces toggle -->
++ <child>
++ <object class="GtkCheckButton" id="wrap-workspaces">
++ <property name="label" translatable="yes">Wrap workspaces</property>
++ <property name="tooltip_text" translatable="yes">When scrolling beyond the last/first workspace, wrap around to the first/last workspace</property>
++ <property name="visible">True</property>
++ <property name="sensitive">True</property>
++ <property name="can_focus">True</property>
++ <property name="margin_left">24</property>
++ <property name="receives_default">False</property>
++ <property name="use_underline">True</property>
++ <property name="draw_indicator">True</property>
++ </object>
++ <packing>
++ <property name="expand">False</property>
++ <property name="fill">True</property>
++ <property name="position">1</property>
++ </packing>
++ </child>
++
+
- object = gtk_builder_get_object (builder, "miniature-view");
- panel_return_if_fail (GTK_IS_TOGGLE_BUTTON (object));
- g_object_bind_property (G_OBJECT (plugin), "miniature-view",
-diff -Naur xfce4-panel-4.14.0-orig/plugins/pager/pager-dialog.glade xfce4-panel-4.14.0/plugins/pager/pager-dialog.glade
---- xfce4-panel-4.14.0-orig/plugins/pager/pager-dialog.glade 2019-09-04 16:23:48.827680128 +0200
-+++ xfce4-panel-4.14.0/plugins/pager/pager-dialog.glade 2019-09-04 17:13:06.856668235 +0200
-@@ -243,14 +243,32 @@
- <property name="visible">True</property>
- <property name="left_padding">12</property>
- <child>
-- <object class="GtkCheckButton" id="workspace-invert-scrolling">
-- <property name="label" translatable="yes">_Invert mouse wheel workspace switching direction</property>
-+ <object class="GtkVBox" id="scroll-options">
- <property name="visible">True</property>
-- <property name="sensitive">True</property>
-- <property name="can_focus">True</property>
-- <property name="receives_default">False</property>
-- <property name="use_underline">True</property>
-- <property name="draw_indicator">True</property>
-+ <property name="orientation">vertical</property>
-+ <property name="spacing">6</property>
-+ <child>
-+ <object class="GtkCheckButton" id="workspace-invert-scrolling">
-+ <property name="label" translatable="yes">_Invert mouse wheel workspace switching direction</property>
-+ <property name="visible">True</property>
-+ <property name="sensitive">True</property>
-+ <property name="can_focus">True</property>
-+ <property name="receives_default">False</property>
-+ <property name="use_underline">True</property>
-+ <property name="draw_indicator">True</property>
-+ </object>
-+ </child>
-+ <child>
-+ <object class="GtkCheckButton" id="wrap-workspaces">
-+ <property name="label" translatable="yes">Wrap workspaces when _the first or the last workspace is reached</property>
-+ <property name="visible">True</property>
-+ <property name="sensitive">True</property>
-+ <property name="can_focus">True</property>
-+ <property name="receives_default">False</property>
-+ <property name="use_underline">True</property>
-+ <property name="draw_indicator">True</property>
-+ </object>
-+ </child>
- </object>
- </child>
- </object>
+ </object>
+ <packing>
+ <property name="expand">False</property>