diff --git a/Makefile.am b/Makefile.am index 86d84df7..2991288b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -129,14 +129,15 @@ awesome_SOURCES = \ common/swindow.c common/swindow.h \ widget.c widget.h \ ewmh.c ewmh.h \ - common/list.h structs.h + common/list.h structs.h \ + common/awclient.h awesome_SOURCES += $(LAYOUTS) awesome_SOURCES += $(WIDGETS) awesome_LDADD = $(XFT_LIBS) $(X_LIBS) $(CAIRO_LIBS) $(CONFUSE_LIBS) $(XRANDR_LIBS) $(XINERAMA_LIBS) bin_PROGRAMS += awesome-client awesome_client_SOURCES = \ - awesome-client.c awesome-client.h \ + awesome-client.c common/awclient.h \ common/awesome-version.c common/awesome-version.h \ common/awclient.c \ common/util.c common/util.h diff --git a/awesome-client.c b/awesome-client.c index 5f1e80e1..71cd7506 100644 --- a/awesome-client.c +++ b/awesome-client.c @@ -26,7 +26,7 @@ #include #include -#include "awesome-client.h" +#include "common/awclient.h" #include "common/awesome-version.h" #include "common/util.h" diff --git a/awesome.c b/awesome.c index 1438c6c6..de0a98eb 100644 --- a/awesome.c +++ b/awesome.c @@ -38,7 +38,7 @@ #include #include -#include "common/awesome-version.h" +#include "config.h" #include "awesome.h" #include "event.h" #include "layout.h" @@ -49,8 +49,9 @@ #include "client.h" #include "focus.h" #include "ewmh.h" -#include "awesome-client.h" +#include "common/awclient.h" #include "common/util.h" +#include "common/awesome-version.h" static int (*xerrorxlib) (Display *, XErrorEvent *); static Bool running = True; diff --git a/common/awclient.c b/common/awclient.c index 2c4fc964..af98bf7b 100644 --- a/common/awclient.c +++ b/common/awclient.c @@ -24,7 +24,7 @@ #include #include -#include "awesome-client.h" +#include "common/awclient.h" #include "common/util.h" #define CONTROL_UNIX_SOCKET_PATH ".awesome_ctl." diff --git a/awesome-client.h b/common/awclient.h similarity index 100% rename from awesome-client.h rename to common/awclient.h diff --git a/config.c b/config.c index dc5d3738..c0e0cf1c 100644 --- a/config.c +++ b/config.c @@ -25,6 +25,7 @@ #include +#include "config.h" #include "statusbar.h" #include "tag.h" #include "rules.h" @@ -34,7 +35,6 @@ #include "ewmh.h" #include "defconfig.h" #include "layouts/tile.h" -#include "common/util.h" #define AWESOME_CONFIG_FILE ".awesomerc" diff --git a/event.c b/event.c index d70b120c..dce9bffa 100644 --- a/event.c +++ b/event.c @@ -38,7 +38,6 @@ #include "rules.h" #include "layouts/tile.h" #include "layouts/floating.h" -#include "common/util.h" extern AwesomeConf globalconf; diff --git a/ewmh.c b/ewmh.c index 71d17e97..a1fece88 100644 --- a/ewmh.c +++ b/ewmh.c @@ -28,7 +28,6 @@ #include "screen.h" #include "client.h" #include "widget.h" -#include "common/util.h" extern AwesomeConf globalconf; diff --git a/ewmh.h b/ewmh.h index 0beda962..e7924f69 100644 --- a/ewmh.h +++ b/ewmh.h @@ -22,7 +22,7 @@ #ifndef AWESOME_EWMH_H #define AWESOME_EWMH_H -#include "config.h" +#include "structs.h" typedef struct { diff --git a/focus.c b/focus.c index 836221b6..ac0fed1f 100644 --- a/focus.c +++ b/focus.c @@ -19,7 +19,6 @@ * */ -#include "common/util.h" #include "tag.h" #include "focus.h" #include "client.h" diff --git a/layout.c b/layout.c index d3102184..8cdc0e3c 100644 --- a/layout.c +++ b/layout.c @@ -33,7 +33,6 @@ #include "layouts/max.h" #include "layouts/fibonacci.h" #include "layouts/floating.h" -#include "common/util.h" extern AwesomeConf globalconf; diff --git a/layouts/tile.c b/layouts/tile.c index 10b2c4e1..3d0a32f2 100644 --- a/layouts/tile.c +++ b/layouts/tile.c @@ -112,7 +112,7 @@ _tile(int screen, const Position position) unsigned int mw = 0, mh = 0; int n, i, masterwin = 0, otherwin = 0; int real_ncol = 1, win_by_col = 1, current_col = 0; - Area area, geometry; + Area area, geometry = { 0, 0, 0, 0, NULL }; Client *c; Tag **curtags = tags_get_current(screen); diff --git a/mouse.c b/mouse.c index 85ad2764..93a3574b 100644 --- a/mouse.c +++ b/mouse.c @@ -30,7 +30,6 @@ #include "client.h" #include "layouts/floating.h" #include "layouts/tile.h" -#include "common/util.h" #define MOUSEMASK (ButtonPressMask | ButtonReleaseMask | PointerMotionMask) diff --git a/rules.c b/rules.c index 85b63228..ab080f76 100644 --- a/rules.c +++ b/rules.c @@ -21,7 +21,6 @@ #include "rules.h" #include "xutil.h" -#include "common/util.h" extern AwesomeConf globalconf; diff --git a/screen.c b/screen.c index ad22c69b..5028493a 100644 --- a/screen.c +++ b/screen.c @@ -1,7 +1,7 @@ /* * screen.c - screen management * - * Copyright © 2007 Julien Danjou + * Copyright © 2007-2008 Julien Danjou * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -26,7 +26,6 @@ #include "focus.h" #include "client.h" #include "layouts/floating.h" -#include "common/util.h" extern AwesomeConf globalconf; diff --git a/screen.h b/screen.h index 6cee7bab..dfb2503b 100644 --- a/screen.h +++ b/screen.h @@ -22,7 +22,7 @@ #ifndef AWESOME_SCREEN_H #define AWESOME_SCREEN_H -#include "config.h" +#include "structs.h" Area get_screen_area(int, Statusbar *, Padding *); Area get_display_area(int, Statusbar *, Padding *); diff --git a/statusbar.c b/statusbar.c index efb0dd2d..809c64a7 100644 --- a/statusbar.c +++ b/statusbar.c @@ -27,7 +27,6 @@ #include "tag.h" #include "widget.h" #include "window.h" -#include "common/util.h" extern AwesomeConf globalconf; diff --git a/tag.c b/tag.c index bb1bc503..339f3580 100644 --- a/tag.c +++ b/tag.c @@ -28,7 +28,6 @@ #include "client.h" #include "ewmh.h" #include "widget.h" -#include "common/util.h" extern AwesomeConf globalconf; diff --git a/uicb.c b/uicb.c index 6dd208a7..a729d80d 100644 --- a/uicb.c +++ b/uicb.c @@ -29,7 +29,6 @@ #include "client.h" #include "screen.h" #include "layouts/tile.h" -#include "common/util.h" extern AwesomeConf globalconf; diff --git a/widget.c b/widget.c index 1c967499..68159c04 100644 --- a/widget.c +++ b/widget.c @@ -23,7 +23,6 @@ #include "widget.h" #include "statusbar.h" #include "event.h" -#include "common/util.h" extern AwesomeConf globalconf; diff --git a/window.c b/window.c index 2b3b416a..af290b69 100644 --- a/window.c +++ b/window.c @@ -24,7 +24,6 @@ #include "structs.h" #include "window.h" -#include "common/util.h" extern AwesomeConf globalconf; diff --git a/xutil.c b/xutil.c index ca2ac1cf..df74f12c 100644 --- a/xutil.c +++ b/xutil.c @@ -18,15 +18,14 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * */ + #include #include #include #include -#include "config.h" +#include "structs.h" #include "xutil.h" -#include "screen.h" -#include "common/util.h" extern AwesomeConf globalconf;