[gtk+/client-side-windows: 53/284] Make _gdk_windowing_window_queue_translation a GdkWindiwImpl call
- From: Alexander Larsson <alexl src gnome org>
- To: svn-commits-list gnome org
- Subject: [gtk+/client-side-windows: 53/284] Make _gdk_windowing_window_queue_translation a GdkWindiwImpl call
- Date: Thu, 2 Apr 2009 14:04:10 -0400 (EDT)
commit 36ce54878b7df02a7ff44e1f8d580cda051b0c12
Author: Alexander Larsson <alexl redhat com>
Date: Mon Dec 15 14:55:53 2008 +0100
Make _gdk_windowing_window_queue_translation a GdkWindiwImpl call
---
gdk/gdkinternals.h | 5 -----
gdk/gdkoffscreenwindow.c | 10 ++++++++++
gdk/gdkwindow.c | 32 +++++++++++++-------------------
gdk/gdkwindowimpl.h | 5 +++++
gdk/x11/gdkgeometry-x11.c | 8 ++++----
gdk/x11/gdkprivate-x11.h | 9 ++++++---
gdk/x11/gdkwindow-x11.c | 1 +
7 files changed, 39 insertions(+), 31 deletions(-)
diff --git a/gdk/gdkinternals.h b/gdk/gdkinternals.h
index ffa2237..ecc9b09 100644
--- a/gdk/gdkinternals.h
+++ b/gdk/gdkinternals.h
@@ -359,11 +359,6 @@ gint _gdk_windowing_get_bits_for_depth (GdkDisplay *display,
#define GDK_WINDOW_IS_MAPPED(window) ((((GdkWindowObject*)window)->state & GDK_WINDOW_STATE_WITHDRAWN) == 0)
-void _gdk_windowing_window_queue_translation (GdkWindow *window,
- GdkRegion *area,
- gint dx,
- gint dy);
-
/* Called to do the windowing system specific part of gdk_window_destroy(),
*
diff --git a/gdk/gdkoffscreenwindow.c b/gdk/gdkoffscreenwindow.c
index 7f87b82..03b52a6 100644
--- a/gdk/gdkoffscreenwindow.c
+++ b/gdk/gdkoffscreenwindow.c
@@ -1120,6 +1120,15 @@ gdk_offscreen_window_queue_antiexpose (GdkWindow *window,
}
static void
+gdk_offscreen_window_queue_translation (GdkWindow *window,
+ GdkRegion *area,
+ gint dx,
+ gint dy)
+{
+}
+
+
+static void
gdk_offscreen_window_class_init (GdkOffscreenWindowClass *klass)
{
GdkDrawableClass *drawable_class = GDK_DRAWABLE_CLASS (klass);
@@ -1173,6 +1182,7 @@ gdk_offscreen_window_impl_iface_init (GdkWindowImplIface *iface)
iface->merge_child_shapes = gdk_offscreen_window_merge_child_shapes;
iface->set_static_gravities = gdk_offscreen_window_set_static_gravities;
iface->queue_antiexpose = gdk_offscreen_window_queue_antiexpose;
+ iface->queue_translation = gdk_offscreen_window_queue_translation;
iface->get_origin = gdk_offscreen_window_get_origin;
}
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 81d8dd2..8bcdd37 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -5559,9 +5559,8 @@ gdk_window_move_resize_internal (GdkWindow *window,
/* The old_region area is moved and we queue translations for all expose events
to it that will be sent before the copy operation */
- /* TODO: Make queue_translation a vtable call instead of hardcoding this crap */
- if (!gdk_window_is_offscreen (impl_window))
- _gdk_windowing_window_queue_translation ((GdkWindow *)impl_window, old_region, dx, dy);
+ GDK_WINDOW_IMPL_GET_IFACE (impl_window->impl)->queue_translation ((GdkWindow *)impl_window,
+ old_region, dx, dy);
/* convert from parent coords to impl */
gdk_region_offset (copy_area, private->abs_x - private->x, private->abs_y - private->y);
@@ -5732,15 +5731,13 @@ gdk_window_scroll (GdkWindow *window,
/* Get window clip and convert to real window coords, this
area is moved and we queue translations for all expose events
to it that will be sent before the copy operation */
- /* TODO: Make queue_translation a vtable call instead of hardcoding this crap */
- if (!gdk_window_is_offscreen (impl_window))
- {
- source_area = gdk_region_copy (private->clip_region);
- /* convert from window coords to real parent */
- gdk_region_offset (source_area, private->abs_x, private->abs_y);
- _gdk_windowing_window_queue_translation ((GdkWindow *)impl_window, source_area, dx, dy);
- gdk_region_destroy (source_area);
- }
+
+ source_area = gdk_region_copy (private->clip_region);
+ /* convert from window coords to real parent */
+ gdk_region_offset (source_area, private->abs_x, private->abs_y);
+ GDK_WINDOW_IMPL_GET_IFACE (impl_window->impl)->queue_translation ((GdkWindow *)impl_window,
+ source_area, dx, dy);
+ gdk_region_destroy (source_area);
/* convert from window coords to impl */
gdk_region_offset (copy_area, private->abs_x, private->abs_y);
@@ -5809,13 +5806,10 @@ gdk_window_move_region (GdkWindow *window,
gdk_window_invalidate_region (window, nocopy_area, FALSE);
gdk_region_destroy (nocopy_area);
- /* TODO: Make queue_translation a vtable call instead of hardcoding this crap */
- if (!gdk_window_is_offscreen (impl_window))
- {
- gdk_region_offset (source_area, private->abs_x, private->abs_y);
- _gdk_windowing_window_queue_translation ((GdkWindow *)impl_window, source_area, dx, dy);
- }
-
+ gdk_region_offset (source_area, private->abs_x, private->abs_y);
+ GDK_WINDOW_IMPL_GET_IFACE (impl_window->impl)->queue_translation ((GdkWindow *)impl_window,
+ source_area, dx, dy);
+
/* convert from window coords to impl */
gdk_region_offset (copy_area, private->abs_x, private->abs_y);
diff --git a/gdk/gdkwindowimpl.h b/gdk/gdkwindowimpl.h
index 3509d87..ad1f620 100644
--- a/gdk/gdkwindowimpl.h
+++ b/gdk/gdkwindowimpl.h
@@ -108,6 +108,11 @@ struct _GdkWindowImplIface
*/
gboolean (* queue_antiexpose) (GdkWindow *window,
GdkRegion *update_area);
+ void (* queue_translation) (GdkWindow *window,
+ GdkRegion *area,
+ gint dx,
+ gint dy);
+
};
/* Interface Functions */
diff --git a/gdk/x11/gdkgeometry-x11.c b/gdk/x11/gdkgeometry-x11.c
index 47f210b..b88d4ee 100644
--- a/gdk/x11/gdkgeometry-x11.c
+++ b/gdk/x11/gdkgeometry-x11.c
@@ -357,10 +357,10 @@ gdk_window_queue (GdkWindow *window,
}
void
-_gdk_windowing_window_queue_translation (GdkWindow *window,
- GdkRegion *area,
- gint dx,
- gint dy)
+_gdk_x11_window_queue_translation (GdkWindow *window,
+ GdkRegion *area,
+ gint dx,
+ gint dy)
{
GdkWindowQueueItem *item = g_new (GdkWindowQueueItem, 1);
item->type = GDK_WINDOW_QUEUE_TRANSLATE;
diff --git a/gdk/x11/gdkprivate-x11.h b/gdk/x11/gdkprivate-x11.h
index ad1dfca..e1c4666 100644
--- a/gdk/x11/gdkprivate-x11.h
+++ b/gdk/x11/gdkprivate-x11.h
@@ -127,9 +127,12 @@ void _gdk_window_process_expose (GdkWindow *window,
gulong serial,
GdkRectangle *area);
-gboolean _gdk_x11_window_queue_antiexpose (GdkWindow *window,
- GdkRegion *area);
-
+gboolean _gdk_x11_window_queue_antiexpose (GdkWindow *window,
+ GdkRegion *area);
+void _gdk_x11_window_queue_translation (GdkWindow *window,
+ GdkRegion *area,
+ gint dx,
+ gint dy);
void _gdk_selection_window_destroyed (GdkWindow *window);
gboolean _gdk_selection_filter_clear_event (XSelectionClearEvent *event);
diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
index 86d7586..3b6d563 100644
--- a/gdk/x11/gdkwindow-x11.c
+++ b/gdk/x11/gdkwindow-x11.c
@@ -5925,6 +5925,7 @@ gdk_window_impl_iface_init (GdkWindowImplIface *iface)
iface->merge_child_shapes = gdk_window_x11_merge_child_shapes;
iface->set_static_gravities = gdk_window_x11_set_static_gravities;
iface->queue_antiexpose = _gdk_x11_window_queue_antiexpose;
+ iface->queue_translation = _gdk_x11_window_queue_translation;
}
#define __GDK_WINDOW_X11_C__
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]