diff --git a/awesome.c b/awesome.c index febd3ccc..8b417e20 100644 --- a/awesome.c +++ b/awesome.c @@ -45,7 +45,7 @@ #include "common/version.h" #include "common/atoms.h" #include "common/xcursor.h" -#include "config.h" +#include "common/xutil.h" awesome_t globalconf; diff --git a/client.c b/client.c index 54412525..0ad341c4 100644 --- a/client.c +++ b/client.c @@ -24,15 +24,14 @@ #include "cnode.h" #include "tag.h" -#include "window.h" #include "ewmh.h" #include "screen.h" #include "titlebar.h" #include "systray.h" #include "property.h" -#include "wibox.h" #include "spawn.h" #include "common/atoms.h" +#include "common/xutil.h" DO_LUA_TOSTRING(client_t, client, "client") diff --git a/client.h b/client.h index 58f33faf..d319e5b7 100644 --- a/client.h +++ b/client.h @@ -24,7 +24,6 @@ #include "mouse.h" #include "stack.h" -#include "common/list.h" #define CLIENT_SELECT_INPUT_EVENT_MASK (XCB_EVENT_MASK_STRUCTURE_NOTIFY \ | XCB_EVENT_MASK_PROPERTY_CHANGE \ diff --git a/cnode.h b/cnode.h index 5f8dbcb7..044d3bc7 100644 --- a/cnode.h +++ b/cnode.h @@ -23,6 +23,7 @@ #define AWESOME_CNODE_H #include "client.h" +#include "common/list.h" struct client_node { diff --git a/common/xutil.h b/common/xutil.h index 2c6312bd..494383bb 100644 --- a/common/xutil.h +++ b/common/xutil.h @@ -27,9 +27,6 @@ #include #include -/* XCB doesn't provide keysyms definition */ -#include - #include "array.h" bool xutil_text_prop_get(xcb_connection_t *, xcb_window_t, xcb_atom_t, char **, ssize_t *); diff --git a/dbus.c b/dbus.c index 56b4b4de..949cf429 100644 --- a/dbus.c +++ b/dbus.c @@ -19,7 +19,6 @@ * */ -#include "config.h" #include "dbus.h" #include "client.h" @@ -30,7 +29,6 @@ #include #include -#include "widget.h" #include "event.h" static DBusError err; diff --git a/draw.c b/draw.c index 3534eaef..9a650e58 100644 --- a/draw.c +++ b/draw.c @@ -32,6 +32,7 @@ #include "structs.h" #include "common/tokenize.h" +#include "common/xutil.h" /** Convert text from any charset to UTF-8 using iconv. * \param iso The ISO string to convert. diff --git a/event.c b/event.c index d80c10b5..a62c6ddc 100644 --- a/event.c +++ b/event.c @@ -40,6 +40,7 @@ #include "systray.h" #include "screen.h" #include "common/atoms.h" +#include "common/xutil.h" /** Handle mouse button events. * \param c The client on which the event happened or NULL. diff --git a/event.h b/event.h index 9c398843..62332576 100644 --- a/event.h +++ b/event.h @@ -22,8 +22,6 @@ #ifndef AWESOME_EVENT_H #define AWESOME_EVENT_H -#include - #include "wibox.h" #include "layout.h" #include "client.h" diff --git a/ewmh.c b/ewmh.c index b076d27e..797ef32e 100644 --- a/ewmh.c +++ b/ewmh.c @@ -34,6 +34,7 @@ #include "wibox.h" #include "common/atoms.h" #include "common/buffer.h" +#include "common/xutil.h" #define _NET_WM_STATE_REMOVE 0 #define _NET_WM_STATE_ADD 1 diff --git a/image.c b/image.c index b0078c7a..ea944a67 100644 --- a/image.c +++ b/image.c @@ -20,6 +20,7 @@ */ #include "structs.h" +#include "common/tokenize.h" DO_LUA_TOSTRING(image_t, image, "image"); diff --git a/key.c b/key.c index cabad317..6f488dfe 100644 --- a/key.c +++ b/key.c @@ -24,6 +24,7 @@ #include #include "structs.h" +#include "common/xutil.h" LUA_OBJECT_FUNCS(keyb_t, key, "key") diff --git a/key.h b/key.h index 711924a5..33df7b85 100644 --- a/key.h +++ b/key.h @@ -22,9 +22,7 @@ #ifndef AWESOME_KEYBINDING_H #define AWESOME_KEYBINDING_H -#include #include "luaa.h" -#include "common/luaobject.h" typedef struct keyb_t { diff --git a/keygrabber.c b/keygrabber.c index 039f17e7..35b9ae57 100644 --- a/keygrabber.c +++ b/keygrabber.c @@ -19,11 +19,15 @@ * */ +/* XCB doesn't provide keysyms definition */ +#include + #include #include "structs.h" #include "keygrabber.h" #include "key.h" +#include "common/xutil.h" /** XCB equivalent of XLookupString which translate the keycode given * by PressEvent to a KeySym and a string diff --git a/luaa.c b/luaa.c index 86e33e7c..90ddddbe 100644 --- a/luaa.c +++ b/luaa.c @@ -19,7 +19,7 @@ * */ -#include "common/util.h" +#define _GNU_SOURCE #include @@ -27,21 +27,17 @@ #include #include -#include - #include #include "awesome.h" #include "awesome-version-internal.h" #include "ewmh.h" -#include "config.h" #include "luaa.h" #include "spawn.h" #include "tag.h" #include "client.h" #include "screen.h" #include "event.h" -#include "mouse.h" #include "selection.h" #include "window.h" #include "common/xcursor.h" diff --git a/luaa.h b/luaa.h index 350c2c21..2c2ab6a9 100644 --- a/luaa.h +++ b/luaa.h @@ -29,11 +29,7 @@ #include -#include - #include "draw.h" -#include "common/util.h" -#include "common/luaobject.h" #define luaA_deprecate(L, repl) \ luaA_warn(L, "%s: This function is deprecated and will be removed, see %s", \ diff --git a/mouse.c b/mouse.c index 75c4e1cc..6e53ae92 100644 --- a/mouse.c +++ b/mouse.c @@ -21,11 +21,10 @@ #include -#include "common/tokenize.h" #include "screen.h" #include "tag.h" -#include "wibox.h" #include "common/xcursor.h" +#include "common/xutil.h" DO_LUA_TOSTRING(button_t, button, "button") LUA_OBJECT_FUNCS(button_t, button, "button") diff --git a/mousegrabber.c b/mousegrabber.c index 2c3855e5..4235e9e3 100644 --- a/mousegrabber.c +++ b/mousegrabber.c @@ -24,6 +24,7 @@ #include "mouse.h" #include "mousegrabber.h" #include "common/xcursor.h" +#include "common/xutil.h" /** Grab the mouse. * \param cursor The cursor to use while grabbing. diff --git a/property.c b/property.c index 535ab8f5..dd4e00b4 100644 --- a/property.c +++ b/property.c @@ -24,9 +24,9 @@ #include "screen.h" #include "property.h" #include "client.h" -#include "widget.h" #include "ewmh.h" #include "common/atoms.h" +#include "common/xutil.h" void property_update_wm_transient_for(client_t *c, xcb_get_property_reply_t *reply) diff --git a/root.c b/root.c index f7085866..0d7d408c 100644 --- a/root.c +++ b/root.c @@ -23,6 +23,8 @@ #include "mouse.h" #include "common/xcursor.h" +#include "common/tokenize.h" +#include "common/xutil.h" /** Send fake events. Usually the current focused client will get it. * \param L The Lua VM state. diff --git a/screen.c b/screen.c index b55f770d..a8b8468b 100644 --- a/screen.c +++ b/screen.c @@ -30,6 +30,7 @@ #include "client.h" #include "widget.h" #include "wibox.h" +#include "common/xutil.h" static inline area_t screen_xsitoarea(xcb_xinerama_screen_info_t si) diff --git a/screen.h b/screen.h index ebd7a3f2..42ecc5a4 100644 --- a/screen.h +++ b/screen.h @@ -22,7 +22,6 @@ #ifndef AWESOME_SCREEN_H #define AWESOME_SCREEN_H -#include "structs.h" #include "wibox.h" struct a_screen diff --git a/selection.c b/selection.c index 19f186d3..241035df 100644 --- a/selection.c +++ b/selection.c @@ -23,9 +23,9 @@ #include #include "selection.h" -#include "structs.h" #include "event.h" #include "common/atoms.h" +#include "common/xutil.h" static xcb_window_t selection_window = XCB_NONE; diff --git a/spawn.h b/spawn.h index e0ba36db..7318acf0 100644 --- a/spawn.h +++ b/spawn.h @@ -22,7 +22,6 @@ #ifndef AWESOME_SPAWN_H #define AWESOME_SPAWN_H -#include #include "structs.h" void spawn_init(void); diff --git a/stack.c b/stack.c index 2f55de7f..0110ba37 100644 --- a/stack.c +++ b/stack.c @@ -19,7 +19,6 @@ * */ -#include "stack.h" #include "cnode.h" #include "ewmh.h" diff --git a/structs.h b/structs.h index da0a7a4f..f9fd918e 100644 --- a/structs.h +++ b/structs.h @@ -26,15 +26,11 @@ #include #include -#include +#include #include "config.h" -#include "luaa.h" -#include "swindow.h" #include "key.h" -#include "common/xutil.h" #include "common/xembed.h" -#include "common/tokenize.h" typedef struct wibox_t wibox_t; typedef struct a_screen screen_t; diff --git a/swindow.h b/swindow.h index 91762004..a51969e4 100644 --- a/swindow.h +++ b/swindow.h @@ -23,7 +23,6 @@ #define AWESOME_SWINDOW_H #include "draw.h" -#include "common/util.h" /** A simple window. */ typedef struct simple_window_t diff --git a/systray.c b/systray.c index 8050fa42..74075607 100644 --- a/systray.c +++ b/systray.c @@ -28,6 +28,7 @@ #include "window.h" #include "widget.h" #include "common/atoms.h" +#include "common/xutil.h" #define SYSTEM_TRAY_REQUEST_DOCK 0 /* Begin icon docking */ diff --git a/tag.h b/tag.h index 32fc5390..5c4608a4 100644 --- a/tag.h +++ b/tag.h @@ -22,7 +22,6 @@ #ifndef AWESOME_TAG_H #define AWESOME_TAG_H -#include "structs.h" #include "client.h" /** Tag type */ diff --git a/wibox.c b/wibox.c index df5d6867..bd6e9835 100644 --- a/wibox.c +++ b/wibox.c @@ -25,8 +25,9 @@ #include "client.h" #include "ewmh.h" #include "screen.h" -#include "common/xcursor.h" #include "window.h" +#include "common/xcursor.h" +#include "common/xutil.h" DO_LUA_TOSTRING(wibox_t, wibox, "wibox") diff --git a/widget.c b/widget.c index d82f902b..23103042 100644 --- a/widget.c +++ b/widget.c @@ -30,6 +30,7 @@ #include "wibox.h" #include "client.h" #include "common/atoms.h" +#include "common/xutil.h" #include "widgetgen.h" diff --git a/widget.h b/widget.h index 2bda01fb..ba4c0f03 100644 --- a/widget.h +++ b/widget.h @@ -23,6 +23,7 @@ #define AWESOME_WIDGET_H #include "mouse.h" +#include "common/tokenize.h" typedef widget_t *(widget_constructor_t)(widget_t *); typedef void (widget_destructor_t)(widget_t *);