Merge lp:~darkxst/overlay-scrollbar/lp1386255 into lp:overlay-scrollbar

Proposed by Tim Lunn
Status: Merged
Approved by: Lars Karlitski
Approved revision: 386
Merged at revision: 386
Proposed branch: lp:~darkxst/overlay-scrollbar/lp1386255
Merge into: lp:overlay-scrollbar
Diff against target: 13 lines (+2/-1)
1 file modified
os/os-scrollbar.c (+2/-1)
To merge this branch: bzr merge lp:~darkxst/overlay-scrollbar/lp1386255
Reviewer Review Type Date Requested Status
Lars Karlitski Approve
Ayatana Scrollbar Team Pending
Review via email: mp+239926@code.launchpad.net

Commit message

Check for null grab_notify handler before hijacking it. This fixes a crash in GTK+3.14 where grab_notify is no longer used, Thanks Marius Gedminas for the fix!

To post a comment you must log in.
Revision history for this message
Lars Karlitski (larsu) wrote :

We might want to check the other functions for NULL as well at some point. But this won't happen for 3.14 and the longevity of this module is questionable, so let's go with this.

Thanks for the fix!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'os/os-scrollbar.c'
--- os/os-scrollbar.c 2014-06-09 03:50:50 +0000
+++ os/os-scrollbar.c 2014-10-28 23:19:32 +0000
@@ -4166,7 +4166,8 @@
4166 if (widget_class->state_changed == pre_hijacked_scrollbar_state_changed)4166 if (widget_class->state_changed == pre_hijacked_scrollbar_state_changed)
4167 widget_class->state_changed = hijacked_scrollbar_state_changed;4167 widget_class->state_changed = hijacked_scrollbar_state_changed;
4168#endif4168#endif
4169 if (widget_class->grab_notify == pre_hijacked_scrollbar_grab_notify)4169 if (pre_hijacked_scrollbar_grab_notify &&
4170 widget_class->grab_notify == pre_hijacked_scrollbar_grab_notify)
4170 widget_class->grab_notify = hijacked_scrollbar_grab_notify;4171 widget_class->grab_notify = hijacked_scrollbar_grab_notify;
4171 if (widget_class->hide == pre_hijacked_scrollbar_hide)4172 if (widget_class->hide == pre_hijacked_scrollbar_hide)
4172 widget_class->hide = hijacked_scrollbar_hide;4173 widget_class->hide = hijacked_scrollbar_hide;

Subscribers

People subscribed via source and target branches