summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO27
-rw-r--r--PKGBUILD37
-rw-r--r--button-visibility.patch15
-rw-r--r--scrolling-viewports.patch312
-rw-r--r--workspace-pager.patch68
-rw-r--r--xfce4-panel-4.18.0-invert_scroll_workspaces-1.patch265
6 files changed, 292 insertions, 432 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e5719f58091d..e73ae1a678cf 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,30 +1,29 @@
pkgbase = xfce4-panel-compiz
pkgdesc = Panel for the Xfce desktop environment with fixes for Compiz
- pkgver = 4.12.2
+ pkgver = 4.18.6
pkgrel = 1
- url = http://www.xfce.org/
+ url = https://www.xfce.org/
arch = i686
arch = x86_64
groups = xfce4
license = GPL2
makedepends = intltool
- makedepends = gtk-doc
+ makedepends = gobject-introspection
+ makedepends = vala
+ makedepends = xfce4-dev-tools
depends = exo
depends = garcon
depends = libxfce4ui
- depends = libwnck
+ depends = xfconf
+ depends = libwnck3
+ depends = libdbusmenu-gtk3
depends = hicolor-icon-theme
depends = desktop-file-utils
- provides = xfce4-panel=4.12.2
+ provides = xfce4-panel=4.18.6
conflicts = xfce4-panel
- source = http://archive.xfce.org/src/xfce/xfce4-panel/4.12/xfce4-panel-4.12.2.tar.bz2
- source = workspace-pager.patch
- source = button-visibility.patch
- source = scrolling-viewports.patch
- sha256sums = 42058abb81b8f87691d3999627447de71c3285bcf055f308aab5cefab2de0ce9
- sha256sums = 006889db18e8579033db32eeb85257b1f55b7c378881b69a7671d708304f91af
- sha256sums = 556f7ecc22fdf024101d2e8a0416b953efaef48ff4ed649aab97d5b115a94931
- sha256sums = 8ca306d6fa63e47008223205b6aed887c02ea313fd0db996b40218771c18224e
+ source = https://archive.xfce.org/src/xfce/xfce4-panel/4.18/xfce4-panel-4.18.6.tar.bz2
+ source = xfce4-panel-4.18.0-invert_scroll_workspaces-1.patch
+ sha256sums = 21337161f58bb9b6e42760cb6883bc79beea27882aa6272b61f0e09d750d7c62
+ sha256sums = b88569bba5cb5b26c6347d3f0e211244e83868622d1495068bfcf4c9f38cc332
pkgname = xfce4-panel-compiz
-
diff --git a/PKGBUILD b/PKGBUILD
index 54812e05f7d0..297869a03222 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,41 +1,33 @@
-# Maintainer: Charles Bos <charlesbos1 AT gmail>
+# Maintainer: Michael Kogan <michael dot kogan at gmx dot net>
+# Contributor: Charles Bos <charlesbos1 AT gmail>
# Contributor: Evangelos Foutras <evangelos@foutrelis.com>
# Contributor: tobias <tobias funnychar archlinux.org>
pkgname=xfce4-panel-compiz
_realname=xfce4-panel
-pkgver=4.12.2
+pkgver=4.18.6
pkgrel=1
pkgdesc="Panel for the Xfce desktop environment with fixes for Compiz"
arch=('i686' 'x86_64')
-url="http://www.xfce.org/"
+url="https://www.xfce.org/"
license=('GPL2')
groups=('xfce4')
-depends=('exo' 'garcon' 'libxfce4ui' 'libwnck' 'hicolor-icon-theme'
- 'desktop-file-utils')
-makedepends=('intltool' 'gtk-doc')
+depends=('exo' 'garcon' 'libxfce4ui' 'xfconf' 'libwnck3' 'libdbusmenu-gtk3'
+ 'hicolor-icon-theme' 'desktop-file-utils')
+makedepends=('intltool' 'gobject-introspection' 'vala' 'xfce4-dev-tools')
provides=("$_realname=$pkgver")
conflicts=("$_realname")
-source=(http://archive.xfce.org/src/xfce/$_realname/${pkgver%.*}/$_realname-$pkgver.tar.bz2
- workspace-pager.patch
- button-visibility.patch
- scrolling-viewports.patch)
-sha256sums=('42058abb81b8f87691d3999627447de71c3285bcf055f308aab5cefab2de0ce9'
- '006889db18e8579033db32eeb85257b1f55b7c378881b69a7671d708304f91af'
- '556f7ecc22fdf024101d2e8a0416b953efaef48ff4ed649aab97d5b115a94931'
- '8ca306d6fa63e47008223205b6aed887c02ea313fd0db996b40218771c18224e')
+source=("https://archive.xfce.org/src/xfce/$_realname/${pkgver%.*}/$_realname-$pkgver.tar.bz2"
+ "xfce4-panel-4.18.0-invert_scroll_workspaces-1.patch")
+sha256sums=('21337161f58bb9b6e42760cb6883bc79beea27882aa6272b61f0e09d750d7c62'
+ 'b88569bba5cb5b26c6347d3f0e211244e83868622d1495068bfcf4c9f38cc332')
prepare() {
cd "$srcdir/$_realname-$pkgver"
- # See https://bugzilla.xfce.org/show_bug.cgi?id=11697
- patch -p1 -i "$srcdir/workspace-pager.patch"
-
- # See https://bugzilla.xfce.org/show_bug.cgi?id=10908
- patch -p1 -i "$srcdir/button-visibility.patch"
-
- # See https://bugzilla.xfce.org/show_bug.cgi?id=3361
- patch -p1 -i "$srcdir/scrolling-viewports.patch"
+ # See https://gitlab.xfce.org/xfce/xfwm4/-/issues/6#note_23168
+ echo "Applying xfce4-panel-$pkgver-invert_scroll_workspaces-1.patch:"
+ patch -p1 -i "$srcdir/xfce4-panel-4.18.0-invert_scroll_workspaces-1.patch"
}
build() {
@@ -49,7 +41,6 @@ build() {
--disable-static \
--enable-gio-unix \
--enable-gtk-doc \
- --enable-gtk3 \
--disable-debug
make
}
diff --git a/button-visibility.patch b/button-visibility.patch
deleted file mode 100644
index a1b7c9bdc74e..000000000000
--- a/button-visibility.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff -Nur original/plugins/tasklist/tasklist-widget.c modified/plugins/tasklist/tasklist-widget.c
---- original/plugins/tasklist/tasklist-widget.c 2015-02-28 16:37:36.000000000 +0000
-+++ modified/plugins/tasklist/tasklist-widget.c 2015-09-05 16:16:03.799548200 +0100
-@@ -2633,6 +2633,11 @@
- else
- gtk_widget_hide (child->button);
- }
-+ /* initiate viewport switch on geometry change - fixes buttons not
-+ * getting updated when using compiz */
-+ active_ws = wnck_screen_get_active_workspace (child->tasklist->screen);
-+ if (wnck_workspace_is_virtual (active_ws))
-+ xfce_tasklist_viewports_changed (child->tasklist->screen, child->tasklist);
- }
-
-
diff --git a/scrolling-viewports.patch b/scrolling-viewports.patch
deleted file mode 100644
index b3a2ccebef6c..000000000000
--- a/scrolling-viewports.patch
+++ /dev/null
@@ -1,312 +0,0 @@
-diff -Naur xfce4-panel-4.12.0-orig/plugins/pager/Makefile.in xfce4-panel-4.12.0/plugins/pager/Makefile.in
---- xfce4-panel-4.12.0-orig/plugins/pager/Makefile.in 2015-02-28 17:21:58.000000000 +0100
-+++ xfce4-panel-4.12.0/plugins/pager/Makefile.in 2015-03-01 18:45:28.644450872 +0100
-@@ -870,8 +870,8 @@
-
- @INTLTOOL_DESKTOP_RULE@
-
--@MAINTAINER_MODE_TRUE@pager-dialog_ui.h: pager-dialog.glade
--@MAINTAINER_MODE_TRUE@ $(AM_V_GEN) exo-csource --static --strip-comments --strip-content --name=pager_dialog_ui $< >$@
-+pager-dialog_ui.h: pager-dialog.glade
-+ $(AM_V_GEN) exo-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.12.0-orig/plugins/pager/pager.c xfce4-panel-4.12.0/plugins/pager/pager.c
---- xfce4-panel-4.12.0-orig/plugins/pager/pager.c 2015-02-26 21:32:17.000000000 +0100
-+++ xfce4-panel-4.12.0/plugins/pager/pager.c 2015-03-01 19:21:03.250359762 +0100
-@@ -86,6 +86,7 @@
-
- /* settings */
- guint scrolling : 1;
-+ guint invert_scrolling : 1;
- guint wrap_workspaces : 1;
- guint miniature_view : 1;
- gint rows;
-@@ -96,6 +97,7 @@
- {
- PROP_0,
- PROP_WORKSPACE_SCROLLING,
-+ PROP_INVERT_WORKSPACE_SCROLLING,
- PROP_WRAP_WORKSPACES,
- PROP_MINIATURE_VIEW,
- PROP_ROWS
-@@ -146,6 +148,13 @@
- EXO_PARAM_READWRITE));
-
- g_object_class_install_property (gobject_class,
-+ PROP_INVERT_WORKSPACE_SCROLLING,
-+ g_param_spec_boolean ("workspace-invert-scrolling",
-+ NULL, NULL,
-+ TRUE,
-+ EXO_PARAM_READWRITE));
-+
-+ g_object_class_install_property (gobject_class,
- PROP_MINIATURE_VIEW,
- g_param_spec_boolean ("miniature-view",
- NULL, NULL,
-@@ -167,6 +176,7 @@
- {
- plugin->wnck_screen = NULL;
- plugin->scrolling = TRUE;
-+ plugin->invert_scrolling = FALSE;
- plugin->wrap_workspaces = FALSE;
- plugin->miniature_view = TRUE;
- plugin->rows = 1;
-@@ -190,6 +200,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;
-@@ -226,6 +240,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;
-@@ -277,31 +295,96 @@
- active_ws = wnck_screen_get_active_workspace (plugin->wnck_screen);
- active_n = wnck_workspace_get_number (active_ws);
-
-- if (event->direction == GDK_SCROLL_UP
-- || event->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)
-- {
-- /* 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;
-- }
-+ if (n_workspaces == 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);
-+
-+ switch (event->direction)
-+ {
-+ case GDK_SCROLL_UP:
-+ case GDK_SCROLL_LEFT:
-+ scroll_direction = (plugin->invert_scrolling ? +1 : -1);
-+ break;
-+ case GDK_SCROLL_DOWN:
-+ case GDK_SCROLL_RIGHT:
-+ scroll_direction = (plugin->invert_scrolling ? -1 : +1);
-+ break;
-+ default:
-+ break;
-+ }
-+ /* 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;
-+ }
-
-- 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);
-+ wnck_screen_move_viewport (plugin->wnck_screen,
-+ viewport_x, viewport_y);
-+ }
-+ else
-+ {
-+ /* only one workspace, no need to do anything */
-+ return TRUE;
-+ }
-+ }
-+ else
-+ {
-+ /* real workspaces */
-+ if (event->direction == GDK_SCROLL_UP
-+ || event->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);
-+ }
-
- return TRUE;
- }
-@@ -385,6 +468,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 },
-@@ -409,11 +493,10 @@
-
- g_signal_connect (G_OBJECT (plugin), "screen-changed",
- G_CALLBACK (pager_plugin_screen_changed), NULL);
-+
- pager_plugin_screen_changed (GTK_WIDGET (plugin), NULL);
- }
-
--
--
- static void
- pager_plugin_free_data (XfcePanelPlugin *panel_plugin)
- {
-@@ -531,11 +614,20 @@
-
-
- static void
-+cb_enable_workspace_invert_scrolling (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));
-
-@@ -563,6 +655,18 @@
- exo_mutual_binding_new (G_OBJECT (plugin), "workspace-scrolling",
- G_OBJECT (object), "active");
-
-+ 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 (cb_enable_workspace_invert_scrolling), scroll_option);
-+
-+ object = gtk_builder_get_object (builder, "workspace-invert-scrolling");
-+ panel_return_if_fail (GTK_IS_TOGGLE_BUTTON (object));
-+ exo_mutual_binding_new (G_OBJECT (plugin), "workspace-invert-scrolling",
-+ G_OBJECT (object), "active");
-+
- object = gtk_builder_get_object (builder, "miniature-view");
- panel_return_if_fail (GTK_IS_TOGGLE_BUTTON (object));
- exo_mutual_binding_new (G_OBJECT (plugin), "miniature-view",
-diff -Naur xfce4-panel-4.12.0-orig/plugins/pager/pager-dialog.glade xfce4-panel-4.12.0/plugins/pager/pager-dialog.glade
---- xfce4-panel-4.12.0-orig/plugins/pager/pager-dialog.glade 2014-04-24 22:16:37.000000000 +0200
-+++ xfce4-panel-4.12.0/plugins/pager/pager-dialog.glade 2015-03-01 18:45:28.644450872 +0100
-@@ -135,13 +135,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/workspace-pager.patch b/workspace-pager.patch
deleted file mode 100644
index fd7f874445f5..000000000000
--- a/workspace-pager.patch
+++ /dev/null
@@ -1,68 +0,0 @@
---- xfce4-panel-4.11.0.orig/plugins/pager/pager.c 2014-02-16 03:38:19.000000000 +0100
-+++ xfce4-panel-4.11.0/plugins/pager/pager.c 2014-04-19 19:29:18.736189725 +0200
-@@ -88,7 +88,6 @@
- guint scrolling : 1;
- guint miniature_view : 1;
- gint rows;
-- gfloat ratio;
- };
-
- enum
-@@ -160,7 +159,6 @@
- plugin->scrolling = TRUE;
- plugin->miniature_view = TRUE;
- plugin->rows = 1;
-- plugin->ratio = 1.0;
- plugin->pager = NULL;
- }
-
-@@ -309,7 +307,6 @@
- g_message ("Setting the pager rows returned false. Maybe the setting is not applied.");
-
- wnck_pager_set_orientation (WNCK_PAGER (plugin->pager), orientation);
-- plugin->ratio = (gfloat) gdk_screen_width () / (gfloat) gdk_screen_height ();
- }
- else
- {
-@@ -560,26 +557,38 @@
- PagerPlugin *plugin = XFCE_PAGER_PLUGIN (widget);
- XfcePanelPluginMode mode;
- gint n_workspaces, n_cols;
-+ gfloat ratio;
-+ WnckWorkspace *active_ws;
-
- if (plugin->miniature_view)
- {
- mode = xfce_panel_plugin_get_mode (XFCE_PANEL_PLUGIN (plugin));
- n_workspaces = wnck_screen_get_workspace_count (plugin->wnck_screen);
- n_cols = MAX (1, (n_workspaces + plugin->rows - 1) / plugin->rows);
-+ active_ws = wnck_screen_get_active_workspace (plugin->wnck_screen);
-+ if (wnck_workspace_is_virtual (active_ws))
-+ {
-+ ratio = (gfloat) wnck_workspace_get_width (active_ws) / (gfloat) wnck_workspace_get_height (active_ws);
-+ }
-+ else
-+ {
-+ ratio = (gfloat) gdk_screen_width () / (gfloat) gdk_screen_height ();
-+ }
-+
- if (mode == XFCE_PANEL_PLUGIN_MODE_HORIZONTAL)
- {
- requisition->height = xfce_panel_plugin_get_size (XFCE_PANEL_PLUGIN (plugin));
-- requisition->width = (gint) (requisition->height / plugin->rows * plugin->ratio * n_cols);
-+ requisition->width = (gint) (requisition->height / plugin->rows * ratio * n_cols);
- }
- else if (mode == XFCE_PANEL_PLUGIN_MODE_VERTICAL)
- {
- requisition->width = xfce_panel_plugin_get_size (XFCE_PANEL_PLUGIN (plugin));
-- requisition->height = (gint) (requisition->width / plugin->rows / plugin->ratio * n_cols);
-+ requisition->height = (gint) (requisition->width / plugin->rows / ratio * n_cols);
- }
- else /* (mode == XFCE_PANEL_PLUGIN_MODE_DESKBAR) */
- {
- requisition->width = xfce_panel_plugin_get_size (XFCE_PANEL_PLUGIN (plugin));
-- requisition->height = (gint) (requisition->width / n_cols / plugin->ratio * plugin->rows);
-+ requisition->height = (gint) (requisition->width / n_cols / ratio * plugin->rows);
- }
- }
- else if (plugin->pager)
diff --git a/xfce4-panel-4.18.0-invert_scroll_workspaces-1.patch b/xfce4-panel-4.18.0-invert_scroll_workspaces-1.patch
new file mode 100644
index 000000000000..2532f7af0d04
--- /dev/null
+++ b/xfce4-panel-4.18.0-invert_scroll_workspaces-1.patch
@@ -0,0 +1,265 @@
+diff -Naur xfce4-panel-4.18.0-orig/plugins/pager/Makefile.in xfce4-panel-4.18.0/plugins/pager/Makefile.in
+--- xfce4-panel-4.18.0-orig/plugins/pager/Makefile.in 2022-12-15 09:55:01.000000000 +0100
++++ xfce4-panel-4.18.0/plugins/pager/Makefile.in 2022-12-15 22:57:28.739326216 +0100
+@@ -886,8 +886,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.18.0-orig/plugins/pager/pager.c xfce4-panel-4.18.0/plugins/pager/pager.c
+--- xfce4-panel-4.18.0-orig/plugins/pager/pager.c 2022-12-15 09:38:30.000000000 +0100
++++ xfce4-panel-4.18.0/plugins/pager/pager.c 2022-12-15 22:57:28.739326216 +0100
+@@ -107,6 +107,7 @@
+
+ /* settings */
+ guint scrolling : 1;
++ guint invert_scrolling : 1;
+ guint wrap_workspaces : 1;
+ guint miniature_view : 1;
+ guint rows;
+@@ -122,6 +123,7 @@
+ {
+ PROP_0,
+ PROP_WORKSPACE_SCROLLING,
++ PROP_INVERT_WORKSPACE_SCROLLING,
+ PROP_WRAP_WORKSPACES,
+ PROP_MINIATURE_VIEW,
+ PROP_ROWS,
+@@ -178,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,
+@@ -208,6 +217,7 @@
+
+ plugin->wnck_screen = NULL;
+ plugin->scrolling = TRUE;
++ plugin->invert_scrolling = FALSE;
+ plugin->wrap_workspaces = FALSE;
+ plugin->miniature_view = TRUE;
+ plugin->numbering = FALSE;
+@@ -241,6 +251,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;
+@@ -280,6 +294,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;
+@@ -418,31 +436,92 @@
+ 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) */
++ /* only width is needed, virtual workspaces are stacked horizontally */
++ 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;
+ }
+@@ -643,6 +722,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 },
+@@ -861,6 +941,12 @@
+ G_OBJECT (object), "active",
+ G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL);
+
++ object = gtk_builder_get_object (builder, "workspace-invert-scrolling");
++ panel_return_if_fail (GTK_IS_SWITCH (object));
++ g_object_bind_property (G_OBJECT (plugin), "workspace-invert-scrolling",
++ G_OBJECT (object), "active",
++ G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL);
++
+ /* update the rows limit */
+ pager_plugin_configure_n_workspaces_changed (plugin->wnck_screen, NULL, builder);
+
+diff -Naur xfce4-panel-4.18.0-orig/plugins/pager/pager-dialog.glade xfce4-panel-4.18.0/plugins/pager/pager-dialog.glade
+--- xfce4-panel-4.18.0-orig/plugins/pager/pager-dialog.glade 2022-12-10 18:00:54.000000000 +0100
++++ xfce4-panel-4.18.0/plugins/pager/pager-dialog.glade 2022-12-15 22:57:28.739326216 +0100
+@@ -190,6 +190,20 @@
+ </packing>
+ </child>
+ <child>
++ <object class="GtkSwitch" id="workspace-invert-scrolling">
++ <property name="visible">True</property>
++ <property name="can_focus">True</property>
++ <property name="halign">end</property>
++ <property name="valign">center</property>
++ <property name="sensitive" bind-source="workspace-scrolling"
++ bind-property="active" bind-flags="G_BINDING_SYNC_CREATE"/>
++ </object>
++ <packing>
++ <property name="left_attach">1</property>
++ <property name="top_attach">5</property>
++ </packing>
++ </child>
++ <child>
+ <object class="GtkLabel" id="numbering-label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+@@ -219,7 +233,7 @@
+ <object class="GtkLabel" id="wrap-workspaces-label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+- <property name="margin_left">12</property>
++ <property name="margin_left">24</property>
+ <property name="label" translatable="yes">Wrap around workspaces</property>
+ <property name="xalign">0</property>
+ <property name="sensitive" bind-source="workspace-scrolling"
+@@ -231,6 +245,21 @@
+ </packing>
+ </child>
+ <child>
++ <object class="GtkLabel" id="workspace-invert-scrolling-label">
++ <property name="visible">True</property>
++ <property name="can_focus">False</property>
++ <property name="margin_left">24</property>
++ <property name="label" translatable="yes">Invert mouse wheel workspace switching direction</property>
++ <property name="xalign">0</property>
++ <property name="sensitive" bind-source="workspace-scrolling"
++ bind-property="active" bind-flags="G_BINDING_SYNC_CREATE"/>
++ </object>
++ <packing>
++ <property name="left_attach">0</property>
++ <property name="top_attach">5</property>
++ </packing>
++ </child>
++ <child>
+ <object class="GtkBox">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>