mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
Implement _NET_NUMBER_OF_DESKTOPS, currently this is statically 9 and
unchangable. the group code needs some cleaning up before this will be a bit less hackish. ok okan@
This commit is contained in:
parent
728d2a40dd
commit
aa88d5848e
9
calmwm.c
9
calmwm.c
@ -147,7 +147,7 @@ x_setupscreen(struct screen_ctx *sc, u_int which)
|
||||
XWindowAttributes winattr;
|
||||
XSetWindowAttributes rootattr;
|
||||
int fake;
|
||||
u_int nwins, i;
|
||||
u_int ndesks = CALMWM_NGROUPS, nwins, i;
|
||||
|
||||
Curscreen = sc;
|
||||
|
||||
@ -166,6 +166,13 @@ x_setupscreen(struct screen_ctx *sc, u_int which)
|
||||
/* Initialize menu window. */
|
||||
menu_init(sc);
|
||||
|
||||
/*
|
||||
* XXX this probably should be somewhere else, but since it's a
|
||||
* static value for now it does ok.
|
||||
*/
|
||||
XChangeProperty(X_Dpy, sc->rootwin, _NET_NUMBER_OF_DESKTOPS,
|
||||
XA_CARDINAL, 32, PropModeReplace, (unsigned char *)&ndesks, 1);
|
||||
|
||||
xu_setwmname(sc);
|
||||
|
||||
/* Deal with existing clients. */
|
||||
|
4
calmwm.h
4
calmwm.h
@ -159,6 +159,7 @@ TAILQ_HEAD(client_ctx_q, client_ctx);
|
||||
|
||||
extern const char *shortcut_to_name[];
|
||||
|
||||
#define CALMWM_NGROUPS 9
|
||||
struct group_ctx {
|
||||
TAILQ_ENTRY(group_ctx) entry;
|
||||
struct client_ctx_q clients;
|
||||
@ -528,7 +529,8 @@ extern struct conf Conf;
|
||||
#define _NET_WM_NAME cwm_atoms[9]
|
||||
#define _NET_ACTIVE_WINDOW cwm_atoms[10]
|
||||
#define _NET_CLIENT_LIST cwm_atoms[11]
|
||||
#define CWM_NO_ATOMS 12
|
||||
#define _NET_NUMBER_OF_DESKTOPS cwm_atoms[12]
|
||||
#define CWM_NO_ATOMS 13
|
||||
#define CWM_NETWM_START 7
|
||||
|
||||
extern Atom cwm_atoms[CWM_NO_ATOMS];
|
||||
|
2
group.c
2
group.c
@ -22,8 +22,6 @@
|
||||
#include "headers.h"
|
||||
#include "calmwm.h"
|
||||
|
||||
#define CALMWM_NGROUPS 9
|
||||
|
||||
static void group_add(struct group_ctx *, struct client_ctx *);
|
||||
static void group_remove(struct client_ctx *);
|
||||
static void group_hide(struct group_ctx *);
|
||||
|
Loading…
Reference in New Issue
Block a user