Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dorota Czaplejewicz
gtk
Commits
1c7f58fd
Commit
1c7f58fd
authored
Oct 06, 2010
by
Benjamin Otte
Browse files
x11: Move xid member from GdkDrawableImplX11 to GdkWindowImplX11
parent
a3c5005e
Changes
5
Hide whitespace changes
Inline
Side-by-side
gdk/x11/gdkdrawable-x11.c
View file @
1c7f58fd
...
...
@@ -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
);
}
...
...
gdk/x11/gdkdrawable-x11.h
View file @
1c7f58fd
...
...
@@ -51,8 +51,6 @@ struct _GdkDrawableImplX11
GdkDrawable
*
wrapper
;
Window
xid
;
cairo_surface_t
*
cairo_surface
;
};
...
...
gdk/x11/gdkwindow-x11.c
View file @
1c7f58fd
...
...
@@ -196,7 +196,7 @@ gdk_window_impl_x11_finalize (GObject *object)
{
GdkDisplay
*
display
=
GDK_WINDOW_DISPLAY
((
GdkWindow
*
)
wrapper
);
_gdk_xid_table_remove
(
display
,
dra
w_impl
->
xid
);
_gdk_xid_table_remove
(
display
,
windo
w_impl
->
xid
);
if
(
window_impl
->
toplevel
&&
window_impl
->
toplevel
->
focus_window
)
_gdk_xid_table_remove
(
display
,
window_impl
->
toplevel
->
focus_window
);
}
...
...
@@ -439,7 +439,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
;
...
...
@@ -665,7 +665,6 @@ _gdk_window_impl_new (GdkWindow *window,
Window
xparent
;
Visual
*
xvisual
;
Display
*
xdisplay
;
Window
xid
;
XSetWindowAttributes
xattributes
;
long
xattributes_mask
;
...
...
@@ -765,15 +764,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
))
{
...
...
@@ -791,7 +790,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
);
}
...
...
@@ -904,7 +903,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
;
...
...
@@ -5615,6 +5614,6 @@ gdk_x11_window_get_xid (GdkWindow *window)
impl
=
((
GdkWindowObject
*
)
window
)
->
impl
;
return
((
Gdk
Drawable
ImplX11
*
)
impl
)
->
xid
;
return
((
Gdk
Window
ImplX11
*
)
impl
)
->
xid
;
}
gdk/x11/gdkwindow-x11.h
View file @
1c7f58fd
...
...
@@ -58,6 +58,8 @@ struct _GdkWindowImplX11
{
GdkDrawableImplX11
parent_instance
;
Window
xid
;
GdkToplevelX11
*
toplevel
;
/* Toplevel-specific information */
GdkCursor
*
cursor
;
GHashTable
*
device_cursor
;
...
...
gdk/x11/gdkx.h
View file @
1c7f58fd
...
...
@@ -117,8 +117,8 @@ gint gdk_x11_get_default_screen (void);
* Returns: an Xlib <type>Display*</type>.
*/
#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)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment