Browse Source

Clean up header includes

Every .c file has to include the corresponding .h file first to make sure the
headers are self-contained. Additionally, this moves some unneeded includes
around.

Signed-off-by: Uli Schlachter <psychon@znc.in>
Uli Schlachter 5 years ago
parent
commit
d2b1e92f9e
56 changed files with 180 additions and 210 deletions
  1. 18
    17
      awesome.c
  2. 2
    2
      banning.c
  3. 0
    2
      banning.h
  4. 2
    3
      color.c
  5. 2
    3
      common/buffer.c
  6. 0
    1
      common/luaclass.c
  7. 3
    0
      common/luaclass.h
  8. 1
    0
      common/lualib.c
  9. 1
    2
      common/lualib.h
  10. 0
    1
      common/signal.h
  11. 2
    2
      common/util.c
  12. 4
    4
      common/version.c
  13. 0
    1
      common/xembed.c
  14. 0
    1
      common/xembed.h
  15. 2
    4
      common/xutil.c
  16. 1
    5
      common/xutil.h
  17. 1
    1
      dbus.c
  18. 3
    6
      draw.c
  19. 8
    8
      event.c
  20. 8
    1
      event.h
  21. 5
    9
      ewmh.c
  22. 3
    1
      ewmh.h
  23. 0
    2
      globalconf.h
  24. 1
    4
      keygrabber.c
  25. 2
    0
      keygrabber.h
  26. 3
    3
      keyresolv.c
  27. 1
    0
      keyresolv.h
  28. 17
    19
      luaa.c
  29. 3
    4
      mouse.c
  30. 5
    6
      mousegrabber.c
  31. 0
    3
      objects/button.c
  32. 7
    2
      objects/button.h
  33. 12
    10
      objects/client.c
  34. 0
    6
      objects/client.h
  35. 2
    0
      objects/drawable.c
  36. 2
    1
      objects/drawable.h
  37. 4
    5
      objects/drawin.c
  38. 0
    2
      objects/drawin.h
  39. 4
    6
      objects/key.c
  40. 5
    8
      objects/screen.c
  41. 2
    0
      objects/screen.h
  42. 1
    0
      objects/tag.c
  43. 2
    2
      objects/timer.c
  44. 3
    6
      objects/window.c
  45. 3
    2
      objects/window.h
  46. 4
    6
      property.c
  47. 1
    1
      property.h
  48. 7
    9
      root.c
  49. 5
    4
      selection.c
  50. 2
    8
      spawn.c
  51. 3
    1
      spawn.h
  52. 1
    1
      stack.c
  53. 1
    1
      stack.h
  54. 6
    8
      systray.c
  55. 4
    5
      xwindow.c
  56. 1
    1
      xwindow.h

+ 18
- 17
awesome.c View File

@@ -19,6 +19,23 @@
19 19
  *
20 20
  */
21 21
 
22
+#include "awesome.h"
23
+
24
+#include "banning.h"
25
+#include "common/atoms.h"
26
+#include "common/backtrace.h"
27
+#include "common/version.h"
28
+#include "common/xutil.h"
29
+#include "dbus.h"
30
+#include "event.h"
31
+#include "ewmh.h"
32
+#include "globalconf.h"
33
+#include "objects/client.h"
34
+#include "objects/screen.h"
35
+#include "spawn.h"
36
+#include "systray.h"
37
+#include "xwindow.h"
38
+
22 39
 #include <getopt.h>
23 40
 
24 41
 #include <locale.h>
@@ -29,6 +46,7 @@
29 46
 
30 47
 #include <xcb/bigreq.h>
31 48
 #include <xcb/randr.h>
49
+#include <xcb/xcb_aux.h>
32 50
 #include <xcb/xcb_event.h>
33 51
 #include <xcb/xinerama.h>
34 52
 #include <xcb/xtest.h>
@@ -36,23 +54,6 @@
36 54
 
37 55
 #include <glib-unix.h>
38 56
 
39
-#include "awesome.h"
40
-#include "spawn.h"
41
-#include "objects/client.h"
42
-#include "objects/screen.h"
43
-#include "xwindow.h"
44
-#include "ewmh.h"
45
-#include "dbus.h"
46
-#include "systray.h"
47
-#include "event.h"
48
-#include "property.h"
49
-#include "luaa.h"
50
-#include "common/version.h"
51
-#include "common/atoms.h"
52
-#include "common/xcursor.h"
53
-#include "common/xutil.h"
54
-#include "common/backtrace.h"
55
-
56 57
 awesome_t globalconf;
57 58
 
58 59
 /** argv used to run awesome */

+ 2
- 2
banning.c View File

@@ -20,8 +20,8 @@
20 20
  */
21 21
 
22 22
 #include "banning.h"
