diff options
author | Photon89 | 2019-09-06 10:42:02 +0200 |
---|---|---|
committer | Photon89 | 2019-09-06 10:42:02 +0200 |
commit | ef0ae296fc348d1e9c2cde800b29c754746e6f76 (patch) | |
tree | ea1c26db4d4651644ea11c8f791b491eeb284606 | |
parent | c2875e3919ad00305d9ceca34dffa88d8daca723 (diff) | |
download | aur-ef0ae296fc348d1e9c2cde800b29c754746e6f76.tar.gz |
Update to 4.14
-rw-r--r-- | .SRCINFO | 24 | ||||
-rw-r--r-- | PKGBUILD | 50 | ||||
-rw-r--r-- | fix-scrolling.patch | 125 | ||||
-rw-r--r-- | fix-scrolling2.patch | 58 | ||||
-rw-r--r-- | fix-scrolling3.patch (renamed from scrolling-viewports.patch) | 136 | ||||
-rw-r--r-- | pager-dimensions.patch | 67 | ||||
-rw-r--r-- | workspace-pager.patch | 68 | ||||
-rw-r--r-- | wrap-workspaces.patch | 84 |
8 files changed, 442 insertions, 170 deletions
@@ -1,7 +1,7 @@ pkgbase = xfce4-panel-compiz pkgdesc = Panel for the Xfce desktop environment with fixes for Compiz - pkgver = 4.12.2 - pkgrel = 3 + pkgver = 4.14.0 + pkgrel = 1 url = http://www.xfce.org/ arch = i686 arch = x86_64 @@ -15,16 +15,22 @@ pkgbase = xfce4-panel-compiz depends = libwnck depends = hicolor-icon-theme depends = desktop-file-utils - provides = xfce4-panel=4.12.2 + provides = xfce4-panel=4.14.0 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 = http://archive.xfce.org/src/xfce/xfce4-panel/4.14/xfce4-panel-4.14.0.tar.bz2 source = button-visibility.patch - source = scrolling-viewports.patch - sha256sums = 42058abb81b8f87691d3999627447de71c3285bcf055f308aab5cefab2de0ce9 - sha256sums = 006889db18e8579033db32eeb85257b1f55b7c378881b69a7671d708304f91af + source = fix-scrolling.patch + source = fix-scrolling2.patch + source = fix-scrolling3.patch + source = pager-dimensions.patch + source = wrap-workspaces.patch + sha256sums = d5f8f3bd7e142139987e5e62cda26135a424baabb5e47aa0c23b4169d0a66ef4 sha256sums = 556f7ecc22fdf024101d2e8a0416b953efaef48ff4ed649aab97d5b115a94931 - sha256sums = 8ca306d6fa63e47008223205b6aed887c02ea313fd0db996b40218771c18224e + sha256sums = 023fbeb4caa99dc97d460040f3d507794f3f576dc6cde98d834ba8a8e581f5ee + sha256sums = 2bbcace9c0c25c14fc1180a1064329240867a0b83c1c668aadc8c77f92ee0aab + sha256sums = 5e17300981a6030a2a3d4172b897e7aea0037401c8c9866cc03d82e0629c7fe2 + sha256sums = 7055df37c000731057af828ef99ffb7193a18b3f2ab7dee541d79de029995cae + sha256sums = 063f11ddbf695d0f7b819209245e201c8d7420cbf94a6c557593deb2aa061f82 pkgname = xfce4-panel-compiz @@ -1,11 +1,12 @@ -# 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 -pkgrel=3 +pkgver=4.14.0 +pkgrel=1 pkgdesc="Panel for the Xfce desktop environment with fixes for Compiz" arch=('i686' 'x86_64') url="http://www.xfce.org/" @@ -17,25 +18,46 @@ makedepends=('intltool' 'gtk-doc') 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' + fix-scrolling.patch + fix-scrolling2.patch + fix-scrolling3.patch + pager-dimensions.patch + wrap-workspaces.patch) +sha256sums=('d5f8f3bd7e142139987e5e62cda26135a424baabb5e47aa0c23b4169d0a66ef4' '556f7ecc22fdf024101d2e8a0416b953efaef48ff4ed649aab97d5b115a94931' - '8ca306d6fa63e47008223205b6aed887c02ea313fd0db996b40218771c18224e') + '023fbeb4caa99dc97d460040f3d507794f3f576dc6cde98d834ba8a8e581f5ee' + '2bbcace9c0c25c14fc1180a1064329240867a0b83c1c668aadc8c77f92ee0aab' + '5e17300981a6030a2a3d4172b897e7aea0037401c8c9866cc03d82e0629c7fe2' + '7055df37c000731057af828ef99ffb7193a18b3f2ab7dee541d79de029995cae' + '063f11ddbf695d0f7b819209245e201c8d7420cbf94a6c557593deb2aa061f82') 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 + echo "Applying button-visibility.patch:" 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://git.xfce.org/xfce/xfce4-panel/commit/?id=55dc7b400feef0c35fda3e8d3515dada2ced29c4 + echo "Applying fix-scrolling.patch:" + patch -p1 -i "$srcdir/fix-scrolling.patch" + + # 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://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 000000000000..72f14bc0f45e --- /dev/null +++ b/fix-scrolling.patch @@ -0,0 +1,125 @@ +From 55dc7b400feef0c35fda3e8d3515dada2ced29c4 Mon Sep 17 00:00:00 2001 +From: Simon Steinbeiss <simon.steinbeiss@elfenbeinturm.at> +Date: Thu, 15 Aug 2019 23:27:25 +0200 +Subject: pager: Fix scrolling in pager-buttons (Bug #15614) + +Unfortunately this doesn't affect the miniature view (aka WnckPager), +where scrolling is handled natively and in a different - broken - order. +--- + common/panel-debug.c | 3 ++- + common/panel-debug.h | 3 ++- + plugins/pager/pager-buttons.c | 2 ++ + plugins/pager/pager.c | 32 +++++++++++++++++++++++++------- + 4 files changed, 31 insertions(+), 9 deletions(-) + +diff --git a/common/panel-debug.c b/common/panel-debug.c +index b554a98f..38af2854 100644 +--- a/common/panel-debug.c ++++ b/common/panel-debug.c +@@ -54,7 +54,8 @@ static const GDebugKey panel_debug_keys[] = + { "positioning", PANEL_DEBUG_POSITIONING }, + { "struts", PANEL_DEBUG_STRUTS }, + { "systray", PANEL_DEBUG_SYSTRAY }, +- { "tasklist", PANEL_DEBUG_TASKLIST } ++ { "tasklist", PANEL_DEBUG_TASKLIST }, ++ { "pager", PANEL_DEBUG_PAGER } + }; + + +diff --git a/common/panel-debug.h b/common/panel-debug.h +index 9d882da9..56175658 100644 +--- a/common/panel-debug.h ++++ b/common/panel-debug.h +@@ -42,7 +42,8 @@ typedef enum + PANEL_DEBUG_POSITIONING = 1 << 12, + PANEL_DEBUG_STRUTS = 1 << 13, + PANEL_DEBUG_SYSTRAY = 1 << 14, +- PANEL_DEBUG_TASKLIST = 1 << 15 ++ PANEL_DEBUG_TASKLIST = 1 << 15, ++ PANEL_DEBUG_PAGER = 1 << 16 + } + PanelDebugFlag; + +diff --git a/plugins/pager/pager-buttons.c b/plugins/pager/pager-buttons.c +index fbac26fe..6c635be6 100644 +--- a/plugins/pager/pager-buttons.c ++++ b/plugins/pager/pager-buttons.c +@@ -368,6 +368,7 @@ pager_buttons_rebuild_idle (gpointer user_data) + vp_info[VIEWPORT_Y] = (n / (workspace_height / screen_height)) * screen_height; + + button = xfce_panel_create_toggle_button (); ++ gtk_widget_add_events (GTK_WIDGET (button), GDK_SCROLL_MASK | GDK_SMOOTH_SCROLL_MASK); + if (viewport_x >= vp_info[VIEWPORT_X] && viewport_x < vp_info[VIEWPORT_X] + screen_width + && viewport_y >= vp_info[VIEWPORT_Y] && viewport_y < vp_info[VIEWPORT_Y] + screen_height) + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE); +@@ -410,6 +411,7 @@ pager_buttons_rebuild_idle (gpointer user_data) + workspace = WNCK_WORKSPACE (li->data); + + button = xfce_panel_create_toggle_button (); ++ gtk_widget_add_events (GTK_WIDGET (button), GDK_SCROLL_MASK | GDK_SMOOTH_SCROLL_MASK); + if (workspace == active_ws) + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE); + g_signal_connect (G_OBJECT (button), "toggled", +diff --git a/plugins/pager/pager.c b/plugins/pager/pager.c +index 40cc7fab..5637bea6 100644 +--- a/plugins/pager/pager.c ++++ b/plugins/pager/pager.c +@@ -32,6 +32,7 @@ + #include <common/panel-xfconf.h> + #include <common/panel-utils.h> + #include <common/panel-private.h> ++#include <common/panel-debug.h> + #include <libwnck/libwnck.h> + + #include "pager.h" +@@ -320,11 +321,12 @@ static gboolean + pager_plugin_scroll_event (GtkWidget *widget, + GdkEventScroll *event) + { +- PagerPlugin *plugin = XFCE_PAGER_PLUGIN (widget); +- WnckWorkspace *active_ws; +- WnckWorkspace *new_ws; +- gint active_n; +- gint n_workspaces; ++ PagerPlugin *plugin = XFCE_PAGER_PLUGIN (widget); ++ WnckWorkspace *active_ws; ++ WnckWorkspace *new_ws; ++ gint active_n; ++ gint n_workspaces; ++ GdkScrollDirection scrolling_direction; + + panel_return_val_if_fail (WNCK_IS_SCREEN (plugin->wnck_screen), FALSE); + +@@ -332,11 +334,27 @@ pager_plugin_scroll_event (GtkWidget *widget, + if (plugin->scrolling == FALSE) + return TRUE; + ++ if (event->direction != GDK_SCROLL_SMOOTH) ++ scrolling_direction = event->direction; ++ else if (event->delta_y < 0) ++ scrolling_direction = GDK_SCROLL_UP; ++ else if (event->delta_y > 0) ++ scrolling_direction = GDK_SCROLL_DOWN; ++ else if (event->delta_x < 0) ++ scrolling_direction = GDK_SCROLL_LEFT; ++ else if (event->delta_x > 0) ++ scrolling_direction = GDK_SCROLL_RIGHT; ++ else ++ { ++ panel_debug_filtered (PANEL_DEBUG_PAGER, "Scrolling event with no delta happened."); ++ return TRUE; ++ } ++ + 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) ++ if (scrolling_direction == GDK_SCROLL_UP ++ || scrolling_direction == GDK_SCROLL_LEFT) + active_n--; + else + active_n++; +-- +cgit v1.2.1 + diff --git a/fix-scrolling2.patch b/fix-scrolling2.patch new file mode 100644 index 000000000000..b744c688d089 --- /dev/null +++ b/fix-scrolling2.patch @@ -0,0 +1,58 @@ +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/scrolling-viewports.patch b/fix-scrolling3.patch index b3a2ccebef6c..17ae58c8987a 100644 --- a/scrolling-viewports.patch +++ b/fix-scrolling3.patch @@ -1,21 +1,21 @@ -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 @@ +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) exo-csource --static --strip-comments --strip-content --name=pager_dialog_ui $< >$@ +-@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) exo-csource --static --strip-comments --strip-content --name=pager_dialog_ui $< >$@ ++ $(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.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 @@ +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; @@ -23,7 +23,7 @@ diff -Naur xfce4-panel-4.12.0-orig/plugins/pager/pager.c xfce4-panel-4.12.0/plug guint wrap_workspaces : 1; guint miniature_view : 1; gint rows; -@@ -96,6 +97,7 @@ +@@ -119,6 +120,7 @@ { PROP_0, PROP_WORKSPACE_SCROLLING, @@ -31,21 +31,21 @@ diff -Naur xfce4-panel-4.12.0-orig/plugins/pager/pager.c xfce4-panel-4.12.0/plug PROP_WRAP_WORKSPACES, PROP_MINIATURE_VIEW, PROP_ROWS -@@ -146,6 +148,13 @@ - EXO_PARAM_READWRITE)); +@@ -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, -+ EXO_PARAM_READWRITE)); ++ 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, -@@ -167,6 +176,7 @@ +@@ -193,6 +202,7 @@ { plugin->wnck_screen = NULL; plugin->scrolling = TRUE; @@ -53,7 +53,7 @@ diff -Naur xfce4-panel-4.12.0-orig/plugins/pager/pager.c xfce4-panel-4.12.0/plug plugin->wrap_workspaces = FALSE; plugin->miniature_view = TRUE; plugin->rows = 1; -@@ -190,6 +200,10 @@ +@@ -216,6 +226,10 @@ g_value_set_boolean (value, plugin->scrolling); break; @@ -64,7 +64,7 @@ diff -Naur xfce4-panel-4.12.0-orig/plugins/pager/pager.c xfce4-panel-4.12.0/plug case PROP_WRAP_WORKSPACES: g_value_set_boolean (value, plugin->wrap_workspaces); break; -@@ -226,6 +240,10 @@ +@@ -252,6 +266,10 @@ plugin->scrolling = g_value_get_boolean (value); break; @@ -75,12 +75,12 @@ diff -Naur xfce4-panel-4.12.0-orig/plugins/pager/pager.c xfce4-panel-4.12.0/plug case PROP_WRAP_WORKSPACES: plugin->wrap_workspaces = g_value_get_boolean (value); break; -@@ -277,31 +295,96 @@ +@@ -366,31 +384,89 @@ 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) +- if (scrolling_direction == GDK_SCROLL_UP +- || scrolling_direction == GDK_SCROLL_LEFT) - active_n--; - else - active_n++; @@ -88,20 +88,13 @@ diff -Naur xfce4-panel-4.12.0-orig/plugins/pager/pager.c xfce4-panel-4.12.0/plug 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; -- } -- 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)) + { @@ -122,19 +115,12 @@ diff -Naur xfce4-panel-4.12.0-orig/plugins/pager/pager.c xfce4-panel-4.12.0/plug + 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; -+ } ++ 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); + @@ -146,15 +132,12 @@ diff -Naur xfce4-panel-4.12.0-orig/plugins/pager/pager.c xfce4-panel-4.12.0/plug + if (viewport_x < 0) + viewport_x = workspace_width - screen_width; + } -+ else if (viewport_x < 0 || viewport_x > workspace_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); + } @@ -163,16 +146,23 @@ diff -Naur xfce4-panel-4.12.0-orig/plugins/pager/pager.c xfce4-panel-4.12.0/plug + /* 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 (event->direction == GDK_SCROLL_UP -+ || event->direction == GDK_SCROLL_LEFT) ++ 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 */ @@ -194,7 +184,7 @@ diff -Naur xfce4-panel-4.12.0-orig/plugins/pager/pager.c xfce4-panel-4.12.0/plug return TRUE; } -@@ -385,6 +468,7 @@ +@@ -515,6 +591,7 @@ const PanelProperty properties[] = { { "workspace-scrolling", G_TYPE_BOOLEAN }, @@ -202,24 +192,11 @@ diff -Naur xfce4-panel-4.12.0-orig/plugins/pager/pager.c xfce4-panel-4.12.0/plug { "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 @@ +@@ -667,11 +744,20 @@ static void -+cb_enable_workspace_invert_scrolling (GtkWidget *widget, GtkWidget *invert) ++workspace_scrolling_toggled (GtkWidget *widget, GtkWidget *invert) +{ + gtk_widget_set_sensitive (invert, gtk_toggle_button_get_active GTK_TOGGLE_BUTTON (widget)); +} @@ -236,29 +213,30 @@ diff -Naur xfce4-panel-4.12.0-orig/plugins/pager/pager.c xfce4-panel-4.12.0/plug 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"); +@@ -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 (cb_enable_workspace_invert_scrolling), scroll_option); ++ 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)); -+ exo_mutual_binding_new (G_OBJECT (plugin), "workspace-invert-scrolling", -+ G_OBJECT (object), "active"); ++ 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)); - 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 @@ + 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> diff --git a/pager-dimensions.patch b/pager-dimensions.patch new file mode 100644 index 000000000000..e8726206741a --- /dev/null +++ b/pager-dimensions.patch @@ -0,0 +1,67 @@ +--- 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/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/wrap-workspaces.patch b/wrap-workspaces.patch new file mode 100644 index 000000000000..74e92e128f60 --- /dev/null +++ b/wrap-workspaces.patch @@ -0,0 +1,84 @@ +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; + + panel_return_if_fail (XFCE_IS_PAGER_PLUGIN (plugin)); + +@@ -786,12 +786,12 @@ + 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), ++ 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))); + + g_signal_connect (object, "toggled", +- G_CALLBACK (workspace_scrolling_toggled), scroll_option); ++ G_CALLBACK (workspace_scrolling_toggled), scroll_options); + + 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", + 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, "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> |