summaryrefslogtreecommitdiff
path: root/applets
diff options
context:
space:
mode:
authormonsta <[email protected]>2017-03-31 11:54:50 +0300
committermonsta <[email protected]>2017-03-31 11:59:54 +0300
commit9705869fdcf0f31bc05b8454cd7ec60b7b489234 (patch)
treebb8062a198ddc3582583d73ec597a5a6e66d0605 /applets
parent9b8f9e8147e27e19eb08a262a140b937051545b9 (diff)
downloadmate-panel-9705869fdcf0f31bc05b8454cd7ec60b7b489234.tar.bz2
mate-panel-9705869fdcf0f31bc05b8454cd7ec60b7b489234.tar.xz
workspace switcher: handle GDK_SCROLL_SMOOTH and fix build warning
Diffstat (limited to 'applets')
-rw-r--r--applets/wncklet/workspace-switcher.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/applets/wncklet/workspace-switcher.c b/applets/wncklet/workspace-switcher.c
index a757d80b..17fbd651 100644
--- a/applets/wncklet/workspace-switcher.c
+++ b/applets/wncklet/workspace-switcher.c
@@ -224,6 +224,9 @@ static gboolean applet_scroll(MatePanelApplet* applet, GdkEventScroll* event, Pa
if (event->type != GDK_SCROLL)
return FALSE;
+ if (event->direction == GDK_SCROLL_SMOOTH)
+ return FALSE;
+
index = wnck_workspace_get_number(wnck_screen_get_active_workspace(pager->screen));
n_workspaces = wnck_screen_get_workspace_count(pager->screen);
n_columns = n_workspaces / pager->n_rows;
@@ -239,15 +242,14 @@ static gboolean applet_scroll(MatePanelApplet* applet, GdkEventScroll* event, Pa
{
switch (event->direction)
{
- case GDK_SCROLL_DOWN:
- case GDK_SCROLL_UP:
- break;
case GDK_SCROLL_RIGHT:
absolute_direction = GDK_SCROLL_LEFT;
break;
case GDK_SCROLL_LEFT:
absolute_direction = GDK_SCROLL_RIGHT;
break;
+ default:
+ break;
}
}