23
-#include "objects/screen.h"
24
-#include "objects/tag.h"
23
+#include "globalconf.h"
24
+#include "objects/client.h"
25 25
 
26 26
 /** Reban windows following current selected tags.
27 27
  * \param screen The screen to arrange.

+ 0
- 2
banning.h View File

@@ -22,8 +22,6 @@
22 22
 #ifndef AWESOME_BANNING_H
23 23
 #define AWESOME_BANNING_H
24 24
 
25
-#include "globalconf.h"
26
-
27 25
 void banning_need_update(void);
28 26
 void banning_refresh(void);
29 27
 

+ 2
- 3
color.c View File

@@ -20,11 +20,10 @@
20 20
  *
21 21
  */
22 22
 
23
-#include <ctype.h>
24
-
25 23
 #include "color.h"
26 24
 #include "globalconf.h"
27
-#include "common/xutil.h"
25
+
26
+#include <ctype.h>
28 27
 
29 28
 /* 0xFFFF / 0xFF == 0x101 (257) */
30 29
 #define RGB_8TO16(i) (((i) & 0xff)   * 0x101)

+ 2
- 3
common/buffer.c View File

@@ -27,12 +27,11 @@
27 27
  *  POSSIBILITY OF SUCH DAMAGE.
28 28
  */
29 29
 
30
-#include <assert.h>
30
+#include "common/buffer.h"
31
+
31 32
 #include <sysexits.h>
32 33
 #include <stdio.h>
33 34
 
34
-#include "common/buffer.h"
35
-
36 35
 char buffer_slop[1];
37 36
 
38 37
 void

+ 0
- 1
common/luaclass.c View File

@@ -21,7 +21,6 @@
21 21
 
22 22
 #include "common/luaclass.h"
23 23
 #include "common/luaobject.h"
24
-#include "luaa.h"
25 24
 
26 25
 struct lua_class_property
