summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCharles Bos2016-08-22 14:36:40 +0100
committerCharles Bos2016-08-22 14:36:40 +0100
commit9870e22745c9d0a8f90fbdf4329d3aad03d4b403 (patch)
tree84dbd882ea9124dc3ed617b5572ac469889c354e
parentb58a79bedc20c3968c27f8bc74e03a216442ae2e (diff)
downloadaur-9870e22745c9d0a8f90fbdf4329d3aad03d4b403.tar.gz
add patch for bug 3361
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD15
-rw-r--r--scrolling-viewports.patch312
3 files changed, 326 insertions, 7 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 017d732c729..64800f65387 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,9 @@
# Generated by mksrcinfo v8
-# Mon May 9 14:16:30 UTC 2016
+# Mon Aug 22 13:28:16 UTC 2016
pkgbase = xfce4-panel-compiz
pkgdesc = Panel for the Xfce desktop environment with fixes for Compiz
pkgver = 4.12.0
- pkgrel = 4
+ pkgrel = 5
url = http://www.xfce.org/
arch = i686
arch = x86_64
@@ -22,9 +22,11 @@ pkgbase = xfce4-panel-compiz
source = http://archive.xfce.org/src/xfce/xfce4-panel/4.12/xfce4-panel-4.12.0.tar.bz2
source = workspace-pager.patch
source = button-visibility.patch
+ source = scrolling-viewports.patch
sha256sums = 30920fc2e2fc26279a82b5261a155c2cc15ab2aa1ced2275684a6ff8261b97b0
sha256sums = 006889db18e8579033db32eeb85257b1f55b7c378881b69a7671d708304f91af
sha256sums = 556f7ecc22fdf024101d2e8a0416b953efaef48ff4ed649aab97d5b115a94931
+ sha256sums = 8ca306d6fa63e47008223205b6aed887c02ea313fd0db996b40218771c18224e
pkgname = xfce4-panel-compiz
diff --git a/PKGBUILD b/PKGBUILD
index 609ad9b8126..cd9973255c9 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,7 +5,7 @@
pkgname=xfce4-panel-compiz
_realname=xfce4-panel
pkgver=4.12.0
-pkgrel=4
+pkgrel=5
pkgdesc="Panel for the Xfce desktop environment with fixes for Compiz"
arch=('i686' 'x86_64')
url="http://www.xfce.org/"
@@ -18,19 +18,24 @@ provides=("$_realname=$pkgver")
conflicts=("$_realname")
source=(http://archive.xfce.org/src/xfce/$_realname/${pkgver%.*}/$_realname-$pkgver.tar.bz2
workspace-pager.patch
- button-visibility.patch)
+ button-visibility.patch
+ scrolling-viewports.patch)
sha256sums=('30920fc2e2fc26279a82b5261a155c2cc15ab2aa1ced2275684a6ff8261b97b0'
'006889db18e8579033db32eeb85257b1f55b7c378881b69a7671d708304f91af'
- '556f7ecc22fdf024101d2e8a0416b953efaef48ff4ed649aab97d5b115a94931')
+ '556f7ecc22fdf024101d2e8a0416b953efaef48ff4ed649aab97d5b115a94931'
+ '8ca306d6fa63e47008223205b6aed887c02ea313fd0db996b40218771c18224e')
prepare() {
cd "$srcdir/$_realname-$pkgver"
# See https://bugzilla.xfce.org/show_bug.cgi?id=11697
- patch -Np1 -i "$srcdir/workspace-pager.patch"
+ patch -p1 -i "$srcdir/workspace-pager.patch"
# See https://bugzilla.xfce.org/show_bug.cgi?id=10908
- patch -Np1 -i "$srcdir/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"
}
build() {
diff --git a/scrolling-viewports.patch b/scrolling-viewports.patch
new file mode 100644
index 00000000000..b3a2ccebef6
--- /dev/null
+++ b/scrolling-viewports.patch
@@ -0,0 +1,312 @@
+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>