1 === modified file 'applets/maintained/shiny-switcher/shinyswitcherapplet.c'
2 --- applets/maintained/shiny-switcher/shinyswitcherapplet.c 2010-09-12 16:15:07 +0000
3 +++ applets/maintained/shiny-switcher/shinyswitcherapplet.c 2010-11-02 13:52:43 +0000
8 -_scroll_event(GtkWidget *widget, GdkEventMotion *event, AwnShinySwitcher *shinyswitcher)
9 +_scroll_event(GtkWidget *widget, GdkEventScroll *event, AwnShinySwitcher *shinyswitcher)
11 AwnShinySwitcherPrivate * priv = GET_PRIVATE (shinyswitcher);
12 WnckWorkspace *cur_space = wnck_screen_get_active_workspace(priv->wnck_screen);
15 if (event->type == GDK_SCROLL)
17 - WnckMotionDirection direction1, direction2;
18 + WnckMotionDirection left, right, up, down;
20 switch (priv->mousewheel)
26 - direction1 = WNCK_MOTION_LEFT;
27 - direction2 = WNCK_MOTION_RIGHT;
28 + left = WNCK_MOTION_LEFT;
29 + right = WNCK_MOTION_RIGHT;
30 + up = WNCK_MOTION_UP;
31 + down = WNCK_MOTION_DOWN;
39 - direction1 = WNCK_MOTION_RIGHT;
40 - direction2 = WNCK_MOTION_LEFT;
42 + left = WNCK_MOTION_RIGHT;
43 + right = WNCK_MOTION_LEFT;
44 + up = WNCK_MOTION_DOWN;
45 + down = WNCK_MOTION_UP;
48 - if (event->state & GDK_SHIFT_MASK)
49 + if ( (event->direction == GDK_SCROLL_UP) ||
50 + (event->direction == GDK_SCROLL_LEFT) )
52 - new_space = wnck_workspace_get_neighbor(cur_space, WNCK_MOTION_RIGHT);
53 + new_space = wnck_workspace_get_neighbor(cur_space, left);
54 + if (new_space == NULL)
56 + new_space = wnck_workspace_get_neighbor(cur_space, up);
59 + for (cur_space = new_space; cur_space; )
61 + cur_space = wnck_workspace_get_neighbor(cur_space, right);
64 + new_space = cur_space;
72 - new_space = wnck_workspace_get_neighbor(cur_space, WNCK_MOTION_LEFT);
74 + new_space = wnck_workspace_get_neighbor(cur_space, right);
77 + new_space = wnck_workspace_get_neighbor(cur_space, down);
80 + for (cur_space = new_space; cur_space; )
82 + cur_space = wnck_workspace_get_neighbor(cur_space, left);
85 + new_space = cur_space;
95 wnck_workspace_activate(new_space, event->time); /* FIXME */