27 26
 {

+ 3
- 0
common/luaclass.h View File

@@ -24,6 +24,9 @@
24 24
 
25 25
 #include "common/signal.h"
26 26
 
27
+#include <lua.h>
28
+#include <lauxlib.h>
29
+
27 30
 typedef struct lua_class_property lua_class_property_t;
28 31
 
29 32
 ARRAY_TYPE(lua_class_property_t, lua_class_property)

+ 1
- 0
common/lualib.c View File

@@ -17,6 +17,7 @@
17 17
  *
18 18
  */
19 19
 
20
+#include "common/lualib.h"
20 21
 #include "luaa.h"
21 22
 
22 23
 void luaA_checkfunction(lua_State *L, int idx)

+ 1
- 2
common/lualib.h View File

@@ -22,10 +22,9 @@
22 22
 #ifndef AWESOME_COMMON_LUALIB
23 23
 #define AWESOME_COMMON_LUALIB
24 24
 
25
-#include <lauxlib.h>
25
+#include <lua.h>
26 26
 
27 27
 #include "common/util.h"
28
-#include "common/luaclass.h"
29 28
 
30 29
 /** Lua function to call on dofuction() error */
31 30
 lua_CFunction lualib_dofunction_on_error;

+ 0
- 1
common/signal.h View File

@@ -22,7 +22,6 @@
22 22
 #ifndef AWESOME_COMMON_SIGNAL
23 23
 #define AWESOME_COMMON_SIGNAL
24 24
 
25
-#include "common/lualib.h"
26 25
 #include "common/array.h"
27 26
 
28 27
 DO_ARRAY(const void *, cptr, DO_NOTHING)

+ 2
- 2
common/util.c View File

@@ -20,6 +20,8 @@
20 20
  *
21 21
  */
22 22
 
23
+#include "common/util.h"
24
+
23 25
 #include <stdarg.h>
24 26
 #include <sys/wait.h>
25 27
 #include <unistd.h>
@@ -27,8 +29,6 @@
27 29
 #include <fcntl.h>
28 30
 #include <errno.h>
29 31
 
30
-#include "common/util.h"
31
-
32 32
 /** Print error and exit with EXIT_FAILURE code.
33 33
  */
34 34
 void

+ 4
- 4
common/version.c View File

@@ -19,16 +19,16 @@
19 19
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 20
  */
21 21
 
22
+#include "config.h"
23
+#include "common/version.h"
24
+#include "awesome-version-internal.h"
25
+
22 26
 #include <stdlib.h>
23 27
 #include <stdio.h>
24 28
 
25 29
 #include <lualib.h>
26 30
 #include <lauxlib.h>
27 31
 
28
-#include "config.h"
29
-#include "common/version.h"
30
-#include "awesome-version-internal.h"
31
-
32 32
 /** \brief Print version message and quit program.
33 33
  * \param executable program name
34 34
  */

+ 0
- 1
common/xembed.c View File

@@ -21,7 +21,6 @@
21 21
  */
22 22
 
23 23
 #include "common/xembed.h"
24
-#include "common/xutil.h"
25 24
 #include "common/util.h"
26 25
 #include "common/atoms.h"
27 26
 

+ 0
- 1
common/xembed.h View File

@@ -28,7 +28,6 @@
28 28
 #include <stdbool.h>
29 29
 
30 30
 #include "common/array.h"
31
-#include "common/util.h"
32 31
 
33 32
 /** XEMBED information for a window.
34 33
  */

+ 2
- 4
common/xutil.c View File

@@ -19,16 +19,14 @@
19 19
  *
20 20
  */
21 21
 
22
+#include "common/xutil.h"
23
+
22 24
 /* XCB doesn't provide keysyms definition */
23 25
 #include <X11/keysym.h>
24 26
 
25
-#include "common/util.h"
26
-
27 27
 #include <xcb/xcb.h>
28 28
 #include <xcb/xcb_icccm.h>
29 29
 
30
-#include "common/xutil.h"
31
-
32 30
 /** Get the lock masks (shiftlock, numlock, capslock, modeswitch).
33 31
  * \param connection The X connection.
34 32
  * \param cookie The cookie of the request.

+ 1
- 5
common/xutil.h View File

@@ -24,13 +24,9 @@
24 24
 
25 25
 #include <xcb/xcb.h>
26 26
 #include <xcb/xcb_keysyms.h>
27
-#include <xcb/xcb_aux.h>
28
-#include <xcb/xcb_event.h>
29
-#include <xcb/xcb_atom.h>
30
-#include <xcb/xproto.h>
31 27
 
32
-#include "common/array.h"
33 28
 #include "common/atoms.h"
29
+#include "common/util.h"
34 30
 
35 31
 static inline char *
36 32
 xutil_get_text_property_from_reply(xcb_get_property_reply_t *reply)

+ 1
- 1
dbus.c View File

@@ -20,8 +20,8 @@
20 20
  */
21 21
 
22 22
 #include "config.h"
23
-
24 23
 #include "dbus.h"
24
+
25 25
 #include <glib.h>
26 26
 
27 27
 #ifdef WITH_DBUS

+ 3
- 6
draw.c View File

@@ -19,9 +19,8 @@
19 19
  *
20 20
  */
21 21
 
22
-#include <cairo-xcb.h>
23
-
24 22
 #include "config.h"
23
+#include "draw.h"
25 24
 
26 25
 #include <langinfo.h>
27 26
 #include <iconv.h>
@@ -30,10 +29,8 @@
30 29
 #include <math.h>
31 30
 
32 31
 #include <gdk-pixbuf/gdk-pixbuf.h>
33
-
34
-#include "globalconf.h"
35
-#include "objects/screen.h"
36
-#include "common/xutil.h"
32
+#include <cairo-xcb.h>
33
+#include <lauxlib.h>
37 34
 
38 35
 /** Convert text from any charset to UTF-8 using iconv.
39 36
  * \param iso The ISO string to convert.

+ 8
- 8
event.c View File

@@ -19,15 +19,8 @@
19 19
  *
20 20
  */
21 21
 
22
-#include <xcb/xcb.h>
23
-#include <xcb/randr.h>
24
-#include <xcb/shape.h>
25
-#include <xcb/xcb_atom.h>
26
-#include <xcb/xcb_icccm.h>
27
-#include <xcb/xcb_event.h>
28
-
29
-#include "awesome.h"
30 22
 #include "event.h"
23
+#include "awesome.h"
31 24
 #include "property.h"
32 25
 #include "objects/tag.h"
33 26
 #include "objects/drawin.h"
@@ -43,6 +36,13 @@
43 36
 #include "common/atoms.h"
44 37
 #include "common/xutil.h"
45 38
 
39
+#include <xcb/xcb.h>
40
+#include <xcb/randr.h>
41
+#include <xcb/shape.h>
42
+#include <xcb/xcb_atom.h>
43
+#include <xcb/xcb_icccm.h>
44
+#include <xcb/xcb_event.h>
45
+
46 46
 #define DO_EVENT_HOOK_CALLBACK(type, xcbtype, xcbeventprefix, arraytype, match) \
47 47
     static void \
48 48
     event_##xcbtype##_callback(xcb_##xcbtype##_press_event_t *ev, \

+ 8
- 1
event.h View File

@@ -22,11 +22,18 @@
22 22
 #ifndef AWESOME_EVENT_H
23 23
 #define AWESOME_EVENT_H
24 24
 
25
-#include "objects/client.h"
25
+#include "banning.h"
26
+#include "globalconf.h"
27
+#include "stack.h"
28
+
29
+#include <xcb/xcb.h>
26 30
 
27 31
 /* luaa.c */
28 32
 void luaA_emit_refresh(void);
29 33
 
34
+/* objects/client.c */
35
+void client_focus_refresh(void);
36
+
30 37
 static inline int
31 38
 awesome_refresh(void)
32 39
 {

+ 5
- 9
ewmh.c View File

@@ -19,21 +19,17 @@
19 19
  *
20 20
  */
21 21
 
22
+#include "ewmh.h"
23
+#include "objects/client.h"
24
+#include "objects/tag.h"
25
+#include "common/atoms.h"
26
+
22 27
 #include <sys/types.h>
23 28
 #include <unistd.h>
24 29
 
25 30
 #include <xcb/xcb.h>
26 31
 #include <xcb/xcb_atom.h>
27 32
 
28
-#include "ewmh.h"
29
-#include "objects/client.h"
30
-#include "objects/screen.h"
31
-#include "objects/tag.h"
32
-#include "luaa.h"
33
-#include "common/atoms.h"
34
-#include "common/buffer.h"
35
-#include "common/xutil.h"
36
-
37 33
 #define _NET_WM_STATE_REMOVE 0
38 34
 #define _NET_WM_STATE_ADD 1
39 35
 #define _NET_WM_STATE_TOGGLE 2

+ 3
- 1
ewmh.h View File

@@ -23,10 +23,12 @@
23 23
 #define AWESOME_EWMH_H
24 24
 
25 25
 #include <cairo.h>
26
+#include <xcb/xcb.h>
26 27
 
27
-#include "globalconf.h"
28 28
 #include "strut.h"
29 29
 
30
+typedef struct client_t client_t;
31
+
30 32
 void ewmh_init(void);
31 33
 void ewmh_update_net_numbers_of_desktop(void);
32 34
 void ewmh_update_net_current_desktop(void);

+ 0
- 2
globalconf.h View File

@@ -32,7 +32,6 @@
32 32
 #include <xcb/xcb_cursor.h>
33 33
 
34 34
 #include "objects/key.h"
35
-#include "color.h"
36 35
 #include "common/xembed.h"
37 36
 #include "common/buffer.h"
38 37
 
@@ -52,7 +51,6 @@ typedef struct drawable_t drawable_t;
52 51
 typedef struct drawin_t drawin_t;
53 52
 typedef struct a_screen screen_t;
54 53
 typedef struct button_t button_t;
55
-typedef struct widget_t widget_t;
56 54
 typedef struct client_t client_t;
57 55
 typedef struct tag tag_t;
58 56
 typedef struct xproperty xproperty_t;

+ 1
- 4
keygrabber.c View File

@@ -21,12 +21,9 @@
21 21
 
22 22
 #include <unistd.h>
23 23
 
24
-#include "globalconf.h"
25 24
 #include "keygrabber.h"
26
-#include "objects/key.h"
27
-#include "luaa.h"
25
+#include "globalconf.h"
28 26
 #include "keyresolv.h"
29
-#include "common/xutil.h"
30 27
 
31 28
 /** Grab the keyboard.
32 29
  * \return True if keyboard was grabbed.

+ 2
- 0
keygrabber.h View File

@@ -25,6 +25,8 @@
25 25
 #include <lua.h>
26 26
 #include <xcb/xcb.h>
27 27
 
28
+#include <stdbool.h>
29
+
28 30
 int luaA_keygrabber_stop(lua_State *);
29 31
 bool keygrabber_handlekpress(lua_State *, xcb_key_press_event_t *);
30 32
 

+ 3
- 3
keyresolv.c View File

@@ -20,13 +20,13 @@
20 20
  *
21 21
  */
22 22
 
23
+#include "keyresolv.h"
24
+#include "globalconf.h"
25
+
23 26
 /* XCB doesn't provide keysyms definition */
24 27
 #include <X11/keysym.h>
25 28
 #include <X11/XF86keysym.h>
26 29
 
27
-#include "globalconf.h"
28
-#include "keyresolv.h"
29
-
30 30
 /** XCB equivalent of XLookupString which translate the keycode given
31 31
  * by PressEvent to a KeySym and a string
32 32
  * \todo use XKB!

+ 1
- 0
keyresolv.h View File

@@ -23,6 +23,7 @@
23 23
 #define AWESOME_KEYRESOLV_H
24 24
 
25 25
 #include <xcb/xcb.h>
26
+#include <stdbool.h>
26 27
 
27 28
 xcb_keysym_t keyresolv_get_keysym(xcb_keycode_t, uint16_t);
28 29
 bool keyresolv_keysym_to_string(xcb_keysym_t, char *, ssize_t);

+ 17
- 19
luaa.c View File

@@ -21,33 +21,31 @@
21 21
 
22 22
 #define _GNU_SOURCE
23 23
 
24
-#include <lua.h>
25
-#include <lauxlib.h>
26
-#include <lualib.h>
27
-
28
-#include <basedir_fs.h>
29
-
30
-#include <xcb/xcb_atom.h>
31
-
24
+#include "luaa.h"
25
+#include "globalconf.h"
26
+#include "awesome-version-internal.h"
32 27
 #include "awesome.h"
28
+#include "common/backtrace.h"
33 29
 #include "config.h"
34
-#include "objects/timer.h"
35
-#include "awesome-version-internal.h"
36
-#include "ewmh.h"
37
-#include "luaa.h"
38
-#include "spawn.h"
39
-#include "objects/tag.h"
30
+#include "event.h"
40 31
 #include "objects/client.h"
41
-#include "objects/drawin.h"
42 32
 #include "objects/drawable.h"
33
+#include "objects/drawin.h"
43 34
 #include "objects/screen.h"
44
-#include "event.h"
35
+#include "objects/tag.h"
36
+#include "objects/timer.h"
45 37
 #include "property.h"
46 38
 #include "selection.h"
39
+#include "spawn.h"
47 40
 #include "systray.h"
48
-#include "common/xcursor.h"
49
-#include "common/buffer.h"
50
-#include "common/backtrace.h"
41
+
42
+#include <lua.h>
43
+#include <lauxlib.h>
44
+#include <lualib.h>
45
+
46
+#include <basedir_fs.h>
47
+
48
+#include <xcb/xcb_atom.h>
51 49
 
52 50
 #ifdef WITH_DBUS
53 51
 extern const struct luaL_Reg awesome_dbus_lib[];

+ 3
- 4
mouse.c View File

@@ -20,12 +20,11 @@
20 20
  */
21 21
 
22 22
 #include "mouse.h"
23
-#include "objects/screen.h"
24
-#include "objects/client.h"
23
+#include "common/util.h"
25 24
 #include "globalconf.h"
25
+#include "objects/client.h"
26 26
 #include "objects/drawin.h"
27
-#include "luaa.h"
28
-#include "common/xutil.h"
27
+#include "objects/screen.h"
29 28
 
30 29
 /** Get the pointer position.
31 30
  * \param window The window to get position on.

+ 5
- 6
mousegrabber.c View File

@@ -19,14 +19,13 @@
19 19
  *
20 20
  */
21 21
 
22
-#include <unistd.h>
23
-
24
-#include "globalconf.h"
25
-#include "mouse.h"
26 22
 #include "mousegrabber.h"
27
-#include "luaa.h"
28 23
 #include "common/xcursor.h"
29
-#include "common/xutil.h"
24
+#include "mouse.h"
25
+#include "globalconf.h"
26
+
27
+#include <unistd.h>
28
+#include <stdbool.h>
30 29
 
31 30
 /** Grab the mouse.
32 31
  * \param cursor The cursor to use while grabbing.

+ 0
- 3
objects/button.c View File

@@ -20,9 +20,6 @@
20 20
  */
21 21
 
22 22
 #include "button.h"
23
-#include "luaa.h"
24
-#include "objects/key.h"
25
-#include "common/luaobject.h"
26 23
 
27 24
 /** Create a new mouse button bindings.
28 25
  * \param L The Lua VM state.

+ 7
- 2
objects/button.h View File

@@ -23,16 +23,21 @@
23 23
 #define AWESOME_OBJECTS_BUTTON_H
24 24
 
25 25
 #include "globalconf.h"
26
+#include "common/luaclass.h"
27
+#include "common/luaobject.h"
28
+
29
+#include <stdint.h>
30
+#include <xcb/xcb.h>
26 31
 
27 32
 /** Mouse buttons bindings */
28
-struct button_t
33
+typedef struct button_t
29 34
 {
30 35
     LUA_OBJECT_HEADER
31 36
     /** Key modifiers */
32 37
     uint16_t modifiers;
33 38
     /** Mouse button number */
34 39
     xcb_button_t button;
35
-};
40
+} button_t;
36 41
 
37 42
 lua_class_t button_class;
38 43
 LUA_OBJECT_FUNCS(button_class, button_t, button)

+ 12
- 10
objects/client.c View File

@@ -19,20 +19,22 @@
19 19
  *
20 20
  */
21 21
 
22
-#include <xcb/xcb_atom.h>
23
-#include <xcb/shape.h>
24
-#include <cairo-xcb.h>
25
-
26
-#include "objects/tag.h"
27
-#include "objects/screen.h"
22
+#include "objects/client.h"
23
+#include "common/atoms.h"
24
+#include "common/xutil.h"
25
+#include "event.h"
28 26
 #include "ewmh.h"
29
-#include "systray.h"
27
+#include "objects/drawable.h"
28
+#include "objects/screen.h"
29
+#include "objects/tag.h"
30 30
 #include "property.h"
31 31
 #include "spawn.h"
32
-#include "luaa.h"
32
+#include "systray.h"
33 33
 #include "xwindow.h"
34
-#include "common/atoms.h"
35
-#include "common/xutil.h"
34
+
35
+#include <xcb/xcb_atom.h>
36
+#include <xcb/shape.h>
37
+#include <cairo-xcb.h>
36 38
 
37 39
 static area_t titlebar_get_area(client_t *c, client_titlebar_t bar);
38 40
 static drawable_t *titlebar_get_drawable(lua_State *L, client_t *c, int cl_idx, client_titlebar_t bar);

+ 0
- 6
objects/client.h View File

@@ -22,13 +22,8 @@
22 22
 #ifndef AWESOME_OBJECTS_CLIENT_H
23 23
 #define AWESOME_OBJECTS_CLIENT_H
24 24
 
25
-#include "mouse.h"
26 25
 #include "stack.h"
27
-#include "draw.h"
28
-#include "banning.h"
29 26
 #include "objects/window.h"
30
-#include "objects/drawable.h"
31
-#include "common/luaobject.h"
32 27
 
33 28
 #define CLIENT_SELECT_INPUT_EVENT_MASK (XCB_EVENT_MASK_STRUCTURE_NOTIFY \
34 29
                                         | XCB_EVENT_MASK_PROPERTY_CHANGE \
@@ -173,7 +168,6 @@ void client_set_icon(client_t *c, cairo_surface_t *s);
173 168
 void client_set_skip_taskbar(lua_State *, int, bool);
174 169
 void client_focus(client_t *);
175 170
 void client_focus_update(client_t *);
176
-void client_focus_refresh(void);
177 171
 bool client_hasproto(client_t *, xcb_atom_t);
178 172
 void client_ignore_enterleave_events(void);
179 173
 void client_restore_enterleave_events(void);

+ 2
- 0
objects/drawable.c View File

@@ -21,6 +21,8 @@
21 21
  */
22 22
 
23 23
 #include "drawable.h"
24
+#include "common/luaobject.h"
25
+#include "globalconf.h"
24 26
 
25 27
 #include <cairo-xcb.h>
26 28
 

+ 2
- 1
objects/drawable.h View File

@@ -24,7 +24,7 @@
24 24
 #define AWESOME_OBJECTS_DRAWABLE_H
25 25
 
26 26
 #include "common/luaclass.h"
27
-#include "globalconf.h"
27
+#include "draw.h"
28 28
 
29 29
 typedef void drawable_refresh_callback(void *);
30 30
 
@@ -45,6 +45,7 @@ struct drawable_t
45 45
     /** Data for refresh callback. */
46 46
     void *refresh_data;
47 47
 };
