Merge lp:~cimi/overlay-scrollbar/unref-window-group-only-once into lp:overlay-scrollbar

Proposed by Andrea Cimitan
Status: Merged
Approved by: Ted Gould
Approved revision: 258
Merged at revision: 259
Proposed branch: lp:~cimi/overlay-scrollbar/unref-window-group-only-once
Merge into: lp:overlay-scrollbar
Diff against target: 28 lines (+6/-6)
1 file modified
os/os-scrollbar.c (+6/-6)
To merge this branch: bzr merge lp:~cimi/overlay-scrollbar/unref-window-group-only-once
Reviewer Review Type Date Requested Status
Ted Gould (community) Approve
Review via email: mp+64932@code.launchpad.net

Description of the change

As in the comment

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

I'm sure this fixes the bug. But as we're starting to collect a bunch of these global variables we might start looking to put them in their own object that we could ref in each instance of the scrollbar.

review: Approve
Revision history for this message
Andrea Cimitan (cimi) wrote :

Makes sense Ted!
(patches are welcome :-D)

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-06-15 16:03:30 +0000
3+++ os/os-scrollbar.c 2011-06-17 02:40:16 +0000
4@@ -2197,6 +2197,12 @@
5 os_workarea = NULL;
6 }
7
8+ if (priv->window_group != NULL)
9+ {
10+ g_object_unref (priv->window_group);
11+ priv->window_group = NULL;
12+ }
13+
14 gdk_window_remove_filter (gdk_get_default_root_window (),
15 root_filter_func, NULL);
16 }
17@@ -2207,12 +2213,6 @@
18 priv->pager = NULL;
19 }
20
21- if (priv->window_group != NULL)
22- {
23- g_object_unref (priv->window_group);
24- priv->window_group = NULL;
25- }
26-
27 swap_adjustment (scrollbar, NULL);
28 swap_thumb (scrollbar, NULL);
29

Subscribers

People subscribed via source and target branches