Merge lp:~cimi/overlay-scrollbar/fix-951121-with-scroll-wheel into lp:overlay-scrollbar

Proposed by Andrea Cimitan
Status: Merged
Merged at revision: 341
Proposed branch: lp:~cimi/overlay-scrollbar/fix-951121-with-scroll-wheel
Merge into: lp:overlay-scrollbar
Diff against target: 48 lines (+16/-4)
2 files modified
os/os-scrollbar.c (+14/-3)
os/os-thumb.c (+2/-1)
To merge this branch: bzr merge lp:~cimi/overlay-scrollbar/fix-951121-with-scroll-wheel
Reviewer Review Type Date Requested Status
Ted Gould (community) Approve
Review via email: mp+98625@code.launchpad.net

Description of the change

A couple of fixes for gtk 3.3.18, and comment the workaround for 951121

To post a comment you must log in.
Revision history for this message
Ted Gould (ted) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'os/os-scrollbar.c'
2--- os/os-scrollbar.c 2012-03-13 14:23:10 +0000
3+++ os/os-scrollbar.c 2012-03-21 13:16:26 +0000
4@@ -2022,9 +2022,12 @@
5 #ifdef USE_GTK3
6 /* On touch devices with XI2 and Gtk+ >= 3.3.18,
7 * the event enter-notify is not emitted.
8- * Deal with it in motion-notify. */
9- if (!(priv->event & OS_EVENT_ENTER_NOTIFY))
10- enter_event (scrollbar);
11+ * Deal with it in motion-notify. */
12+
13+ /* Should be fixed with:
14+ * https://bugs.launchpad.net/ubuntu/+source/gtk+3.0/+bug/949414 */
15+ // if (!(priv->event & OS_EVENT_ENTER_NOTIFY))
16+ // enter_event (scrollbar);
17 #endif
18
19 if (priv->event & OS_EVENT_BUTTON_PRESS)
20@@ -2368,6 +2371,14 @@
21 OsScrollbarPrivate *priv;
22 gdouble delta;
23
24+#ifdef USE_GTK3
25+ /* Gtk+ 3.3.18 adds a smooth scroll support,
26+ * but at the moment is not ready to be used without various issues.
27+ * Don't use it for thumb scrolling in overlay scrollbar. */
28+ if (event->direction == GDK_SCROLL_SMOOTH)
29+ return FALSE;
30+#endif
31+
32 scrollbar = OS_SCROLLBAR (user_data);
33 priv = scrollbar->priv;
34
35
36=== modified file 'os/os-thumb.c'
37--- os/os-thumb.c 2012-03-12 18:45:21 +0000
38+++ os/os-thumb.c 2012-03-21 13:16:26 +0000
39@@ -209,7 +209,8 @@
40 gtk_widget_add_events (GTK_WIDGET (thumb), GDK_BUTTON_PRESS_MASK |
41 GDK_BUTTON_RELEASE_MASK |
42 GDK_POINTER_MOTION_MASK |
43- GDK_POINTER_MOTION_HINT_MASK);
44+ GDK_POINTER_MOTION_HINT_MASK |
45+ GDK_SCROLL_MASK);
46
47 os_thumb_screen_changed (GTK_WIDGET (thumb), NULL);
48 os_thumb_composited_changed (GTK_WIDGET (thumb));

Subscribers

People subscribed via source and target branches