diff options
author | Okan Demirmen <okan@cvs.openbsd.org> | 2012-10-31 19:30:20 +0000 |
---|---|---|
committer | Okan Demirmen <okan@cvs.openbsd.org> | 2012-10-31 19:30:20 +0000 |
commit | 17cb53f9b11452cfdeefa8e6cb8e2d749aaa22ad (patch) | |
tree | f1abb4670fd1f503cea2dd7e67ad4c1d2da9010b /app/cwm/conf.c | |
parent | 39ac1b1cfdfa103f5959bb2c021f5dbf9d0db26b (diff) |
replace 'reload' with 'restart', which merely re-exec's cwm using the
existing argv; same idea with respect to argv saving as Alexander
Polakov. reload support was half-complete and is getting in the way.
agreed to by many
Diffstat (limited to 'app/cwm/conf.c')
-rw-r--r-- | app/cwm/conf.c | 36 |
1 files changed, 4 insertions, 32 deletions
diff --git a/app/cwm/conf.c b/app/cwm/conf.c index efe905451..61dfe07a2 100644 --- a/app/cwm/conf.c +++ b/app/cwm/conf.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: conf.c,v 1.100 2012/10/29 19:46:03 okan Exp $ + * $OpenBSD: conf.c,v 1.101 2012/10/31 19:30:19 okan Exp $ */ #include <sys/param.h> @@ -81,36 +81,8 @@ conf_color(struct conf *c, struct screen_ctx *sc) { int i; - for (i = 0; i < CWM_COLOR_MAX; i++) { - xu_freecolor(sc, sc->color[i].pixel); + for (i = 0; i < CWM_COLOR_MAX; i++) sc->color[i].pixel = xu_getcolor(sc, c->color[i].name); - } -} - -void -conf_reload(struct conf *c) -{ - struct screen_ctx *sc; - struct client_ctx *cc; - - if (parse_config(c->conf_path, c) == -1) { - warnx("config file %s has errors, not reloading", c->conf_path); - return; - } - - TAILQ_FOREACH(sc, &Screenq, entry) { - conf_gap(c, sc); - conf_color(c, sc); - conf_font(c, sc); - menu_init(sc); - } - TAILQ_FOREACH(cc, &Clientq, entry) { - conf_client(cc); - /* XXX Does not take hmax/vmax into account. */ - if ((cc->flags & CLIENT_MAXFLAGS) == CLIENT_MAXIMIZED) - cc->bwidth = 0; - client_draw_border(cc); - } } static struct { @@ -148,7 +120,7 @@ static struct { { "CM-equal", "vmaximize" }, { "CMS-equal", "hmaximize" }, { "CMS-f", "freeze" }, - { "CMS-r", "reload" }, + { "CMS-r", "restart" }, { "CMS-q", "quit" }, { "M-h", "moveleft" }, { "M-j", "movedown" }, @@ -375,7 +347,7 @@ static struct { { "vmaximize", kbfunc_client_vmaximize, KBFLAG_NEEDCLIENT, {0} }, { "hmaximize", kbfunc_client_hmaximize, KBFLAG_NEEDCLIENT, {0} }, { "freeze", kbfunc_client_freeze, KBFLAG_NEEDCLIENT, {0} }, - { "reload", kbfunc_reload, 0, {0} }, + { "restart", kbfunc_restart, 0, {0} }, { "quit", kbfunc_quit_wm, 0, {0} }, { "exec", kbfunc_exec, 0, {.i = CWM_EXEC_PROGRAM} }, { "exec_wm", kbfunc_exec, 0, {.i = CWM_EXEC_WM} }, |