[gtk+/rendering-cleanup: 14/17] x11: Move xid member from GdkDrawableImplX11 to GdkWindowImplX11
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/rendering-cleanup: 14/17] x11: Move xid member from GdkDrawableImplX11 to GdkWindowImplX11
- Date: Wed, 6 Oct 2010 02:26:35 +0000 (UTC)
commit 60da993bde54fdba6079abc14aad63336703367f
Author: Benjamin Otte <otte redhat com>
Date: Wed Oct 6 02:15:51 2010 +0200
x11: Move xid member from GdkDrawableImplX11 to GdkWindowImplX11
gdk/x11/gdkdrawable-x11.c | 2 +-
gdk/x11/gdkdrawable-x11.h | 2 --
gdk/x11/gdkwindow-x11.c | 25 ++++++++++++-------------
gdk/x11/gdkwindow-x11.h | 2 ++
gdk/x11/gdkx.h | 4 ++--
5 files changed, 17 insertions(+), 18 deletions(-)
---
diff --git a/gdk/x11/gdkdrawable-x11.c b/gdk/x11/gdkdrawable-x11.c
index d59ae78..df8bcfa 100644
--- a/gdk/x11/gdkdrawable-x11.c
+++ b/gdk/x11/gdkdrawable-x11.c
@@ -123,7 +123,7 @@ gdk_x11_create_cairo_surface (GdkDrawable *drawable,
visual = gdk_window_get_visual (impl->wrapper);
return cairo_xlib_surface_create (GDK_WINDOW_XDISPLAY (impl->wrapper),
- impl->xid,
+ GDK_WINDOW_IMPL_X11 (impl)->xid,
GDK_VISUAL_XVISUAL (visual),
width, height);
}
diff --git a/gdk/x11/gdkdrawable-x11.h b/gdk/x11/gdkdrawable-x11.h
index 13ac62e..438a8c1 100644
--- a/gdk/x11/gdkdrawable-x11.h
+++ b/gdk/x11/gdkdrawable-x11.h
@@ -52,8 +52,6 @@ struct _GdkDrawableImplX11
GdkDrawable *wrapper;
- Window xid;
-
cairo_surface_t *cairo_surface;
};
diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
index 9ec88f9..8df11a7 100644
--- a/gdk/x11/gdkwindow-x11.c
+++ b/gdk/x11/gdkwindow-x11.c
@@ -198,7 +198,7 @@ gdk_window_impl_x11_finalize (GObject *object)
{
GdkDisplay *display = GDK_WINDOW_DISPLAY ((GdkWindow *) wrapper);
- _gdk_xid_table_remove (display, draw_impl->xid);
+ _gdk_xid_table_remove (display, window_impl->xid);
if (window_impl->toplevel && window_impl->toplevel->focus_window)
_gdk_xid_table_remove (display, window_impl->toplevel->focus_window);
}
@@ -438,7 +438,7 @@ _gdk_windowing_window_init (GdkScreen * screen)
draw_impl = GDK_DRAWABLE_IMPL_X11 (private->impl);
- draw_impl->xid = screen_x11->xroot_window;
+ GDK_WINDOW_IMPL_X11 (draw_impl)->xid = screen_x11->xroot_window;
draw_impl->wrapper = GDK_DRAWABLE (private);
private->window_type = GDK_WINDOW_ROOT;
@@ -664,7 +664,6 @@ _gdk_window_impl_new (GdkWindow *window,
Window xparent;
Visual *xvisual;
Display *xdisplay;
- Window xid;
XSetWindowAttributes xattributes;
long xattributes_mask;
@@ -764,15 +763,15 @@ _gdk_window_impl_new (GdkWindow *window,
private->height = 65535;
}
- xid = draw_impl->xid = XCreateWindow (xdisplay, xparent,
- private->x + private->parent->abs_x,
- private->y + private->parent->abs_y,
- private->width, private->height,
- 0, private->depth, class, xvisual,
- xattributes_mask, &xattributes);
+ impl->xid = XCreateWindow (xdisplay, xparent,
+ private->x + private->parent->abs_x,
+ private->y + private->parent->abs_y,
+ private->width, private->height,
+ 0, private->depth, class, xvisual,
+ xattributes_mask, &xattributes);
g_object_ref (window);
- _gdk_xid_table_insert (screen_x11->display, &draw_impl->xid, window);
+ _gdk_xid_table_insert (screen_x11->display, &impl->xid, window);
switch (GDK_WINDOW_TYPE (private))
{
@@ -790,7 +789,7 @@ _gdk_window_impl_new (GdkWindow *window,
class_hint = XAllocClassHint ();
class_hint->res_name = attributes->wmclass_name;
class_hint->res_class = attributes->wmclass_class;
- XSetClassHint (xdisplay, xid, class_hint);
+ XSetClassHint (xdisplay, impl->xid, class_hint);
XFree (class_hint);
}
@@ -903,7 +902,7 @@ gdk_window_foreign_new_for_display (GdkDisplay *display,
private->parent->children = g_list_prepend (private->parent->children, window);
- draw_impl->xid = anid;
+ impl->xid = anid;
private->x = attrs.x;
private->y = attrs.y;
@@ -5613,6 +5612,6 @@ gdk_x11_window_get_xid (GdkWindow *window)
impl = ((GdkWindowObject *) window)->impl;
- return ((GdkDrawableImplX11 *)impl)->xid;
+ return ((GdkWindowImplX11 *)impl)->xid;
}
diff --git a/gdk/x11/gdkwindow-x11.h b/gdk/x11/gdkwindow-x11.h
index d9c617f..57ba01a 100644
--- a/gdk/x11/gdkwindow-x11.h
+++ b/gdk/x11/gdkwindow-x11.h
@@ -58,6 +58,8 @@ struct _GdkWindowImplX11
{
GdkDrawableImplX11 parent_instance;
+ Window xid;
+
GdkToplevelX11 *toplevel; /* Toplevel-specific information */
GdkCursor *cursor;
GHashTable *device_cursor;
diff --git a/gdk/x11/gdkx.h b/gdk/x11/gdkx.h
index 4aa8b11..d5530d5 100644
--- a/gdk/x11/gdkx.h
+++ b/gdk/x11/gdkx.h
@@ -64,8 +64,8 @@ gint gdk_x11_get_default_screen (void);
#define GDK_DISPLAY_XDISPLAY(display) (GDK_DISPLAY_X11(display)->xdisplay)
#define GDK_WINDOW_XDISPLAY(win) (GDK_SCREEN_X11 (GDK_WINDOW_SCREEN (win))->xdisplay)
-#define GDK_WINDOW_XID(win) (GDK_DRAWABLE_IMPL_X11(((GdkWindowObject *)win)->impl)->xid)
-#define GDK_WINDOW_XWINDOW(win) (GDK_DRAWABLE_IMPL_X11(((GdkWindowObject *)win)->impl)->xid)
+#define GDK_WINDOW_XID(win) (GDK_WINDOW_IMPL_X11(((GdkWindowObject *)win)->impl)->xid)
+#define GDK_WINDOW_XWINDOW(win) (GDK_WINDOW_IMPL_X11(((GdkWindowObject *)win)->impl)->xid)
#define GDK_SCREEN_XDISPLAY(screen) (GDK_SCREEN_X11 (screen)->xdisplay)
#define GDK_SCREEN_XSCREEN(screen) (GDK_SCREEN_X11 (screen)->xscreen)
#define GDK_SCREEN_XNUMBER(screen) (GDK_SCREEN_X11 (screen)->screen_num)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]