summaryrefslogtreecommitdiff
path: root/gdk/gdkinternals.h
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2012-11-07 13:03:32 +0100
committerAlexander Larsson <alexl@redhat.com>2013-02-07 11:11:37 +0100
commit4d3c77f9200dbdfa71e2aaa390d11e88099b5c6e (patch)
tree86cb6b83b74f7cde4a1b2a70729d47bcccec525a /gdk/gdkinternals.h
parentada6d81247fc1dac9d5cbadbd343e25c11da939f (diff)
downloadgtk+-4d3c77f9200dbdfa71e2aaa390d11e88099b5c6e.tar.gz
gdkwindow: Allow gdk_window_set_opacity on non-native children
We now store the current opacity for all windows. For native windows we just call into the native implementation whenever the opacity changes. However, for non-native windows we implement opacity by pushing a second implicit paint that "stacks" on the existing one, acting as an opacity group while rendering the window and its children. This works well in general, although any native child windows will of course not be opaque. However, there is no way to implement implicit paint flushing (i.e. draw the currently drawn double buffer to the window in order to allow direct drawing to the window). We can't flush in the stacked implicit paint case because there is no way to get the right drawing behaviour when drawing directly to the window. We *must* draw to the opacity group to get the right behaviour. We currently flush if: * A widget disables double buffering * You call move/resize/scroll a window and it has non-native children during the expose handler In case this happens we warn and flush the outermost group, so there may be drawing errors. https://bugzilla.gnome.org/show_bug.cgi?id=687842
Diffstat (limited to 'gdk/gdkinternals.h')
-rw-r--r--gdk/gdkinternals.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/gdk/gdkinternals.h b/gdk/gdkinternals.h
index 4a2bc87488..d150414c55 100644
--- a/gdk/gdkinternals.h
+++ b/gdk/gdkinternals.h
@@ -200,6 +200,7 @@ struct _GdkWindow
guint8 resize_count;
gint8 toplevel_window_type;
+ guint8 alpha;
GdkWindowState state;