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

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

Description of the change

I was storing the position of the window on size_allocate, but on size_allocate the widget could be not realized yet, so its gdk_window not on screen, and so os_scrollbar_store_window_position was storing random values.
Now, everything is done in the realize, so we're sure to get the right position

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-scrollbar.c'
2--- os/os-scrollbar.c 2011-03-09 16:16:12 +0000
3+++ os/os-scrollbar.c 2011-03-10 17:23:11 +0000
4@@ -496,8 +496,7 @@
5
6 priv = OS_SCROLLBAR_GET_PRIVATE (scrollbar);
7
8- if (GDK_IS_WINDOW (gtk_widget_get_window (priv->parent)))
9- gdk_window_get_position (gtk_widget_get_window (priv->parent), &win_x, &win_y);
10+ gdk_window_get_position (gtk_widget_get_window (priv->parent), &win_x, &win_y);
11
12 if (priv->orientation == GTK_ORIENTATION_VERTICAL)
13 {
14@@ -985,6 +984,8 @@
15 os_scrollbar_calc_layout_pager (scrollbar, priv->adjustment->value);
16
17 os_pager_set_parent (OS_PAGER (priv->pager), priv->parent);
18+
19+ os_scrollbar_store_window_position (scrollbar);
20 }
21
22 static void
23@@ -1025,8 +1026,6 @@
24 os_scrollbar_calc_layout_pager (scrollbar, priv->adjustment->value);
25
26 pager_set_allocation (scrollbar);
27-
28- os_scrollbar_store_window_position (scrollbar);
29 }
30
31 static void
32@@ -1110,7 +1109,6 @@
33 os_scrollbar_calc_layout_pager (scrollbar, priv->adjustment->value);
34 os_scrollbar_calc_layout_slider (scrollbar, priv->adjustment->value);
35
36- /* XXX missing horizontal */
37 /* proximity area */
38 if (priv->orientation == GTK_ORIENTATION_VERTICAL)
39 {

Subscribers

People subscribed via source and target branches