Merge lp:~cimi/overlay-scrollbar/fix-783261 into lp:overlay-scrollbar

Proposed by Andrea Cimitan
Status: Merged
Approved by: Ted Gould
Approved revision: 237
Merged at revision: 237
Proposed branch: lp:~cimi/overlay-scrollbar/fix-783261
Merge into: lp:overlay-scrollbar
Diff against target: 59 lines (+14/-13)
1 file modified
os/os-thumb.c (+14/-13)
To merge this branch: bzr merge lp:~cimi/overlay-scrollbar/fix-783261
Reviewer Review Type Date Requested Status
Ted Gould (community) Approve
Review via email: mp+61324@code.launchpad.net

Description of the change

Check if the widget is mapped before adding the map.
(In the review, please think about other possible checks I could add)

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-thumb.c'
2--- os/os-thumb.c 2011-05-12 23:39:33 +0000
3+++ os/os-thumb.c 2011-05-17 22:13:54 +0000
4@@ -720,7 +720,7 @@
5
6 priv->use_tolerance = FALSE;
7
8- if (priv->grabbed_widget != NULL)
9+ if (priv->grabbed_widget != NULL && gtk_widget_get_mapped (priv->grabbed_widget))
10 gtk_grab_add (priv->grabbed_widget);
11
12 GTK_WIDGET_CLASS (os_thumb_parent_class)->unmap (widget);
13@@ -754,14 +754,14 @@
14 priv = thumb->priv;
15
16 switch (prop_id)
17- {
18- case PROP_ORIENTATION:
19- g_value_set_enum (value, priv->orientation);
20- break;
21+ {
22+ case PROP_ORIENTATION:
23+ g_value_set_enum (value, priv->orientation);
24+ break;
25
26- default:
27- break;
28- }
29+ default:
30+ break;
31+ }
32 }
33
34 static void
35@@ -777,8 +777,9 @@
36 priv = thumb->priv;
37
38 switch (prop_id)
39- {
40- case PROP_ORIENTATION: {
41+ {
42+ case PROP_ORIENTATION:
43+ {
44 priv->orientation = g_value_get_enum (value);
45 if (priv->orientation == GTK_ORIENTATION_VERTICAL)
46 {
47@@ -793,9 +794,9 @@
48 break;
49 }
50
51- default:
52- break;
53- }
54+ default:
55+ break;
56+ }
57 }
58
59 /* Public functions. */

Subscribers

People subscribed via source and target branches