48
+typedef struct drawable_t drawable_t;
48 49
 
49 50
 drawable_t *drawable_allocator(lua_State *, drawable_refresh_callback *, void *);
50 51
 void drawable_set_geometry(drawable_t *, int, area_t);

+ 4
- 5
objects/drawin.c View File

@@ -21,14 +21,13 @@
21 21
  */
22 22
 
23 23
 #include "drawin.h"
24
+#include "common/atoms.h"
25
+#include "common/xcursor.h"
26
+#include "ewmh.h"
24 27
 #include "objects/client.h"
25 28
 #include "objects/screen.h"
26
-#include "xwindow.h"
27
-#include "luaa.h"
28
-#include "ewmh.h"
29 29
 #include "systray.h"
30
-#include "common/xcursor.h"
31
-#include "common/xutil.h"
30
+#include "xwindow.h"
32 31
 
33 32
 #include <cairo-xcb.h>
34 33
 #include <xcb/shape.h>

+ 0
- 2
objects/drawin.h View File

@@ -24,9 +24,7 @@
24 24
 #define AWESOME_OBJECTS_DRAWIN_H
25 25
 
26 26
 #include "objects/window.h"
27
-#include "common/luaobject.h"
28 27
 #include "objects/drawable.h"
29
-#include "draw.h"
30 28
 
