Merge lp:~cimi/overlay-scrollbar/moved-leave-notify-2 into lp:overlay-scrollbar

Proposed by Andrea Cimitan
Status: Merged
Approved by: Ted Gould
Approved revision: 214
Merged at revision: 214
Proposed branch: lp:~cimi/overlay-scrollbar/moved-leave-notify-2
Merge into: lp:overlay-scrollbar
Diff against target: 33 lines (+6/-4)
1 file modified
os/os-scrollbar.c (+6/-4)
To merge this branch: bzr merge lp:~cimi/overlay-scrollbar/moved-leave-notify-2
Reviewer Review Type Date Requested Status
Ayatana Scrollbar Team Pending
Review via email: mp+58548@code.launchpad.net

Description of the change

just move the leave notify event for the toplevel in the filter func, because the callback applied to the toplevel is called also when moving the mouse in a textview, and that could potentially expose issues

To post a comment you must log in.

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 2011-04-13 13:34:44 +0000
3+++ os/os-scrollbar.c 2011-04-20 17:44:35 +0000
4@@ -1354,6 +1354,12 @@
5 if (!priv->active_window && xevent->type == EnterNotify)
6 pager_set_state_from_pointer (scrollbar, xevent->xcrossing.x, xevent->xcrossing.y);
7
8+ /* FIXME(Cimi) this is not nice.
9+ * Next time, just copy and paste
10+ * the code here. */
11+ if (xevent->type == LeaveNotify)
12+ toplevel_leave_notify_event_cb (NULL, NULL, scrollbar);
13+
14 /* get the motion_notify_event trough XEvent */
15 if (xevent->type == MotionNotify)
16 {
17@@ -1723,8 +1729,6 @@
18
19 g_signal_connect (G_OBJECT (gtk_widget_get_toplevel (widget)), "configure-event",
20 G_CALLBACK (toplevel_configure_event_cb), scrollbar);
21- g_signal_connect (G_OBJECT (gtk_widget_get_toplevel (widget)), "leave-notify-event",
22- G_CALLBACK (toplevel_leave_notify_event_cb), scrollbar);
23
24 os_scrollbar_calc_layout_pager (scrollbar, priv->adjustment->value);
25
26@@ -1842,8 +1846,6 @@
27
28 g_signal_handlers_disconnect_by_func (G_OBJECT (gtk_widget_get_toplevel (widget)),
29 G_CALLBACK (toplevel_configure_event_cb), scrollbar);
30- g_signal_handlers_disconnect_by_func (G_OBJECT (gtk_widget_get_toplevel (widget)),
31- G_CALLBACK (toplevel_leave_notify_event_cb), scrollbar);
32
33 os_pager_set_parent (OS_PAGER (priv->pager), NULL);
34

Subscribers

People subscribed via source and target branches