add workspace struct
This commit is contained in:
18
wm.h
18
wm.h
@ -36,6 +36,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include <sys/socket.h>
|
||||
#include <sys/un.h>
|
||||
|
||||
#include "util.h"
|
||||
|
||||
// TODO: when only 1 window on ws it is not focused
|
||||
// TODO: dont draw border on not normal windows, floating dialog window,
|
||||
// window type/name/... atom member variable on Client struct
|
||||
@ -55,7 +57,10 @@ if (c == NULL) \
|
||||
#define DEBUG_PRINT(fmt, ...) \
|
||||
do { if (DEBUG) fprintf(stderr, fmt, ##__VA_ARGS__); } while (0);
|
||||
|
||||
#define WM_WS_NAME_LEN 64
|
||||
|
||||
typedef struct Client Client;
|
||||
typedef struct Workspace Workspace;
|
||||
typedef struct Monitor Monitor;
|
||||
typedef struct Keybind Keybind;
|
||||
typedef struct Arg Arg;
|
||||
@ -72,9 +77,9 @@ struct Monitor {
|
||||
Display *display;
|
||||
XineramaScreenInfo info;
|
||||
Client *clients;
|
||||
int *wss;
|
||||
int selws;
|
||||
int wscount;
|
||||
Workspace *workspaces;
|
||||
size_t selws;
|
||||
size_t wscount;
|
||||
};
|
||||
|
||||
struct Client {
|
||||
@ -95,6 +100,13 @@ struct Client {
|
||||
// will propably need a tree.
|
||||
};
|
||||
|
||||
struct Workspace {
|
||||
TreeNode tree;
|
||||
size_t index;
|
||||
char name[WM_WS_NAME_LEN];
|
||||
Monitor *monitor;
|
||||
};
|
||||
|
||||
struct Arg {
|
||||
int i;
|
||||
unsigned int ui;
|
||||
|
Reference in New Issue
Block a user