31 29
 /** Drawin type */
32 30
 struct drawin_t

+ 4
- 6
objects/key.c View File

@@ -20,15 +20,13 @@
20 20
  *
21 21
  */
22 22
 
23
+#include "objects/key.h"
24
+#include "common/xutil.h"
25
+#include "keyresolv.h"
26
+
23 27
 /* XStringToKeysym() and XKeysymToString */
24 28
 #include <X11/Xlib.h>
25 29
 
26
-#include "globalconf.h"
27
-#include "luaa.h"
28
-#include "keyresolv.h"
29
-#include "common/xutil.h"
30
-#include "common/luaobject.h"
31
-
32 30
 static void
33 31
 luaA_keystore(lua_State *L, int ud, const char *str, ssize_t len)
34 32
 {

+ 5
- 8
objects/screen.c View File

@@ -19,20 +19,17 @@
19 19
  *
20 20
  */
21 21
 
22
+#include "objects/screen.h"
23
+#include "banning.h"
24
+#include "objects/client.h"
25
+#include "objects/drawin.h"
26
+
22 27
 #include <stdio.h>
23 28
 
24 29
 #include <xcb/xcb.h>
25 30
 #include <xcb/xinerama.h>
26 31
 #include <xcb/randr.h>
27 32
 
28
-#include "objects/screen.h"
29
-#include "objects/tag.h"
30
-#include "objects/client.h"
31
-#include "objects/drawin.h"
32
-#include "ewmh.h"
33
-#include "luaa.h"
34
-#include "common/xutil.h"
35
-
36 33
 struct screen_output_t
37 34
 {
38 35
     /** The XRandR names of the output */

+ 2
- 0
objects/screen.h View File

@@ -24,6 +24,8 @@
24 24
 
25 25
 #include "globalconf.h"
26 26
 #include "draw.h"
27
+#include "common/array.h"
28
+#include "common/luaclass.h"
27 29
 
28 30
 typedef struct screen_output_t screen_output_t;
29 31
 ARRAY_TYPE(screen_output_t, screen_output)

+ 1
- 0
objects/tag.c View File

@@ -20,6 +20,7 @@
20 20
  */
21 21
 
22 22
 #include "tag.h"
23
+#include "banning.h"
23 24
 #include "client.h"
24 25
 #include "ewmh.h"
25 26
 #include "luaa.h"

+ 2
- 2
objects/timer.c View File

@@ -19,10 +19,10 @@
19 19
  *
20 20
  */
21 21
 
22
-#include "globalconf.h"
23
-#include "luaa.h"
24 22
 #include "timer.h"
25 23
 #include "common/luaobject.h"
24
+#include "globalconf.h"
25
+#include "luaa.h"
26 26
 
27 27
 typedef struct
28 28
 {

+ 3
- 6
objects/window.c View File

@@ -19,14 +19,11 @@
19 19
  *
20 20
  */
21 21
 
22
-#include "luaa.h"
23
-#include "xwindow.h"
24
-#include "ewmh.h"
25
-#include "property.h"
26
-#include "objects/screen.h"
27 22
 #include "objects/window.h"
28 23
 #include "common/atoms.h"
29
-#include "common/luaobject.h"
24
+#include "ewmh.h"
25
+#include "property.h"
26
+#include "xwindow.h"
30 27
 
31 28
 LUA_CLASS_FUNCS(window, window_class)
32 29
 

+ 3
- 2
objects/window.h View File

@@ -22,9 +22,10 @@
22 22
 #ifndef AWESOME_OBJECTS_WINDOW_H
23 23
 #define AWESOME_OBJECTS_WINDOW_H
24 24
 
25
-#include "strut.h"
26
-#include "objects/button.h"
25
+#include "color.h"
27 26
 #include "common/luaclass.h"
27
+#include "objects/button.h"
28
+#include "strut.h"
28 29
 
29 30
 /** Windows type */
30 31
 typedef enum

+ 4
- 6
property.c View File

@@ -19,17 +19,15 @@
19 19
  *
20 20
  */
21 21
 
22
-#include <xcb/xcb_atom.h>
23
-
24 22
 #include "property.h"
23
+#include "common/atoms.h"
24
+#include "common/xutil.h"
25 25
 #include "ewmh.h"
26 26
 #include "objects/client.h"
27 27
 #include "objects/drawin.h"
28
-#include "objects/screen.h"
29 28
 #include "xwindow.h"
30
-#include "luaa.h"
31
-#include "common/atoms.h"
32
-#include "common/xutil.h"
29
+
30
+#include <xcb/xcb_atom.h>
33 31
 
34 32
 #define HANDLE_TEXT_PROPERTY(funcname, atom, setfunc) \
35 33
     xcb_get_property_cookie_t \

+ 1
- 1
property.h View File

@@ -22,7 +22,7 @@
22 22
 #ifndef AWESOME_PROPERTY_H
23 23
 #define AWESOME_PROPERTY_H
24 24
 
25
-#include "globalconf.h"
25
+#include "objects/client.h"
26 26
 
27 27
 #define PROPERTY(funcname) \
28 28
     xcb_get_property_cookie_t property_get_##funcname(client_t *c); \

+ 7
- 9
root.c View File

@@ -19,18 +19,16 @@
19 19
  *
20 20
  */
21 21
 
22
-#include <X11/keysym.h>
23
-#include <X11/XF86keysym.h>
24
-#include <xcb/xtest.h>
25
-#include <cairo-xcb.h>
26
-
27 22
 #include "globalconf.h"
23
+
24
+#include "common/atoms.h"
25
+#include "common/xcursor.h"
28 26
 #include "objects/button.h"
29
-#include "objects/drawin.h"
30
-#include "luaa.h"
31 27
 #include "xwindow.h"
32
-#include "common/xcursor.h"
33
-#include "common/xutil.h"
28
+
29
+#include <xcb/xtest.h>
30
+#include <xcb/xcb_aux.h>
31
+#include <cairo-xcb.h>
34 32
 
35 33
 static void
36 34
 root_set_wallpaper_pixmap(xcb_connection_t *c, xcb_pixmap_t p)

+ 5
- 4
selection.c View File

@@ -20,12 +20,13 @@
20 20
  *
21 21
  */
22 22
 
23
-#include <xcb/xcb_atom.h>
24
-
25 23
 #include "selection.h"
26
-#include "event.h"
24
+#include "globalconf.h"
27 25
 #include "common/atoms.h"
28
-#include "common/xutil.h"
26
+#include "event.h"
27
+
28
+#include <xcb/xcb_atom.h>
29
+#include <xcb/xcb_event.h>
29 30
 
30 31
 static xcb_window_t selection_window = XCB_NONE;
31 32
 

+ 2
- 8
spawn.c View File

@@ -19,17 +19,11 @@
19 19
  *
20 20
  */
21 21
 
22
-#include <unistd.h>
23
-#include <errno.h>
24
-#include <sys/types.h>
25
-#include <sys/wait.h>
22
+#include "spawn.h"
26 23
 
24
+#include <unistd.h>
27 25
 #include <glib.h>
28 26
 
29
-#include "spawn.h"
30
-#include "luaa.h"
31
-#include "event.h"
32
-
33 27
 /** 20 seconds timeout */
34 28
 #define AWESOME_SPAWN_TIMEOUT 20.0
35 29
 

+ 3
- 1
spawn.h View File

@@ -22,7 +22,9 @@
22 22
 #ifndef AWESOME_SPAWN_H
23 23
 #define AWESOME_SPAWN_H
24 24
 
25
-#include "globalconf.h"
25
+#include "objects/client.h"
26
+
27
+#include <lua.h>
26 28
 
27 29
 void spawn_init(void);
28 30
 void spawn_start_notify(client_t *, const char *);

+ 1
- 1
stack.c View File

@@ -19,8 +19,8 @@
19 19
  *
20 20
  */
21 21
 
22
-#include "ewmh.h"
23 22
 #include "stack.h"
23
+#include "ewmh.h"
24 24
 #include "objects/client.h"
25 25
 #include "objects/drawin.h"
26 26
 

+ 1
- 1
stack.h View File

@@ -22,7 +22,7 @@
22 22
 #ifndef AWESOME_STACK_H
23 23
 #define AWESOME_STACK_H
24 24
 
25
-#include "globalconf.h"
25
+typedef struct client_t client_t;
26 26
 
27 27
 void stack_client_remove(client_t *);
28 28
 void stack_client_push(client_t *);

+ 6
- 8
systray.c View File

@@ -19,17 +19,15 @@
19 19
  *
20 20
  */
21 21
 
22
-#include <xcb/xcb.h>
23
-#include <xcb/xcb_icccm.h>
24
-#include <xcb/xcb_atom.h>
25
-
26
-#include "luaa.h"
27 22
 #include "systray.h"
28
-#include "xwindow.h"
29
-#include "common/array.h"
30 23
 #include "common/atoms.h"
31
-#include "common/xutil.h"
32 24
 #include "objects/drawin.h"
25
+#include "xwindow.h"
26
+#include "globalconf.h"
27
+
28
+#include <xcb/xcb.h>
29
+#include <xcb/xcb_icccm.h>
30
+#include <xcb/xcb_atom.h>
33 31
 
34 32
 #define SYSTEM_TRAY_REQUEST_DOCK 0 /* Begin icon docking */
35 33
 

+ 4
- 5
xwindow.c View File

@@ -19,15 +19,14 @@
19 19
  *
20 20
  */
21 21
 
22
+#include "xwindow.h"
23
+#include "common/atoms.h"
24
+#include "objects/button.h"
25
+
22 26
 #include <xcb/xcb.h>
23
-#include <xcb/xcb_atom.h>
24 27
 #include <xcb/shape.h>
25 28
 #include <cairo-xcb.h>
26 29
 
27
-#include "xwindow.h"
28
-#include "objects/button.h"
29
-#include "common/atoms.h"
30
-
31 30
 /** Mask shorthands */
32 31
 #define BUTTONMASK     (XCB_EVENT_MASK_BUTTON_PRESS | XCB_EVENT_MASK_BUTTON_RELEASE)
33 32
 

+ 1
- 1
xwindow.h View File

@@ -23,7 +23,7 @@
23 23
 #define AWESOME_WINDOW_H
24 24
 
25 25
 #include "globalconf.h"
26
-#include "draw.h"
26
+#include "color.h"
27 27
 
28 28
 enum xcb_shape_sk_t;
29 29
 

Loading…
Cancel
Save