aboutsummaryrefslogtreecommitdiffstats
path: root/calmwm.c
diff options
context:
space:
mode:
authorokan2013-06-17 14:08:51 +0000
committerokan2013-06-17 14:08:51 +0000
commit99bf11e128ef433ba54ef1899d937d2f99f9069b (patch)
treeb0c6a677bea1fd2d30b23ebee21f01a22cecd7dc /calmwm.c
parente78c9a30305d2ace976050b5abadd6c314f8b001 (diff)
downloadcwm-99bf11e128ef433ba54ef1899d937d2f99f9069b.tar.gz
now that we have conf_screen, which configures individual screens
*after* config parsing, we no longer need to split up display/screen initialization, so collapse.
Diffstat (limited to 'calmwm.c')
-rw-r--r--calmwm.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/calmwm.c b/calmwm.c
index 6be90ea..e001f63 100644
--- a/calmwm.c
+++ b/calmwm.c
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $OpenBSD: calmwm.c,v 1.76 2013/05/22 16:54:09 okan Exp $
+ * $OpenBSD: calmwm.c,v 1.77 2013/06/17 14:08:51 okan Exp $
*/
#include <sys/param.h>
@@ -52,11 +52,10 @@ struct conf Conf;
char *homedir;
static void sigchld_cb(int);
-static void dpy_init(const char *);
static int x_errorhandler(Display *, XErrorEvent *);
-static int x_wmerrorhandler(Display *, XErrorEvent *);
-static void x_setup(void);
+static void x_init(const char *);
static void x_teardown(void);
+static int x_wmerrorhandler(Display *, XErrorEvent *);
int
main(int argc, char **argv)
@@ -109,15 +108,13 @@ main(int argc, char **argv)
conf_path = NULL;
}
- dpy_init(display_name);
conf_init(&Conf);
if (conf_path && (parse_config(conf_path, &Conf) == -1))
warnx("config file %s has errors, not loading", conf_path);
free(conf_path);
- xu_getatoms();
- x_setup();
+ x_init(display_name);
xev_loop();
x_teardown();
@@ -125,7 +122,7 @@ main(int argc, char **argv)
}
static void
-dpy_init(const char *dpyname)
+x_init(const char *dpyname)
{
int i;
@@ -139,12 +136,8 @@ dpy_init(const char *dpyname)
XSetErrorHandler(x_errorhandler);
HasRandr = XRRQueryExtension(X_Dpy, &Randr_ev, &i);
-}
-static void
-x_setup(void)
-{
- int i;
+ xu_getatoms();
Cursor_default = XCreateFontCursor(X_Dpy, XC_X_cursor);
Cursor_move = XCreateFontCursor(X_Dpy, XC_fleur);