Merge lp:~cimi/overlay-scrollbar/fix-grab-ungrab into lp:overlay-scrollbar

Proposed by Andrea Cimitan
Status: Merged
Approved by: Ted Gould
Approved revision: 246
Merged at revision: 243
Proposed branch: lp:~cimi/overlay-scrollbar/fix-grab-ungrab
Merge into: lp:overlay-scrollbar
Diff against target: 71 lines (+13/-2)
2 files modified
os/os-scrollbar.c (+13/-1)
os/os-utils.c (+0/-1)
To merge this branch: bzr merge lp:~cimi/overlay-scrollbar/fix-grab-ungrab
Reviewer Review Type Date Requested Status
Ted Gould (community) Approve
Review via email: mp+63399@code.launchpad.net

Description of the change

Dunno why works without adding the thumb window to the window_group.. but works :)

To post a comment you must log in.
246. By Andrea Cimitan

removed thumb_realize_cb

Revision history for this message
Ted Gould (ted) wrote :

I can't explain why this works, but it does. So I'm for getting it in for now, we'll probably have another bug to solve in the future. We'll see. In the mean time this fixes real bugs.

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 2011-05-19 15:18:21 +0000
3+++ os/os-scrollbar.c 2011-06-03 15:48:43 +0000
4@@ -58,6 +58,7 @@
5 GtkWidget *thumb;
6 GtkAdjustment *adjustment;
7 GtkOrientation orientation;
8+ GtkWindowGroup *window_group;
9 gboolean button_press_event;
10 gboolean enter_notify_event;
11 gboolean motion_notify_event;
12@@ -1761,6 +1762,8 @@
13
14 priv->pager = os_pager_new ();
15
16+ priv->window_group = gtk_window_group_new ();
17+
18 g_signal_connect (G_OBJECT (scrollbar), "notify::adjustment",
19 G_CALLBACK (notify_adjustment_cb), NULL);
20
21@@ -1807,6 +1810,12 @@
22 priv->pager = NULL;
23 }
24
25+ if (priv->window_group != NULL)
26+ {
27+ g_object_unref (priv->window_group);
28+ priv->window_group = NULL;
29+ }
30+
31 swap_adjustment (scrollbar, NULL);
32 swap_thumb (scrollbar, NULL);
33
34@@ -1844,7 +1853,6 @@
35 OsScrollbar *scrollbar;
36 OsScrollbarPrivate *priv;
37
38-
39 scrollbar = OS_SCROLLBAR (widget);
40 priv = scrollbar->priv;
41
42@@ -1906,6 +1914,8 @@
43 scrollbar = OS_SCROLLBAR (widget);
44 priv = scrollbar->priv;
45
46+ gtk_window_group_add_window (priv->window_group, GTK_WINDOW (gtk_widget_get_toplevel (widget)));
47+
48 GTK_WIDGET_CLASS (g_type_class_peek (GTK_TYPE_WIDGET))->realize (widget);
49
50 gdk_window_set_events (gtk_widget_get_window (widget),
51@@ -2059,6 +2069,8 @@
52
53 os_pager_set_parent (OS_PAGER (priv->pager), NULL);
54
55+ gtk_window_group_remove_window (priv->window_group, GTK_WINDOW (gtk_widget_get_toplevel (widget)));
56+
57 GTK_WIDGET_CLASS (g_type_class_peek (GTK_TYPE_WIDGET))->unrealize (widget);
58 }
59
60
61=== modified file 'os/os-utils.c'
62--- os/os-utils.c 2011-05-18 21:25:41 +0000
63+++ os/os-utils.c 2011-06-03 15:48:43 +0000
64@@ -45,7 +45,6 @@
65 "pgadmin3",
66 "soffice",
67 "synaptic",
68- "system-config-printer.py",
69 "thunderbird-bin",
70 "update-manager",
71 "vinagre",

Subscribers

People subscribed via source and target branches