aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--calmwm.h10
-rw-r--r--group.c15
-rw-r--r--screen.c11
3 files changed, 18 insertions, 18 deletions
diff --git a/calmwm.h b/calmwm.h
index b030c52..6fe53ec 100644
--- a/calmwm.h
+++ b/calmwm.h
@@ -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.h,v 1.279 2014/09/17 18:41:44 okan Exp $
+ * $OpenBSD: calmwm.h,v 1.280 2014/09/23 13:45:48 okan Exp $
*/
#ifndef _CALMWM_H_
@@ -229,19 +229,19 @@ struct screen_ctx {
Window rootwin;
Window menuwin;
int cycling;
+ int hideall;
int snapdist;
struct geom view; /* viewable area */
struct geom work; /* workable area, gap-applied */
struct gap gap;
struct client_ctx_q clientq;
struct region_ctx_q regionq;
- XftColor xftcolor[CWM_COLOR_NITEMS];
- XftDraw *xftdraw;
- XftFont *xftfont;
#define CALMWM_NGROUPS 10
struct group_ctx_q groupq;
- int group_hideall;
struct group_ctx *group_active;
+ XftColor xftcolor[CWM_COLOR_NITEMS];
+ XftDraw *xftdraw;
+ XftFont *xftfont;
};
TAILQ_HEAD(screen_ctx_q, screen_ctx);
diff --git a/group.c b/group.c
index 0f80e3d..b697403 100644
--- a/group.c
+++ b/group.c
@@ -16,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $OpenBSD: group.c,v 1.104 2014/09/17 16:32:53 okan Exp $
+ * $OpenBSD: group.c,v 1.105 2014/09/23 13:45:48 okan Exp $
*/
#include <sys/param.h>
@@ -119,9 +119,6 @@ group_init(struct screen_ctx *sc)
struct group_ctx *gc;
int i;
- TAILQ_INIT(&sc->groupq);
- sc->group_hideall = 0;
-
for (i = 0; i < CALMWM_NGROUPS; i++) {
gc = xcalloc(1, sizeof(*gc));
gc->sc = sc;
@@ -131,12 +128,6 @@ group_init(struct screen_ctx *sc)
TAILQ_INSERT_TAIL(&sc->groupq, gc, entry);
}
- xu_ewmh_net_desktop_names(sc);
- xu_ewmh_net_wm_desktop_viewport(sc);
- xu_ewmh_net_wm_number_of_desktops(sc);
- xu_ewmh_net_showing_desktop(sc);
- xu_ewmh_net_virtual_roots(sc);
-
group_setactive(sc, 1);
}
@@ -315,12 +306,12 @@ group_alltoggle(struct screen_ctx *sc)
struct group_ctx *gc;
TAILQ_FOREACH(gc, &sc->groupq, entry) {
- if (sc->group_hideall)
+ if (sc->hideall)
group_show(gc);
else
group_hide(gc);
}
- sc->group_hideall = !sc->group_hideall;
+ sc->hideall = !sc->hideall;
}
void
diff --git a/screen.c b/screen.c
index 4486be3..9fc01d3 100644
--- a/screen.c
+++ b/screen.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: screen.c,v 1.67 2014/09/08 20:11:22 okan Exp $
+ * $OpenBSD: screen.c,v 1.68 2014/09/23 13:45:48 okan Exp $
*/
#include <sys/param.h>
@@ -42,9 +42,12 @@ screen_init(int which)
TAILQ_INIT(&sc->clientq);
TAILQ_INIT(&sc->regionq);
+ TAILQ_INIT(&sc->groupq);
sc->which = which;
sc->rootwin = RootWindow(X_Dpy, sc->which);
+ sc->cycling = 0;
+ sc->hideall = 0;
conf_screen(sc);
xu_ewmh_net_supported(sc);
@@ -53,6 +56,12 @@ screen_init(int which)
screen_update_geometry(sc);
group_init(sc);
+ xu_ewmh_net_desktop_names(sc);
+ xu_ewmh_net_wm_desktop_viewport(sc);
+ xu_ewmh_net_wm_number_of_desktops(sc);
+ xu_ewmh_net_showing_desktop(sc);
+ xu_ewmh_net_virtual_roots(sc);
+
rootattr.cursor = Conf.cursor[CF_NORMAL];
rootattr.event_mask = SubstructureRedirectMask|SubstructureNotifyMask|
PropertyChangeMask|EnterWindowMask|LeaveWindowMask|