move Client struct definition to client.h

This commit is contained in:
Akos Horvath 2023-05-26 19:19:02 +02:00
parent 683354bbd6
commit 434e83d570
3 changed files with 24 additions and 21 deletions

View File

@ -19,8 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "client.h"
#include "wm.h"
#include <X11/X.h>
#include <X11/Xlib.h>
#include <stdio.h>
#include <string.h>
#include <limits.h>

View File

@ -20,7 +20,30 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef CLIENT_H
#define CLIENT_H
#include "wm.h"
#include <X11/X.h>
#include <X11/Xlib.h>
#include <stdbool.h>
typedef struct Wm Wm;
typedef struct Workspace Workspace;
typedef struct Monitor Monitor;
typedef struct Client Client;
struct Client {
int x;
int y;
int w;
int h;
Workspace *ws;
bool hidden;
Monitor *m;
Window window;
Client *prev;
Client *next;
char *name;
bool has_border;
bool is_floating;
};
XWindowChanges wm_client_to_xwchanges(Client c);
Client* wm_client_find(Wm* wm, Window w);

18
wm.h
View File

@ -88,24 +88,6 @@ struct Monitor {
size_t wscount;
};
struct Client {
int x;
int y;
int w;
int h;
Workspace *ws;
bool hidden;
Monitor *m;
Window window;
Client *prev;
Client *next;
char *name;
bool has_border;
bool is_floating;
// linked list is not sufficent for manual tiling.
// will propably need a tree.
};
struct Workspace {
TreeNode tree;
size_t index;