Implement fullscreen (_NET_WM_STATE_FULLSCREEN)
This commit is contained in:
@ -9,6 +9,7 @@
|
||||
*
|
||||
*/
|
||||
#include <xcb/xcb.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#ifndef _DATA_H
|
||||
#define _DATA_H
|
||||
@ -57,6 +58,8 @@ struct Workspace {
|
||||
int current_row;
|
||||
int current_col;
|
||||
|
||||
Client *fullscreen_client;
|
||||
|
||||
/* This is a two-dimensional dynamic array of Container-pointers. I’ve always wanted
|
||||
* to be a three-star programmer :) */
|
||||
Container ***table;
|
||||
@ -118,6 +121,14 @@ struct Client {
|
||||
char *name;
|
||||
int name_len;
|
||||
|
||||
/* fullscreen is pretty obvious */
|
||||
bool fullscreen;
|
||||
|
||||
/* After leaving fullscreen mode, a client needs to be reconfigured (configuration =
|
||||
setting X, Y, width and height). By setting the force_reconfigure flag, render_layout()
|
||||
will reconfigure the client. */
|
||||
bool force_reconfigure;
|
||||
|
||||
/* XCB contexts */
|
||||
xcb_window_t frame; /* Our window: The frame around the client */
|
||||
xcb_gcontext_t titlegc; /* The titlebar’s graphic context inside the frame */
|
||||
@ -147,6 +158,9 @@ struct Container {
|
||||
int width;
|
||||
int height;
|
||||
|
||||
/* Backpointer to the workspace this container is in */
|
||||
Workspace *workspace;
|
||||
|
||||
/* Ensure MODE_DEFAULT maps to 0 because we use calloc for initialization later */
|
||||
enum { MODE_DEFAULT = 0, MODE_STACK = 1 } mode;
|
||||
CIRCLEQ_HEAD(client_head, Client) clients;
|
||||
|
@ -19,5 +19,6 @@ int handle_map_notify_event(void *prophs, xcb_connection_t *conn, xcb_map_notify
|
||||
int handle_windowname_change(void *data, xcb_connection_t *conn, uint8_t state,
|
||||
xcb_window_t window, xcb_atom_t atom, xcb_get_property_reply_t *prop);
|
||||
int handle_expose_event(void *data, xcb_connection_t *conn, xcb_expose_event_t *event);
|
||||
int handle_client_message(void *data, xcb_connection_t *conn, xcb_client_message_event_t *event);
|
||||
|
||||
#endif
|
||||
|
@ -23,5 +23,6 @@ extern TAILQ_HEAD(bindings_head, Binding) bindings;
|
||||
extern xcb_event_handlers_t evenths;
|
||||
extern char *pattern;
|
||||
extern int num_screens;
|
||||
extern xcb_atom_t atoms[6];
|
||||
|
||||
#endif
|
||||
|
@ -11,6 +11,18 @@
|
||||
#ifndef _XCB_H
|
||||
#define _XCB_H
|
||||
|
||||
#define _NET_WM_STATE_REMOVE 0
|
||||
#define _NET_WM_STATE_ADD 1
|
||||
#define _NET_WM_STATE_TOGGLE 2
|
||||
|
||||
enum { _NET_SUPPORTED = 0,
|
||||
_NET_SUPPORTING_WM_CHECK = 1,
|
||||
_NET_WM_NAME = 2,
|
||||
_NET_WM_STATE_FULLSCREEN = 3,
|
||||
_NET_WM_STATE = 4,
|
||||
UTF8_STRING = 5
|
||||
};
|
||||
|
||||
uint32_t get_colorpixel(xcb_connection_t *conn, xcb_window_t window, char *hex);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user