[gtk+/broadway: 6/71] [broadway] Track dirty windows
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/broadway: 6/71] [broadway] Track dirty windows
- Date: Thu, 25 Nov 2010 21:15:46 +0000 (UTC)
commit 73f9c0cc00f612d1f888b911755567effb6833bb
Author: Alexander Larsson <alexl redhat com>
Date: Mon Nov 15 21:51:32 2010 +0100
[broadway] Track dirty windows
gdk/broadway/gdkwindow-broadway.c | 22 ++++++++++++++++++++++
gdk/broadway/gdkwindow-broadway.h | 2 ++
2 files changed, 24 insertions(+), 0 deletions(-)
---
diff --git a/gdk/broadway/gdkwindow-broadway.c b/gdk/broadway/gdkwindow-broadway.c
index 7103ab5..2bbd600 100644
--- a/gdk/broadway/gdkwindow-broadway.c
+++ b/gdk/broadway/gdkwindow-broadway.c
@@ -85,6 +85,9 @@ _gdk_window_impl_get_type (void)
static void
gdk_window_impl_x11_init (GdkWindowImplX11 *impl)
{
+ static int current_id = 1; /* 0 is the root window */
+
+ impl->id = current_id++;
all_windows = g_list_prepend (all_windows, impl);
impl->toplevel_window_type = -1;
impl->device_cursor = g_hash_table_new_full (NULL, NULL, NULL,
@@ -978,7 +981,14 @@ void
_gdk_windowing_window_process_updates_recurse (GdkWindow *window,
cairo_region_t *region)
{
+ GdkWindowObject *private;
+ GdkWindowImplX11 *impl;
+
_gdk_window_process_updates_recurse (window, region);
+
+ private = (GdkWindowObject *)window;
+ impl = GDK_WINDOW_IMPL_X11 (private->impl);
+ impl->dirty = TRUE;
}
void
@@ -989,6 +999,18 @@ _gdk_windowing_before_process_all_updates (void)
void
_gdk_windowing_after_process_all_updates (void)
{
+ GList *l;
+
+ for (l = all_windows; l != NULL; l = l->next)
+ {
+ GdkWindowImplX11 *impl = l->data;
+
+ if (impl->dirty)
+ {
+ /* TODO: Flush dirty windows */
+ impl->dirty = FALSE;
+ }
+ }
}
gboolean
diff --git a/gdk/broadway/gdkwindow-broadway.h b/gdk/broadway/gdkwindow-broadway.h
index 99296db..0f0c248 100644
--- a/gdk/broadway/gdkwindow-broadway.h
+++ b/gdk/broadway/gdkwindow-broadway.h
@@ -50,10 +50,12 @@ struct _GdkWindowImplX11
{
GdkDrawableImplX11 parent_instance;
+ int id;
GdkCursor *cursor;
GHashTable *device_cursor;
gint8 toplevel_window_type;
+ gboolean dirty;
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]