]> Pileus Git - ~andy/gtk/blob - docs/reference/gtk/migrating-ClientSideWindows.sgml
Describe how gdk_x11_drawable_get_xid() works wrt CSW in docs
[~andy/gtk] / docs / reference / gtk / migrating-ClientSideWindows.sgml
1 <?xml version="1.0"?>
2 <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
3                "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
4 ]>
5 <chapter id="gtk-migrating-ClientSideWindows">
6
7   <title>Migrating to client-side windows</title>
8
9   <para>
10     In version 2.18, GDK has been changed to use client-side windows. This
11     means that there is no longer a 1-1 correspondence between #GdkWindows
12     and windows in the underlying window system. In particular, it is no
13     longer correct to assume that each window has an associated XID.
14     Code that makes this assumption can sometimes be fixed by calling
15     gdk_window_ensure_native() on the windows in question.
16     Calling gdk_x11_drawable_get_xid() from the X11-specific API on a
17     non-native window will explicitly call gdk_window_ensure_native(),
18     so old code using this will continue to work.
19   </para>
20
21   <para>
22     GDK looks for the <envvar>GDK_NATIVE_WINDOWS</envvar> environment variable
23     and makes all windows native if it is set. It also tries to be more
24     compatible with the way prior versions worked in some other ways.
25   </para>
26
27   <para>
28     Some applications assume that they can just operate on the X windows
29     corresponding to their GDK windows without ever telling GDK. One
30     example that we've seen is changing the child window stacking order
31     using XRestackWindows(). Fixing this properly requires to fix the code
32     to use GDK functions to achieve whatever it is trying to achieve.
33   </para>
34
35   <para>
36     One change that can cause problems for some applications is that GDK
37     is more aggressive about optimizing away expose events. Code that does
38     more than just repainting exposed areas in response to expose events
39     may be affected by this.
40   </para>
41
42 </chapter>