summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Miranda <andre@andreldm.com>2021-02-18 22:05:48 -0300
committerAndre Miranda <andre@andreldm.com>2021-02-18 22:05:48 -0300
commit8f61229b171becbb5503ee831142a590ff8cc720 (patch)
tree4e5af1e332a687435ab09ee362d8a26cd0d4257e
parent2d2c9aa326e4701e4e7e78984f0d1d988f3cb8f8 (diff)
downloadlibwnck-8f61229b171becbb5503ee831142a590ff8cc720.tar.gz
pager: Add scroll mode WNCK_PAGER_SCROLL_NONE
This allows disabling scrolling altogether.
-rw-r--r--libwnck/pager.c2
-rw-r--r--libwnck/pager.h4
2 files changed, 5 insertions, 1 deletions
diff --git a/libwnck/pager.c b/libwnck/pager.c
index c352733..32d146b 100644
--- a/libwnck/pager.c
+++ b/libwnck/pager.c
@@ -2042,6 +2042,8 @@ wnck_pager_scroll_event (GtkWidget *widget,
return FALSE;
if (event->direction == GDK_SCROLL_SMOOTH)
return FALSE;
+ if (pager->priv->scroll_mode == WNCK_PAGER_SCROLL_NONE)
+ return FALSE;
absolute_direction = event->direction;
diff --git a/libwnck/pager.h b/libwnck/pager.h
index ed3988d..c67f2fa 100644
--- a/libwnck/pager.h
+++ b/libwnck/pager.h
@@ -88,6 +88,7 @@ typedef enum {
* @WNCK_PAGER_SCROLL_1D: the #WnckPager will always cycle workspaces in a linear
* manner, irrespective of how many rows are configured. (Hint: Better for mice)
* Example cycling order with 2 rows and 4 workspaces: 1 2 3 4.
+ * @WNCK_PAGER_SCROLL_NONE: the #WnckPager will not cycle workspaces. Since 3.40.
*
* Mode defining in which order scrolling on a #WnckPager will cycle through workspaces.
*
@@ -95,7 +96,8 @@ typedef enum {
*/
typedef enum {
WNCK_PAGER_SCROLL_2D,
- WNCK_PAGER_SCROLL_1D
+ WNCK_PAGER_SCROLL_1D,
+ WNCK_PAGER_SCROLL_NONE
} WnckPagerScrollMode;
GType wnck_pager_get_type (void) G_GNUC_CONST;