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

Proposed by Andrea Cimitan
Status: Merged
Merged at revision: 190
Proposed branch: lp:~cimi/overlay-scrollbar/fix-746189
Merge into: lp:overlay-scrollbar
Diff against target: 36 lines (+13/-7)
1 file modified
os/os-thumb.c (+13/-7)
To merge this branch: bzr merge lp:~cimi/overlay-scrollbar/fix-746189
Reviewer Review Type Date Requested Status
Loïc Molinari (community) Approve
Review via email: mp+56163@code.launchpad.net

Description of the change

Check the right visual before saying the thumb should have rgba

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

Better approach to composite-changed, always set it to false, and set to true only when the condition is verified

Revision history for this message
Loïc Molinari (loic.molinari) :
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-03-28 16:17:49 +0000
3+++ os/os-thumb.c 2011-04-04 16:27:31 +0000
4@@ -221,19 +221,25 @@
5 static void
6 os_thumb_composited_changed (GtkWidget *widget)
7 {
8- GdkScreen *screen;
9 OsThumb *thumb;
10 OsThumbPrivate *priv;
11
12 thumb = OS_THUMB (widget);
13 priv = thumb->priv;
14
15- screen = gtk_widget_get_screen (widget);
16-
17- if (gdk_screen_is_composited (screen))
18- priv->can_rgba = TRUE;
19- else
20- priv->can_rgba = FALSE;
21+ priv->can_rgba = FALSE;
22+
23+ if (gdk_screen_is_composited (gtk_widget_get_screen (widget)))
24+ {
25+ GdkVisual *visual;
26+
27+ visual = gtk_widget_get_visual (widget);
28+
29+ if (visual->depth == 32 && (visual->red_mask == 0xff0000 &&
30+ visual->green_mask == 0x00ff00 &&
31+ visual->blue_mask == 0x0000ff))
32+ priv->can_rgba = TRUE;
33+ }
34
35 gtk_widget_queue_draw (widget);
36 }

Subscribers

People subscribed via source and target branches