summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2010-10-14 22:05:51 -0400
committerMatthias Clasen <mclasen@redhat.com>2010-10-14 22:09:36 -0400
commitbda1f3558504266cde3cb2bbe247dd489bcda941 (patch)
treee66521ee70a93e48a52e124f25af2e1258d9fdf9
parent88ef199ed713412a1825942f2929d382bf0b05f4 (diff)
downloadgtk+-bda1f3558504266cde3cb2bbe247dd489bcda941.tar.gz
Inclusion cleanups in sources
Try to do inclusions in the same sequence, more or less.
-rw-r--r--gdk/gdk.c7
-rw-r--r--gdk/gdkapplaunchcontext.c1
-rw-r--r--gdk/gdkcairo.c5
-rw-r--r--gdk/gdkcolor.c5
-rw-r--r--gdk/gdkcursor.c2
-rw-r--r--gdk/gdkdevice.c2
-rw-r--r--gdk/gdkdevicemanager.c2
-rw-r--r--gdk/gdkdisplay.c8
-rw-r--r--gdk/gdkdisplaymanager.c5
-rw-r--r--gdk/gdkdnd.c8
-rw-r--r--gdk/gdkdraw.c10
-rw-r--r--gdk/gdkevents.c5
-rw-r--r--gdk/gdkglobals.c4
-rw-r--r--gdk/gdkkeynames.c7
-rw-r--r--gdk/gdkkeys.c3
-rw-r--r--gdk/gdkkeyuni.c3
-rw-r--r--gdk/gdkmedialib.c4
-rw-r--r--gdk/gdkoffscreenwindow.c3
-rw-r--r--gdk/gdkpango.c7
-rw-r--r--gdk/gdkpixbuf-drawable.c5
-rw-r--r--gdk/gdkrectangle.c3
-rw-r--r--gdk/gdkscreen.c6
-rw-r--r--gdk/gdkselection.c4
-rw-r--r--gdk/gdkvisual.c2
-rw-r--r--gdk/gdkwindow.c5
-rw-r--r--gdk/gdkwindowimpl.c2
-rw-r--r--gdk/x11/checksettings.c7
-rw-r--r--gdk/x11/gdkapplaunchcontext-x11.c12
-rw-r--r--gdk/x11/gdkasync.c7
-rw-r--r--gdk/x11/gdkcursor-x11.c12
-rw-r--r--gdk/x11/gdkdevice-core.c3
-rw-r--r--gdk/x11/gdkdevice-xi.c5
-rw-r--r--gdk/x11/gdkdevice-xi2.c3
-rw-r--r--gdk/x11/gdkdevicemanager-core.c5
-rw-r--r--gdk/x11/gdkdevicemanager-x11.c4
-rw-r--r--gdk/x11/gdkdevicemanager-xi.c1
-rw-r--r--gdk/x11/gdkdevicemanager-xi2.c7
-rw-r--r--gdk/x11/gdkdisplay-x11.c15
-rw-r--r--gdk/x11/gdkdnd-x11.c19
-rw-r--r--gdk/x11/gdkdrawable-x11.c12
-rw-r--r--gdk/x11/gdkeventsource.c1
-rw-r--r--gdk/x11/gdkgeometry-x11.c3
-rw-r--r--gdk/x11/gdkglobals-x11.c3
-rw-r--r--gdk/x11/gdkim-x11.c10
-rw-r--r--gdk/x11/gdkinput.c4
-rw-r--r--gdk/x11/gdkkeys-x11.c14
-rw-r--r--gdk/x11/gdkmain-x11.c18
-rw-r--r--gdk/x11/gdkproperty-x11.c14
-rw-r--r--gdk/x11/gdkscreen-x11.c10
-rw-r--r--gdk/x11/gdkselection-x11.c10
-rw-r--r--gdk/x11/gdkspawn-x11.c5
-rw-r--r--gdk/x11/gdktestutils-x11.c10
-rw-r--r--gdk/x11/gdkvisual-x11.c8
-rw-r--r--gdk/x11/gdkwindow-x11.c30
-rw-r--r--gdk/x11/gdkxftdefaults.c3
-rw-r--r--gdk/x11/gdkxid.c2
-rw-r--r--gdk/x11/xsettings-client.c6
-rw-r--r--gdk/x11/xsettings-common.c6
58 files changed, 226 insertions, 161 deletions
diff --git a/gdk/gdk.c b/gdk/gdk.c
index 6d5bbc154e..ba6582db66 100644
--- a/gdk/gdk.c
+++ b/gdk/gdk.c
@@ -26,10 +26,8 @@
#include "config.h"
-#include <string.h>
-#include <stdlib.h>
+#include "gdkmain.h"
-#include "gdk.h"
#include "gdkinternals.h"
#include "gdkintl.h"
@@ -37,6 +35,9 @@
#include "gdkkeysyms.h"
#endif
+#include <string.h>
+#include <stdlib.h>
+
typedef struct _GdkPredicate GdkPredicate;
struct _GdkPredicate
diff --git a/gdk/gdkapplaunchcontext.c b/gdk/gdkapplaunchcontext.c
index aa37ca7fc6..46fd99a4fd 100644
--- a/gdk/gdkapplaunchcontext.c
+++ b/gdk/gdkapplaunchcontext.c
@@ -23,6 +23,7 @@
#include "config.h"
#include "gdkapplaunchcontext.h"
+
#include "gdkinternals.h"
#include "gdkscreen.h"
#include "gdkintl.h"
diff --git a/gdk/gdkcairo.c b/gdk/gdkcairo.c
index ee7561ab3d..5e711b6ab6 100644
--- a/gdk/gdkcairo.c
+++ b/gdk/gdkcairo.c
@@ -17,13 +17,14 @@
* Boston, MA 02111-1307, USA.
*/
-#include "gdkcairo.h"
+#include "config.h"
-#include <math.h>
+#include "gdkcairo.h"
#include "gdkdrawable.h"
#include "gdkinternals.h"
+#include <math.h>
/**
* SECTION:cairo_interaction
diff --git a/gdk/gdkcolor.c b/gdk/gdkcolor.c
index 1257399030..d4ab63cb28 100644
--- a/gdk/gdkcolor.c
+++ b/gdk/gdkcolor.c
@@ -25,12 +25,13 @@
*/
#include "config.h"
-#include <time.h>
-#include "gdkscreen.h"
#include "gdkcolor.h"
+
+#include "gdkscreen.h"
#include "gdkinternals.h"
+#include <time.h>
/**
* SECTION:colors
diff --git a/gdk/gdkcursor.c b/gdk/gdkcursor.c
index dbed4f2e10..0aabd5940a 100644
--- a/gdk/gdkcursor.c
+++ b/gdk/gdkcursor.c
@@ -25,7 +25,9 @@
*/
#include "config.h"
+
#include "gdkcursor.h"
+
#include "gdkdisplay.h"
#include "gdkinternals.h"
diff --git a/gdk/gdkdevice.c b/gdk/gdkdevice.c
index 4c9421726d..aaf4989931 100644
--- a/gdk/gdkdevice.c
+++ b/gdk/gdkdevice.c
@@ -18,7 +18,9 @@
*/
#include "config.h"
+
#include "gdkdevice.h"
+
#include "gdkdeviceprivate.h"
#include "gdkintl.h"
#include "gdkinternals.h"
diff --git a/gdk/gdkdevicemanager.c b/gdk/gdkdevicemanager.c
index 8f1457b62e..2edaa28705 100644
--- a/gdk/gdkdevicemanager.c
+++ b/gdk/gdkdevicemanager.c
@@ -18,7 +18,9 @@
*/
#include "config.h"
+
#include "gdkdevicemanager.h"
+
#include "gdkintl.h"
#include "gdkinternals.h"
diff --git a/gdk/gdkdisplay.c b/gdk/gdkdisplay.c
index 39ccd25db2..2f3050965a 100644
--- a/gdk/gdkdisplay.c
+++ b/gdk/gdkdisplay.c
@@ -22,15 +22,17 @@
*/
#include "config.h"
-#include <math.h>
-#include <glib.h>
-#include "gdk.h" /* gdk_event_send_client_message() */
+
#include "gdkdisplay.h"
+
+#include "gdkevents.h"
#include "gdkwindowimpl.h"
#include "gdkinternals.h"
#include "gdkmarshalers.h"
#include "gdkscreen.h"
+#include <glib.h>
+#include <math.h>
enum {
OPENED,
diff --git a/gdk/gdkdisplaymanager.c b/gdk/gdkdisplaymanager.c
index 93a632eec3..5da2c02184 100644
--- a/gdk/gdkdisplaymanager.c
+++ b/gdk/gdkdisplaymanager.c
@@ -26,13 +26,12 @@
#include "config.h"
-#include "gdkscreen.h"
-#include "gdkdisplay.h"
#include "gdkdisplaymanager.h"
+#include "gdkscreen.h"
+#include "gdkdisplay.h"
#include "gdkinternals.h"
#include "gdkmarshalers.h"
-
#include "gdkintl.h"
diff --git a/gdk/gdkdnd.c b/gdk/gdkdnd.c
index 49b9d04cf6..cccae0968a 100644
--- a/gdk/gdkdnd.c
+++ b/gdk/gdkdnd.c
@@ -25,9 +25,11 @@
*/
#include "config.h"
-#include <gdkdnd.h>
-#include <gdkdisplay.h>
-#include <gdkwindow.h>
+
+#include "gdkdnd.h"
+
+#include "gdkdisplay.h"
+#include "gdkwindow.h"
/**
diff --git a/gdk/gdkdraw.c b/gdk/gdkdraw.c
index 2c5c4e2630..d31dfd9a66 100644
--- a/gdk/gdkdraw.c
+++ b/gdk/gdkdraw.c
@@ -25,16 +25,18 @@
*/
#include "config.h"
-#include <math.h>
-#include <pango/pangocairo.h>
-#include <gdk-pixbuf/gdk-pixbuf.h>
-#include "gdkcairo.h"
+
#include "gdkdrawable.h"
+
+#include "gdkcairo.h"
#include "gdkinternals.h"
#include "gdkwindow.h"
#include "gdkscreen.h"
#include "gdkpixbuf.h"
+#include <pango/pangocairo.h>
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <math.h>
G_DEFINE_ABSTRACT_TYPE (GdkDrawable, gdk_drawable, G_TYPE_OBJECT)
diff --git a/gdk/gdkevents.c b/gdk/gdkevents.c
index f44a658f0d..7fd197ec0b 100644
--- a/gdk/gdkevents.c
+++ b/gdk/gdkevents.c
@@ -25,12 +25,11 @@
*/
#include "config.h"
-#include <string.h> /* For memset() */
-#include <math.h>
-#include "gdk.h"
#include "gdkinternals.h"
+#include <string.h>
+#include <math.h>
typedef struct _GdkIOClosure GdkIOClosure;
diff --git a/gdk/gdkglobals.c b/gdk/gdkglobals.c
index fc73495872..5413886694 100644
--- a/gdk/gdkglobals.c
+++ b/gdk/gdkglobals.c
@@ -26,11 +26,11 @@
#include "config.h"
-#include <stdio.h>
-
#include "gdktypes.h"
#include "gdkprivate.h"
+#include <stdio.h>
+
guint _gdk_debug_flags = 0;
GList *_gdk_default_filters = NULL;
diff --git a/gdk/gdkkeynames.c b/gdk/gdkkeynames.c
index 0e5ad1af55..bbebc3b26b 100644
--- a/gdk/gdkkeynames.c
+++ b/gdk/gdkkeynames.c
@@ -25,9 +25,6 @@
*/
#include "config.h"
-#include <glib/gprintf.h>
-#include <stdlib.h>
-#include <string.h>
#include "gdkkeysyms.h"
#include "gdkinternals.h"
@@ -36,6 +33,10 @@
#include "keyname-table.h"
+#include <glib/gprintf.h>
+#include <stdlib.h>
+#include <string.h>
+
#define GDK_NUM_KEYS G_N_ELEMENTS (gdk_keys_by_keyval)
static int
diff --git a/gdk/gdkkeys.c b/gdk/gdkkeys.c
index b8fb27a5da..872576f6d3 100644
--- a/gdk/gdkkeys.c
+++ b/gdk/gdkkeys.c
@@ -26,9 +26,10 @@
#include "config.h"
-#include "gdkdisplay.h"
#include "gdkkeys.h"
+#include "gdkdisplay.h"
+
enum {
DIRECTION_CHANGED,
diff --git a/gdk/gdkkeyuni.c b/gdk/gdkkeyuni.c
index 05ab843c20..a029044fc3 100644
--- a/gdk/gdkkeyuni.c
+++ b/gdk/gdkkeyuni.c
@@ -25,7 +25,8 @@
*/
#include "config.h"
-#include "gdk.h"
+
+#include "gdktypes.h"
/* Thanks to Markus G. Kuhn <mkuhn@acm.org> for the ksysym<->Unicode
diff --git a/gdk/gdkmedialib.c b/gdk/gdkmedialib.c
index effb89dd85..597726824b 100644
--- a/gdk/gdkmedialib.c
+++ b/gdk/gdkmedialib.c
@@ -27,6 +27,8 @@
#include "config.h"
+#include "gdkmedialib.h"
+
#include <stdlib.h>
#include <dlfcn.h>
@@ -44,8 +46,6 @@
#include <sys/sysinfo.h>
#endif
-#include "gdkmedialib.h"
-
typedef char * (*ml_version) (void);
static ml_version medialib_version = mlib_version;
diff --git a/gdk/gdkoffscreenwindow.c b/gdk/gdkoffscreenwindow.c
index 55d1fad827..81f3bbc599 100644
--- a/gdk/gdkoffscreenwindow.c
+++ b/gdk/gdkoffscreenwindow.c
@@ -26,12 +26,11 @@
#include "config.h"
-#include <math.h>
-
#include "gdkwindow.h"
#include "gdkinternals.h"
#include "gdkwindowimpl.h"
+#include <math.h>
/* LIMITATIONS:
*
diff --git a/gdk/gdkpango.c b/gdk/gdkpango.c
index 678b45b9f9..20361eada9 100644
--- a/gdk/gdkpango.c
+++ b/gdk/gdkpango.c
@@ -18,12 +18,15 @@
*/
#include "config.h"
-#include <math.h>
-#include <pango/pangocairo.h>
+
#include "gdkpango.h"
+
#include "gdkscreen.h"
#include "gdkintl.h"
+#include <math.h>
+#include <pango/pangocairo.h>
+
/* Get a clip region to draw only part of a layout. index_ranges
* contains alternating range starts/stops. The region is the
* region which contains the given ranges, i.e. if you draw with the
diff --git a/gdk/gdkpixbuf-drawable.c b/gdk/gdkpixbuf-drawable.c
index 1e2f29fd43..a8a5b7e657 100644
--- a/gdk/gdkpixbuf-drawable.c
+++ b/gdk/gdkpixbuf-drawable.c
@@ -23,13 +23,14 @@
*/
#include "config.h"
-#include <gdk-pixbuf/gdk-pixbuf.h>
+
+#include "gdkpixbuf.h"
#include "gdkcolor.h"
#include "gdkwindow.h"
-#include "gdkpixbuf.h"
#include "gdkinternals.h"
+#include <gdk-pixbuf/gdk-pixbuf.h>
/**
* SECTION:pixbufs
diff --git a/gdk/gdkrectangle.c b/gdk/gdkrectangle.c
index 03ce78c743..ff68aa53ac 100644
--- a/gdk/gdkrectangle.c
+++ b/gdk/gdkrectangle.c
@@ -25,7 +25,8 @@
*/
#include "config.h"
-#include <gdk/gdk.h>
+
+#include "gdkrectangle.h"
/**
diff --git a/gdk/gdkscreen.c b/gdk/gdkscreen.c
index c7d6593da6..25b22d8aef 100644
--- a/gdk/gdkscreen.c
+++ b/gdk/gdkscreen.c
@@ -22,9 +22,11 @@
*/
#include "config.h"
-#include "gdk.h" /* For gdk_rectangle_intersect() */
-#include "gdkwindow.h"
+
#include "gdkscreen.h"
+
+#include "gdkrectangle.h"
+#include "gdkwindow.h"
#include "gdkintl.h"
diff --git a/gdk/gdkselection.c b/gdk/gdkselection.c
index e814e30b83..eed340a02b 100644
--- a/gdk/gdkselection.c
+++ b/gdk/gdkselection.c
@@ -25,9 +25,11 @@
*/
#include "config.h"
+
+#include "gdkselection.h"
+
#include "gdkproperty.h"
#include "gdkdisplay.h"
-#include "gdkselection.h"
gboolean
diff --git a/gdk/gdkvisual.c b/gdk/gdkvisual.c
index 2501a09229..ea4c07f268 100644
--- a/gdk/gdkvisual.c
+++ b/gdk/gdkvisual.c
@@ -22,7 +22,9 @@
*/
#include "config.h"
+
#include "gdkvisual.h"
+
#include "gdkscreen.h"
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index e1e8be6222..9ff1934b39 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -34,9 +34,8 @@
#ifdef GDK_WINDOWING_X11
#include "x11/gdkx.h" /* For workaround */
#endif
-#include "math.h"
-#include "gdk.h" /* For gdk_rectangle_union() */
+#include "gdkrectangle.h"
#include "gdkinternals.h"
#include "gdkintl.h"
#include "gdkscreen.h"
@@ -46,6 +45,8 @@
#include "gdkscreen.h"
#include "gdkwindowimpl.h"
+#include <math.h>
+
#undef DEBUG_WINDOW_PRINTING
diff --git a/gdk/gdkwindowimpl.c b/gdk/gdkwindowimpl.c
index 2c4df30d51..5658373b11 100644
--- a/gdk/gdkwindowimpl.c
+++ b/gdk/gdkwindowimpl.c
@@ -25,7 +25,9 @@
*/
#include "config.h"
+
#include "gdkwindowimpl.h"
+
#include "gdkinternals.h"
diff --git a/gdk/x11/checksettings.c b/gdk/x11/checksettings.c
index ea6ca3a258..3e05fe89e5 100644
--- a/gdk/x11/checksettings.c
+++ b/gdk/x11/checksettings.c
@@ -17,8 +17,13 @@
* Boston, MA 02111-1307, USA.
*/
-#include <string.h>
+#include "config.h"
+
+#include "gdktypes.h"
+
#include <glib.h>
+#include <string.h>
+
#include "gdksettings.c"
int
diff --git a/gdk/x11/gdkapplaunchcontext-x11.c b/gdk/x11/gdkapplaunchcontext-x11.c
index b91b21355e..df3781edbb 100644
--- a/gdk/x11/gdkapplaunchcontext-x11.c
+++ b/gdk/x11/gdkapplaunchcontext-x11.c
@@ -22,18 +22,18 @@
#include "config.h"
-#include <string.h>
-#include <unistd.h>
-
-#include <glib.h>
-#include <gio/gdesktopappinfo.h>
+#include "gdkapplaunchcontext.h"
#include "gdkx.h"
-#include "gdkapplaunchcontext.h"
#include "gdkscreen.h"
#include "gdkinternals.h"
#include "gdkintl.h"
+#include <glib.h>
+#include <gio/gdesktopappinfo.h>
+
+#include <string.h>
+#include <unistd.h>
static char *
get_display_name (GFile *file)
diff --git a/gdk/x11/gdkasync.c b/gdk/x11/gdkasync.c
index f216c0b136..2f591b0906 100644
--- a/gdk/x11/gdkasync.c
+++ b/gdk/x11/gdkasync.c
@@ -44,12 +44,15 @@ in this Software without prior written authorization from The Open Group.
*/
#include "config.h"
+
+#include "gdkasync.h"
+#include "gdkx.h"
+
#ifdef NEED_XIPROTO_H_FOR_XREPLY
#include <X11/extensions/XIproto.h>
#endif
+
#include <X11/Xlibint.h>
-#include "gdkasync.h"
-#include "gdkx.h"
typedef struct _ChildInfoChildState ChildInfoChildState;
diff --git a/gdk/x11/gdkcursor-x11.c b/gdk/x11/gdkcursor-x11.c
index 67ce6d4a02..6808c0e0e9 100644
--- a/gdk/x11/gdkcursor-x11.c
+++ b/gdk/x11/gdkcursor-x11.c
@@ -26,7 +26,14 @@
#include "config.h"
+#include "gdkcursor.h"
+
+#include "gdkprivate-x11.h"
+#include "gdkdisplay-x11.h"
+#include "gdkx.h"
+
#define GDK_PIXBUF_ENABLE_BACKEND
+#include <gdk-pixbuf/gdk-pixbuf.h>
#include <X11/Xlib.h>
#include <X11/cursorfont.h>
@@ -38,11 +45,6 @@
#endif
#include <string.h>
-#include "gdkprivate-x11.h"
-#include "gdkcursor.h"
-#include "gdkdisplay-x11.h"
-#include "gdkx.h"
-#include <gdk-pixbuf/gdk-pixbuf.h>
static guint theme_serial = 0;
diff --git a/gdk/x11/gdkdevice-core.c b/gdk/x11/gdkdevice-core.c
index a947fec73b..250ed3be87 100644
--- a/gdk/x11/gdkdevice-core.c
+++ b/gdk/x11/gdkdevice-core.c
@@ -19,8 +19,9 @@
#include "config.h"
-#include <gdk/gdkwindow.h>
#include "gdkdevice-core.h"
+
+#include "gdkwindow.h"
#include "gdkprivate-x11.h"
#include "gdkx.h"
diff --git a/gdk/x11/gdkdevice-xi.c b/gdk/x11/gdkdevice-xi.c
index b82ff18002..7b4f39e44f 100644
--- a/gdk/x11/gdkdevice-xi.c
+++ b/gdk/x11/gdkdevice-xi.c
@@ -19,9 +19,10 @@
#include "config.h"
-#include <gdk/gdkwindow.h>
-#include "gdkdeviceprivate.h"
#include "gdkdevice-xi.h"
+
+#include "gdkwindow.h"
+#include "gdkdeviceprivate.h"
#include "gdkprivate-x11.h"
#include "gdkintl.h"
#include "gdkx.h"
diff --git a/gdk/x11/gdkdevice-xi2.c b/gdk/x11/gdkdevice-xi2.c
index f64896ca5e..648923a743 100644
--- a/gdk/x11/gdkdevice-xi2.c
+++ b/gdk/x11/gdkdevice-xi2.c
@@ -19,11 +19,12 @@
#include "config.h"
-#include <X11/extensions/XInput2.h>
#include "gdkdevice-xi2.h"
+
#include "gdkintl.h"
#include "gdkx.h"
+#include <X11/extensions/XInput2.h>
struct _GdkDeviceXI2Private
{
diff --git a/gdk/x11/gdkdevicemanager-core.c b/gdk/x11/gdkdevicemanager-core.c
index f5af5a0a15..e355eec6d7 100644
--- a/gdk/x11/gdkdevicemanager-core.c
+++ b/gdk/x11/gdkdevicemanager-core.c
@@ -19,9 +19,10 @@
#include "config.h"
-#include <gdk/gdktypes.h>
-#include <gdk/gdkdevicemanager.h>
#include "gdkdevicemanager-core.h"
+
+#include "gdktypes.h"
+#include "gdkdevicemanager.h"
#include "gdkeventtranslator.h"
#include "gdkdevice-core.h"
#include "gdkkeysyms.h"
diff --git a/gdk/x11/gdkdevicemanager-x11.c b/gdk/x11/gdkdevicemanager-x11.c
index e1cefaa045..a6bb50b7c3 100644
--- a/gdk/x11/gdkdevicemanager-x11.c
+++ b/gdk/x11/gdkdevicemanager-x11.c
@@ -18,15 +18,15 @@
*/
#include "config.h"
-#include "gdkx.h"
-#include "gdkdevicemanager-core.h"
+#include "gdkdevicemanager-core.h"
#ifdef XINPUT_XFREE
#include "gdkdevicemanager-xi.h"
#ifdef XINPUT_2
#include "gdkdevicemanager-xi2.h"
#endif
#endif
+#include "gdkx.h"
GdkDeviceManager *
_gdk_device_manager_new (GdkDisplay *display)
diff --git a/gdk/x11/gdkdevicemanager-xi.c b/gdk/x11/gdkdevicemanager-xi.c
index 28419b0c14..52cea65497 100644
--- a/gdk/x11/gdkdevicemanager-xi.c
+++ b/gdk/x11/gdkdevicemanager-xi.c
@@ -20,6 +20,7 @@
#include "config.h"
#include "gdkdevicemanager-xi.h"
+
#include "gdkeventtranslator.h"
#include "gdkdevice-xi.h"
#include "gdkintl.h"
diff --git a/gdk/x11/gdkdevicemanager-xi2.c b/gdk/x11/gdkdevicemanager-xi2.c
index 00a0869e98..fd4207419d 100644
--- a/gdk/x11/gdkdevicemanager-xi2.c
+++ b/gdk/x11/gdkdevicemanager-xi2.c
@@ -19,16 +19,17 @@
#include "config.h"
-#include <string.h>
-#include <gdk/gdkdeviceprivate.h>
-
#include "gdkdevicemanager-xi2.h"
+
+#include <gdk/gdkdeviceprivate.h>
#include "gdkeventtranslator.h"
#include "gdkdevice-xi2.h"
#include "gdkkeysyms.h"
#include "gdkprivate-x11.h"
#include "gdkx.h"
+#include <string.h>
+
#define HAS_FOCUS(toplevel) ((toplevel)->has_focus || (toplevel)->has_pointer_focus)
diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c
index a7213f2fe9..083cdf967e 100644
--- a/gdk/x11/gdkdisplay-x11.c
+++ b/gdk/x11/gdkdisplay-x11.c
@@ -24,17 +24,11 @@
#include "config.h"
-#include <glib/gprintf.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-#include <unistd.h>
+#include "gdkdisplay-x11.h"
-#include <glib.h>
#include "gdkx.h"
#include "gdkasync.h"
#include "gdkdisplay.h"
-#include "gdkdisplay-x11.h"
#include "gdkeventsource.h"
#include "gdkeventtranslator.h"
#include "gdkscreen.h"
@@ -44,6 +38,13 @@
#include "gdkdevicemanager.h"
#include "xsettings-client.h"
+#include <glib.h>
+#include <glib/gprintf.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#include <unistd.h>
+
#include <X11/Xatom.h>
#ifdef HAVE_XKB
diff --git a/gdk/x11/gdkdnd-x11.c b/gdk/x11/gdkdnd-x11.c
index 3a889b72e1..74e874b078 100644
--- a/gdk/x11/gdkdnd-x11.c
+++ b/gdk/x11/gdkdnd-x11.c
@@ -26,24 +26,25 @@
#include "config.h"
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-#include <X11/Xatom.h>
-#include <X11/extensions/shape.h>
-#include <X11/extensions/Xcomposite.h>
-
-#include <string.h>
+#include "gdkdnd.h"
-#include "gdk.h" /* For gdk_flush() */
+#include "gdkmain.h"
#include "gdkx.h"
#include "gdkasync.h"
-#include "gdkdnd.h"
#include "gdkproperty.h"
#include "gdkprivate-x11.h"
#include "gdkinternals.h"
#include "gdkscreen-x11.h"
#include "gdkdisplay-x11.h"
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+#include <X11/Xatom.h>
+#include <X11/extensions/shape.h>
+#include <X11/extensions/Xcomposite.h>
+
+#include <string.h>
+
typedef struct _GdkDragContextPrivateX11 GdkDragContextPrivateX11;
typedef enum {
diff --git a/gdk/x11/gdkdrawable-x11.c b/gdk/x11/gdkdrawable-x11.c
index 21107166ea..a35a54b40e 100644
--- a/gdk/x11/gdkdrawable-x11.c
+++ b/gdk/x11/gdkdrawable-x11.c
@@ -26,17 +26,17 @@
#include "config.h"
+#include "gdkdrawable-x11.h"
+
#include "gdkx.h"
+#include "gdkprivate-x11.h"
+#include "gdkscreen-x11.h"
+#include "gdkdisplay-x11.h"
#include <cairo-xlib.h>
#include <stdlib.h>
-#include <string.h> /* for memcpy() */
-
-#include "gdkprivate-x11.h"
-#include "gdkdrawable-x11.h"
-#include "gdkscreen-x11.h"
-#include "gdkdisplay-x11.h"
+#include <string.h>
static cairo_surface_t *gdk_x11_ref_cairo_surface (GdkDrawable *drawable);
diff --git a/gdk/x11/gdkeventsource.c b/gdk/x11/gdkeventsource.c
index 9521b9d20b..f3b850e417 100644
--- a/gdk/x11/gdkeventsource.c
+++ b/gdk/x11/gdkeventsource.c
@@ -20,6 +20,7 @@
#include "config.h"
#include "gdkeventsource.h"
+
#include "gdkinternals.h"
#include "gdkx.h"
diff --git a/gdk/x11/gdkgeometry-x11.c b/gdk/x11/gdkgeometry-x11.c
index 2ec2e08d48..a4b706273f 100644
--- a/gdk/x11/gdkgeometry-x11.c
+++ b/gdk/x11/gdkgeometry-x11.c
@@ -18,7 +18,8 @@
*/
#include "config.h"
-#include "gdk.h" /* For gdk_rectangle_intersect */
+
+#include "gdkrectangle.h"
#include "gdkprivate-x11.h"
#include "gdkx.h"
#include "gdkinternals.h"
diff --git a/gdk/x11/gdkglobals-x11.c b/gdk/x11/gdkglobals-x11.c
index de9bbccb5b..de616092f0 100644
--- a/gdk/x11/gdkglobals-x11.c
+++ b/gdk/x11/gdkglobals-x11.c
@@ -25,11 +25,12 @@
*/
#include "config.h"
-#include <stdio.h>
#include "gdktypes.h"
#include "gdkprivate-x11.h"
+#include <stdio.h>
+
gboolean _gdk_use_xshm = TRUE; /* used as a cmd line arg */
GdkAtom _gdk_selection_property;
diff --git a/gdk/x11/gdkim-x11.c b/gdk/x11/gdkim-x11.c
index 53c7aa6733..389e653ec0 100644
--- a/gdk/x11/gdkim-x11.c
+++ b/gdk/x11/gdkim-x11.c
@@ -26,15 +26,15 @@
#include "config.h"
-#include <locale.h>
-#include <stdlib.h>
-#include <string.h>
-
#include "gdkx.h"
-#include "gdk.h" /* For gdk_flush() */
+#include "gdkmain.h"
#include "gdkinternals.h"
#include "gdkdisplay-x11.h"
+#include <locale.h>
+#include <stdlib.h>
+#include <string.h>
+
/* If this variable is FALSE, it indicates that we should
* avoid trying to use multibyte conversion functions and
diff --git a/gdk/x11/gdkinput.c b/gdk/x11/gdkinput.c
index 9c353af392..559caaece4 100644
--- a/gdk/x11/gdkinput.c
+++ b/gdk/x11/gdkinput.c
@@ -26,12 +26,12 @@
#include "config.h"
-#include <stdlib.h>
-
#include "gdkscreen-x11.h"
#include "gdkdisplay-x11.h"
#include "gdkwindow.h"
+#include <stdlib.h>
+
/* Addition used for extension_events mask */
#define GDK_ALL_DEVICES_MASK (1<<30)
diff --git a/gdk/x11/gdkkeys-x11.c b/gdk/x11/gdkkeys-x11.c
index 831c69f1d4..7111c9bf5e 100644
--- a/gdk/x11/gdkkeys-x11.c
+++ b/gdk/x11/gdkkeys-x11.c
@@ -26,6 +26,12 @@
#include "config.h"
+#include "gdkx.h"
+#include "gdkprivate-x11.h"
+#include "gdkinternals.h"
+#include "gdkdisplay-x11.h"
+#include "gdkkeysyms.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -33,14 +39,6 @@
#include <limits.h>
#include <errno.h>
-#include "gdk.h"
-#include "gdkx.h"
-
-#include "gdkprivate-x11.h"
-#include "gdkinternals.h"
-#include "gdkdisplay-x11.h"
-#include "gdkkeysyms.h"
-
#ifdef HAVE_XKB
#include <X11/XKBlib.h>
diff --git a/gdk/x11/gdkmain-x11.c b/gdk/x11/gdkmain-x11.c
index d55f66def0..f9df29592f 100644
--- a/gdk/x11/gdkmain-x11.c
+++ b/gdk/x11/gdkmain-x11.c
@@ -26,6 +26,14 @@
#include "config.h"
+#include "gdkx.h"
+#include "gdkasync.h"
+#include "gdkdisplay-x11.h"
+#include "gdkinternals.h"
+#include "gdkprivate-x11.h"
+#include "gdkintl.h"
+#include "gdkdeviceprivate.h"
+
#include <glib/gprintf.h>
#include <stdlib.h>
#include <string.h>
@@ -41,16 +49,6 @@
#include <X11/XKBlib.h>
#endif
-#include "gdk.h"
-
-#include "gdkx.h"
-#include "gdkasync.h"
-#include "gdkdisplay-x11.h"
-#include "gdkinternals.h"
-#include "gdkprivate-x11.h"
-#include "gdkintl.h"
-
-#include <gdk/gdkdeviceprivate.h>
typedef struct _GdkPredicate GdkPredicate;
typedef struct _GdkGlobalErrorTrap GdkGlobalErrorTrap;
diff --git a/gdk/x11/gdkproperty-x11.c b/gdk/x11/gdkproperty-x11.c
index 55e114f225..4f8d51bea3 100644
--- a/gdk/x11/gdkproperty-x11.c
+++ b/gdk/x11/gdkproperty-x11.c
@@ -25,18 +25,20 @@
*/
#include "config.h"
-#include <X11/Xlib.h>
-#include <X11/Xatom.h>
-#include <string.h>
-#include "gdk.h" /* For gdk_error_trap_push/pop() */
-#include "gdkx.h"
#include "gdkproperty.h"
+
+#include "gdkmain.h"
+#include "gdkx.h"
#include "gdkprivate.h"
#include "gdkinternals.h"
#include "gdkdisplay-x11.h"
#include "gdkscreen-x11.h"
-#include "gdkselection.h" /* only from predefined atom */
+#include "gdkselection.h"
+
+#include <X11/Xlib.h>
+#include <X11/Xatom.h>
+#include <string.h>
static GPtrArray *virtual_atom_array;
diff --git a/gdk/x11/gdkscreen-x11.c b/gdk/x11/gdkscreen-x11.c
index cacb144b93..8fb9ffc333 100644
--- a/gdk/x11/gdkscreen-x11.c
+++ b/gdk/x11/gdkscreen-x11.c
@@ -23,16 +23,18 @@
#include "config.h"
-#include <stdlib.h>
-#include <string.h>
+#include "gdkscreen-x11.h"
-#include <glib.h>
#include "gdkscreen.h"
-#include "gdkscreen-x11.h"
#include "gdkdisplay.h"
#include "gdkdisplay-x11.h"
#include "gdkx.h"
+#include <glib.h>
+
+#include <stdlib.h>
+#include <string.h>
+
#include <X11/Xatom.h>
#ifdef HAVE_SOLARIS_XINERAMA
diff --git a/gdk/x11/gdkselection-x11.c b/gdk/x11/gdkselection-x11.c
index c9b71abeb7..6d9e03ac68 100644
--- a/gdk/x11/gdkselection-x11.c
+++ b/gdk/x11/gdkselection-x11.c
@@ -25,17 +25,19 @@
*/
#include "config.h"
-#include <X11/Xlib.h>
-#include <X11/Xatom.h>
-#include <string.h>
+
+#include "gdkselection.h"
#include "gdkx.h"
#include "gdkproperty.h"
-#include "gdkselection.h"
#include "gdkprivate.h"
#include "gdkprivate-x11.h"
#include "gdkdisplay-x11.h"
+#include <X11/Xlib.h>
+#include <X11/Xatom.h>
+#include <string.h>
+
typedef struct _OwnerInfo OwnerInfo;
diff --git a/gdk/x11/gdkspawn-x11.c b/gdk/x11/gdkspawn-x11.c
index bee6aa4bf1..7f97b4e4f0 100644
--- a/gdk/x11/gdkspawn-x11.c
+++ b/gdk/x11/gdkspawn-x11.c
@@ -20,13 +20,12 @@
*/
#include "config.h"
-#include <string.h>
-#include <stdlib.h>
#include "gdkspawn.h"
#include <glib.h>
-#include <gdk/gdk.h>
+#include <string.h>
+#include <stdlib.h>
typedef struct {
diff --git a/gdk/x11/gdktestutils-x11.c b/gdk/x11/gdktestutils-x11.c
index 1b782b9d74..d4d47fbad7 100644
--- a/gdk/x11/gdktestutils-x11.c
+++ b/gdk/x11/gdktestutils-x11.c
@@ -17,9 +17,13 @@
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
-#include <gdk/gdktestutils.h>
-#include <gdk/gdkkeysyms.h>
-#include <x11/gdkx.h>
+
+#include "config.h"
+
+#include "gdktestutils.h"
+
+#include "gdkkeysyms.h"
+#include "gdkx.h"
#include <X11/Xlib.h>
diff --git a/gdk/x11/gdkvisual-x11.c b/gdk/x11/gdkvisual-x11.c
index b3fef17731..59acba26b0 100644
--- a/gdk/x11/gdkvisual-x11.c
+++ b/gdk/x11/gdkvisual-x11.c
@@ -25,15 +25,17 @@
*/
#include "config.h"
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-#include "gdkx.h"
#include "gdkvisual.h"
+
+#include "gdkx.h"
#include "gdkprivate-x11.h"
#include "gdkscreen-x11.h"
#include "gdkinternals.h"
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+
struct _GdkVisualPrivate
{
Visual *xvisual;
diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
index 66494d6152..68c2b2fbb5 100644
--- a/gdk/x11/gdkwindow-x11.c
+++ b/gdk/x11/gdkwindow-x11.c
@@ -27,40 +27,38 @@
#include "config.h"
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-#include <X11/Xatom.h>
-
-#ifdef HAVE_XKB
-#include <X11/XKBlib.h>
-#endif
-
-#include <cairo-xlib.h>
-
-#include <netinet/in.h>
-#include <unistd.h>
+#include "gdkwindow-x11.h"
-#include "gdk.h"
#include "gdkx.h"
-
#include "gdkwindow.h"
#include "gdkwindowimpl.h"
#include "gdkasync.h"
#include "gdkdisplay-x11.h"
#include "gdkprivate-x11.h"
#include "gdkinternals.h"
-#include "MwmUtil.h"
-#include "gdkwindow-x11.h"
#include "gdkdeviceprivate.h"
#include "gdkeventsource.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
+#include <netinet/in.h>
+#include <unistd.h>
+
+#include <cairo-xlib.h>
+
+#include "MwmUtil.h"
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+#include <X11/Xatom.h>
#include <X11/extensions/shape.h>
+#ifdef HAVE_XKB
+#include <X11/XKBlib.h>
+#endif
+
#ifdef HAVE_XCOMPOSITE
#include <X11/extensions/Xcomposite.h>
#endif
diff --git a/gdk/x11/gdkxftdefaults.c b/gdk/x11/gdkxftdefaults.c
index c037ee0220..0cc9972581 100644
--- a/gdk/x11/gdkxftdefaults.c
+++ b/gdk/x11/gdkxftdefaults.c
@@ -38,6 +38,9 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
+
+#include "config.h"
+
#include <stdlib.h>
#include <string.h>
diff --git a/gdk/x11/gdkxid.c b/gdk/x11/gdkxid.c
index 637068c785..94649b9ae1 100644
--- a/gdk/x11/gdkxid.c
+++ b/gdk/x11/gdkxid.c
@@ -25,9 +25,11 @@
*/
#include "config.h"
+
#include "gdkx.h"
#include "gdkprivate-x11.h"
#include "gdkdisplay-x11.h"
+
#include <stdio.h>
static guint gdk_xid_hash (XID *xid);
diff --git a/gdk/x11/xsettings-client.c b/gdk/x11/xsettings-client.c
index 753e461052..67e3b6b020 100644
--- a/gdk/x11/xsettings-client.c
+++ b/gdk/x11/xsettings-client.c
@@ -20,7 +20,11 @@
*
* Author: Owen Taylor, Red Hat, Inc.
*/
+
#include "config.h"
+
+#include "xsettings-client.h"
+
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
@@ -29,8 +33,6 @@
#include <X11/Xlib.h>
#include <X11/Xmd.h> /* For CARD16 */
-#include "xsettings-client.h"
-
struct _XSettingsClient
{
Display *display;
diff --git a/gdk/x11/xsettings-common.c b/gdk/x11/xsettings-common.c
index 1831324fa7..cc3a8d0306 100644
--- a/gdk/x11/xsettings-common.c
+++ b/gdk/x11/xsettings-common.c
@@ -20,15 +20,17 @@
*
* Author: Owen Taylor, Red Hat, Inc.
*/
+
#include "config.h"
+
+#include "xsettings-common.h"
+
#include "string.h"
#include "stdlib.h"
#include <X11/Xlib.h>
#include <X11/Xmd.h> /* For CARD32 */
-#include "xsettings-common.h"
-
XSettingsSetting *
xsettings_setting_copy (XSettingsSetting *setting)
{