[client] Rename Client type to client_t
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
a73b07f5d3
commit
d1635db59f
|
@ -296,7 +296,7 @@ main(int argc, char **argv)
|
||||||
fd_set rd;
|
fd_set rd;
|
||||||
xcb_generic_event_t *ev;
|
xcb_generic_event_t *ev;
|
||||||
struct sockaddr_un *addr;
|
struct sockaddr_un *addr;
|
||||||
Client *c;
|
client_t *c;
|
||||||
bool confcheck = false;
|
bool confcheck = false;
|
||||||
static struct option long_options[] =
|
static struct option long_options[] =
|
||||||
{
|
{
|
||||||
|
|
94
client.c
94
client.c
|
@ -44,12 +44,12 @@ extern AwesomeConf globalconf;
|
||||||
/** Load windows properties, restoring client's tag
|
/** Load windows properties, restoring client's tag
|
||||||
* and floating state before awesome was restarted if any
|
* and floating state before awesome was restarted if any
|
||||||
* \todo this may bug if number of tags is != than before
|
* \todo this may bug if number of tags is != than before
|
||||||
* \param c Client ref
|
* \param c client ref
|
||||||
* \param screen Screen ID
|
* \param screen Screen ID
|
||||||
* \return true if client had property
|
* \return true if client had property
|
||||||
*/
|
*/
|
||||||
static bool
|
static bool
|
||||||
client_loadprops(Client * c, int screen)
|
client_loadprops(client_t * c, int screen)
|
||||||
{
|
{
|
||||||
int i, ntags = 0;
|
int i, ntags = 0;
|
||||||
Tag *tag;
|
Tag *tag;
|
||||||
|
@ -110,7 +110,7 @@ client_isprotodel(xcb_connection_t *c, xcb_window_t win)
|
||||||
* \return true or false
|
* \return true or false
|
||||||
*/
|
*/
|
||||||
static bool
|
static bool
|
||||||
client_isvisible_anyscreen(Client *c)
|
client_isvisible_anyscreen(client_t *c)
|
||||||
{
|
{
|
||||||
Tag *tag;
|
Tag *tag;
|
||||||
int screen;
|
int screen;
|
||||||
|
@ -136,7 +136,7 @@ client_isvisible_anyscreen(Client *c)
|
||||||
* \return true or false
|
* \return true or false
|
||||||
*/
|
*/
|
||||||
bool
|
bool
|
||||||
client_isvisible(Client *c, int screen)
|
client_isvisible(client_t *c, int screen)
|
||||||
{
|
{
|
||||||
Tag *tag;
|
Tag *tag;
|
||||||
|
|
||||||
|
@ -151,29 +151,29 @@ client_isvisible(Client *c, int screen)
|
||||||
return true;
|
return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
/** Get a Client by its window
|
/** Get a client by its window
|
||||||
* \param list Client list to look info
|
* \param list client_t list to look info
|
||||||
* \param w Client window to find
|
* \param w client_t window to find
|
||||||
* \return client
|
* \return client
|
||||||
*/
|
*/
|
||||||
Client *
|
client_t *
|
||||||
client_get_bywin(Client *list, xcb_window_t w)
|
client_get_bywin(client_t *list, xcb_window_t w)
|
||||||
{
|
{
|
||||||
Client *c;
|
client_t *c;
|
||||||
|
|
||||||
for(c = list; c && c->win != w; c = c->next);
|
for(c = list; c && c->win != w; c = c->next);
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Get a client by its name
|
/** Get a client by its name
|
||||||
* \param list Client list
|
* \param list client_t list
|
||||||
* \param name name to search
|
* \param name name to search
|
||||||
* \return first matching client
|
* \return first matching client
|
||||||
*/
|
*/
|
||||||
Client *
|
client_t *
|
||||||
client_get_byname(Client *list, char *name)
|
client_get_byname(client_t *list, char *name)
|
||||||
{
|
{
|
||||||
Client *c;
|
client_t *c;
|
||||||
|
|
||||||
for(c = list; c; c = c->next)
|
for(c = list; c; c = c->next)
|
||||||
if(strstr(c->name, name))
|
if(strstr(c->name, name))
|
||||||
|
@ -186,7 +186,7 @@ client_get_byname(Client *list, char *name)
|
||||||
* \param c the client
|
* \param c the client
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
client_updatetitle(Client *c)
|
client_updatetitle(client_t *c)
|
||||||
{
|
{
|
||||||
if(!xutil_gettextprop(globalconf.connection, c->win,
|
if(!xutil_gettextprop(globalconf.connection, c->win,
|
||||||
xutil_intern_atom(globalconf.connection, "_NET_WM_NAME"),
|
xutil_intern_atom(globalconf.connection, "_NET_WM_NAME"),
|
||||||
|
@ -199,7 +199,7 @@ client_updatetitle(Client *c)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
client_unfocus(Client *c)
|
client_unfocus(client_t *c)
|
||||||
{
|
{
|
||||||
if(globalconf.screens[c->screen].opacity_unfocused != -1)
|
if(globalconf.screens[c->screen].opacity_unfocused != -1)
|
||||||
window_settrans(c->win, globalconf.screens[c->screen].opacity_unfocused);
|
window_settrans(c->win, globalconf.screens[c->screen].opacity_unfocused);
|
||||||
|
@ -216,7 +216,7 @@ client_unfocus(Client *c)
|
||||||
* \param c the client
|
* \param c the client
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
client_ban(Client *c)
|
client_ban(client_t *c)
|
||||||
{
|
{
|
||||||
if(globalconf.focus->client == c)
|
if(globalconf.focus->client == c)
|
||||||
client_unfocus(c);
|
client_unfocus(c);
|
||||||
|
@ -233,7 +233,7 @@ client_ban(Client *c)
|
||||||
* \return true if a window (even root) has received focus, false otherwise
|
* \return true if a window (even root) has received focus, false otherwise
|
||||||
*/
|
*/
|
||||||
bool
|
bool
|
||||||
client_focus(Client *c, int screen, bool raise)
|
client_focus(client_t *c, int screen, bool raise)
|
||||||
{
|
{
|
||||||
int phys_screen;
|
int phys_screen;
|
||||||
|
|
||||||
|
@ -289,10 +289,10 @@ client_focus(Client *c, int screen, bool raise)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
client_stack(Client *c)
|
client_stack(client_t *c)
|
||||||
{
|
{
|
||||||
uint32_t config_win_vals[2];
|
uint32_t config_win_vals[2];
|
||||||
Client *client;
|
client_t *client;
|
||||||
layer_t layer;
|
layer_t layer;
|
||||||
|
|
||||||
config_win_vals[0] = XCB_NONE;
|
config_win_vals[0] = XCB_NONE;
|
||||||
|
@ -345,7 +345,7 @@ client_stack(Client *c)
|
||||||
void
|
void
|
||||||
client_manage(xcb_window_t w, xcb_get_geometry_reply_t *wgeom, int screen)
|
client_manage(xcb_window_t w, xcb_get_geometry_reply_t *wgeom, int screen)
|
||||||
{
|
{
|
||||||
Client *c, *t = NULL;
|
client_t *c, *t = NULL;
|
||||||
xcb_window_t trans;
|
xcb_window_t trans;
|
||||||
bool rettrans, retloadprops;
|
bool rettrans, retloadprops;
|
||||||
uint32_t config_win_val;
|
uint32_t config_win_val;
|
||||||
|
@ -353,7 +353,7 @@ client_manage(xcb_window_t w, xcb_get_geometry_reply_t *wgeom, int screen)
|
||||||
rule_t *rule;
|
rule_t *rule;
|
||||||
xcb_size_hints_t *u_size_hints;
|
xcb_size_hints_t *u_size_hints;
|
||||||
|
|
||||||
c = p_new(Client, 1);
|
c = p_new(client_t, 1);
|
||||||
|
|
||||||
c->screen = screen_get_bycoord(globalconf.screens_info, screen, wgeom->x, wgeom->y);
|
c->screen = screen_get_bycoord(globalconf.screens_info, screen, wgeom->x, wgeom->y);
|
||||||
|
|
||||||
|
@ -498,7 +498,7 @@ client_manage(xcb_window_t w, xcb_get_geometry_reply_t *wgeom, int screen)
|
||||||
}
|
}
|
||||||
|
|
||||||
static area_t
|
static area_t
|
||||||
client_geometry_hints(Client *c, area_t geometry)
|
client_geometry_hints(client_t *c, area_t geometry)
|
||||||
{
|
{
|
||||||
double dx, dy, max, min, ratio;
|
double dx, dy, max, min, ratio;
|
||||||
|
|
||||||
|
@ -551,7 +551,7 @@ client_geometry_hints(Client *c, area_t geometry)
|
||||||
* \param return true if resize has been done
|
* \param return true if resize has been done
|
||||||
*/
|
*/
|
||||||
bool
|
bool
|
||||||
client_resize(Client *c, area_t geometry, bool hints)
|
client_resize(client_t *c, area_t geometry, bool hints)
|
||||||
{
|
{
|
||||||
int new_screen;
|
int new_screen;
|
||||||
area_t area;
|
area_t area;
|
||||||
|
@ -631,7 +631,7 @@ client_resize(Client *c, area_t geometry, bool hints)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
client_setfloating(Client *c, bool floating, layer_t layer)
|
client_setfloating(client_t *c, bool floating, layer_t layer)
|
||||||
{
|
{
|
||||||
if(c->isfloating != floating)
|
if(c->isfloating != floating)
|
||||||
{
|
{
|
||||||
|
@ -663,7 +663,7 @@ client_setfloating(Client *c, bool floating, layer_t layer)
|
||||||
* \param c client
|
* \param c client
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
client_saveprops(Client *c)
|
client_saveprops(client_t *c)
|
||||||
{
|
{
|
||||||
int i = 0, ntags = 0;
|
int i = 0, ntags = 0;
|
||||||
char *prop;
|
char *prop;
|
||||||
|
@ -691,7 +691,7 @@ client_saveprops(Client *c)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
client_unban(Client *c)
|
client_unban(client_t *c)
|
||||||
{
|
{
|
||||||
xcb_map_window(globalconf.connection, c->win);
|
xcb_map_window(globalconf.connection, c->win);
|
||||||
window_setstate(c->win, XCB_WM_NORMAL_STATE);
|
window_setstate(c->win, XCB_WM_NORMAL_STATE);
|
||||||
|
@ -700,7 +700,7 @@ client_unban(Client *c)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
client_unmanage(Client *c)
|
client_unmanage(client_t *c)
|
||||||
{
|
{
|
||||||
Tag *tag;
|
Tag *tag;
|
||||||
|
|
||||||
|
@ -735,7 +735,7 @@ client_unmanage(Client *c)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
client_updatewmhints(Client *c)
|
client_updatewmhints(client_t *c)
|
||||||
{
|
{
|
||||||
xcb_wm_hints_t *wmh = NULL;
|
xcb_wm_hints_t *wmh = NULL;
|
||||||
|
|
||||||
|
@ -756,7 +756,7 @@ client_updatewmhints(Client *c)
|
||||||
}
|
}
|
||||||
|
|
||||||
xcb_size_hints_t *
|
xcb_size_hints_t *
|
||||||
client_updatesizehints(Client *c)
|
client_updatesizehints(client_t *c)
|
||||||
{
|
{
|
||||||
long msize;
|
long msize;
|
||||||
xcb_size_hints_t *size = NULL;
|
xcb_size_hints_t *size = NULL;
|
||||||
|
@ -814,7 +814,7 @@ uicb_client_settrans(int screen __attribute__ ((unused)), char *arg)
|
||||||
double delta = 1.0, current_opacity = 100.0;
|
double delta = 1.0, current_opacity = 100.0;
|
||||||
unsigned int current_opacity_raw = 0;
|
unsigned int current_opacity_raw = 0;
|
||||||
int set_prop = 0;
|
int set_prop = 0;
|
||||||
Client *sel = globalconf.focus->client;
|
client_t *sel = globalconf.focus->client;
|
||||||
xcb_get_property_reply_t *prop_r;
|
xcb_get_property_reply_t *prop_r;
|
||||||
|
|
||||||
if(!sel)
|
if(!sel)
|
||||||
|
@ -859,11 +859,11 @@ uicb_client_settrans(int screen __attribute__ ((unused)), char *arg)
|
||||||
* \param reverse return previous instead of next if true
|
* \param reverse return previous instead of next if true
|
||||||
* \return next or previous client
|
* \return next or previous client
|
||||||
*/
|
*/
|
||||||
static Client *
|
static client_t *
|
||||||
client_find_visible(Client *sel, bool reverse)
|
client_find_visible(client_t *sel, bool reverse)
|
||||||
{
|
{
|
||||||
Client *next;
|
client_t *next;
|
||||||
Client *(*client_iter)(Client **, Client *) = client_list_next_cycle;
|
client_t *(*client_iter)(client_t **, client_t *) = client_list_next_cycle;
|
||||||
|
|
||||||
if(!sel) return NULL;
|
if(!sel) return NULL;
|
||||||
|
|
||||||
|
@ -887,7 +887,7 @@ client_find_visible(Client *sel, bool reverse)
|
||||||
void
|
void
|
||||||
uicb_client_swapprev(int screen __attribute__ ((unused)), char *arg __attribute__ ((unused)))
|
uicb_client_swapprev(int screen __attribute__ ((unused)), char *arg __attribute__ ((unused)))
|
||||||
{
|
{
|
||||||
Client *prev;
|
client_t *prev;
|
||||||
|
|
||||||
if((prev = client_find_visible(globalconf.focus->client, true)))
|
if((prev = client_find_visible(globalconf.focus->client, true)))
|
||||||
{
|
{
|
||||||
|
@ -905,7 +905,7 @@ uicb_client_swapprev(int screen __attribute__ ((unused)), char *arg __attribute_
|
||||||
void
|
void
|
||||||
uicb_client_swapnext(int screen __attribute__ ((unused)), char *arg __attribute__ ((unused)))
|
uicb_client_swapnext(int screen __attribute__ ((unused)), char *arg __attribute__ ((unused)))
|
||||||
{
|
{
|
||||||
Client *next;
|
client_t *next;
|
||||||
|
|
||||||
if((next = client_find_visible(globalconf.focus->client, false)))
|
if((next = client_find_visible(globalconf.focus->client, false)))
|
||||||
{
|
{
|
||||||
|
@ -928,7 +928,7 @@ uicb_client_moveresize(int screen, char *arg)
|
||||||
char x[8], y[8], w[8], h[8];
|
char x[8], y[8], w[8], h[8];
|
||||||
int nmx, nmy;
|
int nmx, nmy;
|
||||||
area_t geometry;
|
area_t geometry;
|
||||||
Client *sel = globalconf.focus->client;
|
client_t *sel = globalconf.focus->client;
|
||||||
xcb_query_pointer_reply_t *xqp;
|
xcb_query_pointer_reply_t *xqp;
|
||||||
Layout *curlay = layout_get_current(screen);
|
Layout *curlay = layout_get_current(screen);
|
||||||
|
|
||||||
|
@ -983,7 +983,7 @@ uicb_client_moveresize(int screen, char *arg)
|
||||||
* \param c the client to kill
|
* \param c the client to kill
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
client_kill(Client *c)
|
client_kill(client_t *c)
|
||||||
{
|
{
|
||||||
xcb_client_message_event_t ev;
|
xcb_client_message_event_t ev;
|
||||||
|
|
||||||
|
@ -1015,7 +1015,7 @@ client_kill(Client *c)
|
||||||
void
|
void
|
||||||
uicb_client_kill(int screen __attribute__ ((unused)), char *arg __attribute__ ((unused)))
|
uicb_client_kill(int screen __attribute__ ((unused)), char *arg __attribute__ ((unused)))
|
||||||
{
|
{
|
||||||
Client *sel = globalconf.focus->client;
|
client_t *sel = globalconf.focus->client;
|
||||||
|
|
||||||
if(sel)
|
if(sel)
|
||||||
client_kill(sel);
|
client_kill(sel);
|
||||||
|
@ -1026,7 +1026,7 @@ uicb_client_kill(int screen __attribute__ ((unused)), char *arg __attribute__ ((
|
||||||
* \param geometry the geometry to use for maximizing
|
* \param geometry the geometry to use for maximizing
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
client_maximize(Client *c, area_t geometry)
|
client_maximize(client_t *c, area_t geometry)
|
||||||
{
|
{
|
||||||
if((c->ismax = !c->ismax))
|
if((c->ismax = !c->ismax))
|
||||||
{
|
{
|
||||||
|
@ -1067,7 +1067,7 @@ client_maximize(Client *c, area_t geometry)
|
||||||
void
|
void
|
||||||
uicb_client_togglemax(int screen, char *arg __attribute__ ((unused)))
|
uicb_client_togglemax(int screen, char *arg __attribute__ ((unused)))
|
||||||
{
|
{
|
||||||
Client *sel = globalconf.focus->client;
|
client_t *sel = globalconf.focus->client;
|
||||||
area_t area = screen_get_area(screen,
|
area_t area = screen_get_area(screen,
|
||||||
globalconf.screens[screen].statusbar,
|
globalconf.screens[screen].statusbar,
|
||||||
&globalconf.screens[screen].padding);
|
&globalconf.screens[screen].padding);
|
||||||
|
@ -1088,7 +1088,7 @@ uicb_client_togglemax(int screen, char *arg __attribute__ ((unused)))
|
||||||
void
|
void
|
||||||
uicb_client_toggleverticalmax(int screen, char *arg __attribute__ ((unused)))
|
uicb_client_toggleverticalmax(int screen, char *arg __attribute__ ((unused)))
|
||||||
{
|
{
|
||||||
Client *sel = globalconf.focus->client;
|
client_t *sel = globalconf.focus->client;
|
||||||
area_t area = screen_get_area(screen,
|
area_t area = screen_get_area(screen,
|
||||||
globalconf.screens[screen].statusbar,
|
globalconf.screens[screen].statusbar,
|
||||||
&globalconf.screens[screen].padding);
|
&globalconf.screens[screen].padding);
|
||||||
|
@ -1111,7 +1111,7 @@ uicb_client_toggleverticalmax(int screen, char *arg __attribute__ ((unused)))
|
||||||
void
|
void
|
||||||
uicb_client_togglehorizontalmax(int screen, char *arg __attribute__ ((unused)))
|
uicb_client_togglehorizontalmax(int screen, char *arg __attribute__ ((unused)))
|
||||||
{
|
{
|
||||||
Client *sel = globalconf.focus->client;
|
client_t *sel = globalconf.focus->client;
|
||||||
area_t area = screen_get_area(screen,
|
area_t area = screen_get_area(screen,
|
||||||
globalconf.screens[screen].statusbar,
|
globalconf.screens[screen].statusbar,
|
||||||
&globalconf.screens[screen].padding);
|
&globalconf.screens[screen].padding);
|
||||||
|
@ -1133,7 +1133,7 @@ uicb_client_togglehorizontalmax(int screen, char *arg __attribute__ ((unused)))
|
||||||
void
|
void
|
||||||
uicb_client_zoom(int screen, char *arg __attribute__ ((unused)))
|
uicb_client_zoom(int screen, char *arg __attribute__ ((unused)))
|
||||||
{
|
{
|
||||||
Client *c, *sel = globalconf.focus->client;
|
client_t *c, *sel = globalconf.focus->client;
|
||||||
|
|
||||||
if(!sel)
|
if(!sel)
|
||||||
return;
|
return;
|
||||||
|
@ -1158,7 +1158,7 @@ uicb_client_zoom(int screen, char *arg __attribute__ ((unused)))
|
||||||
void
|
void
|
||||||
uicb_client_focusnext(int screen, char *arg __attribute__ ((unused)))
|
uicb_client_focusnext(int screen, char *arg __attribute__ ((unused)))
|
||||||
{
|
{
|
||||||
Client *next;
|
client_t *next;
|
||||||
|
|
||||||
if((next = client_find_visible(globalconf.focus->client, false)))
|
if((next = client_find_visible(globalconf.focus->client, false)))
|
||||||
client_focus(next, screen, true);
|
client_focus(next, screen, true);
|
||||||
|
@ -1172,7 +1172,7 @@ uicb_client_focusnext(int screen, char *arg __attribute__ ((unused)))
|
||||||
void
|
void
|
||||||
uicb_client_focusprev(int screen, char *arg __attribute__ ((unused)))
|
uicb_client_focusprev(int screen, char *arg __attribute__ ((unused)))
|
||||||
{
|
{
|
||||||
Client *prev;
|
client_t *prev;
|
||||||
|
|
||||||
if((prev = client_find_visible(globalconf.focus->client, true)))
|
if((prev = client_find_visible(globalconf.focus->client, true)))
|
||||||
client_focus(prev, screen, true);
|
client_focus(prev, screen, true);
|
||||||
|
|
32
client.h
32
client.h
|
@ -26,22 +26,22 @@
|
||||||
|
|
||||||
#include "structs.h"
|
#include "structs.h"
|
||||||
|
|
||||||
bool client_isvisible(Client *, int);
|
bool client_isvisible(client_t *, int);
|
||||||
Client * client_get_bywin(Client *, xcb_window_t);
|
client_t * client_get_bywin(client_t *, xcb_window_t);
|
||||||
Client * client_get_byname(Client *, char *);
|
client_t * client_get_byname(client_t *, char *);
|
||||||
bool client_focus(Client *, int, bool);
|
bool client_focus(client_t *, int, bool);
|
||||||
void client_stack(Client *);
|
void client_stack(client_t *);
|
||||||
void client_ban(Client *);
|
void client_ban(client_t *);
|
||||||
void client_unban(Client *);
|
void client_unban(client_t *);
|
||||||
void client_manage(xcb_window_t, xcb_get_geometry_reply_t *, int);
|
void client_manage(xcb_window_t, xcb_get_geometry_reply_t *, int);
|
||||||
bool client_resize(Client *, area_t, bool);
|
bool client_resize(client_t *, area_t, bool);
|
||||||
void client_unmanage(Client *);
|
void client_unmanage(client_t *);
|
||||||
void client_updatewmhints(Client *);
|
void client_updatewmhints(client_t *);
|
||||||
xcb_size_hints_t *client_updatesizehints(Client *);
|
xcb_size_hints_t *client_updatesizehints(client_t *);
|
||||||
void client_updatetitle(Client *);
|
void client_updatetitle(client_t *);
|
||||||
void client_saveprops(Client *);
|
void client_saveprops(client_t *);
|
||||||
void client_kill(Client *);
|
void client_kill(client_t *);
|
||||||
void client_setfloating(Client *, bool, layer_t);
|
void client_setfloating(client_t *, bool, layer_t);
|
||||||
|
|
||||||
uicb_t uicb_client_kill;
|
uicb_t uicb_client_kill;
|
||||||
uicb_t uicb_client_moveresize;
|
uicb_t uicb_client_moveresize;
|
||||||
|
@ -58,7 +58,7 @@ uicb_t uicb_client_togglefloating;
|
||||||
uicb_t uicb_client_togglescratch;
|
uicb_t uicb_client_togglescratch;
|
||||||
uicb_t uicb_client_setscratch;
|
uicb_t uicb_client_setscratch;
|
||||||
|
|
||||||
DO_SLIST(Client, client, p_delete)
|
DO_SLIST(client_t, client, p_delete)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80
|
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80
|
||||||
|
|
16
event.c
16
event.c
|
@ -77,7 +77,7 @@ event_handle_buttonpress(void *data __attribute__ ((unused)),
|
||||||
xcb_connection_t *connection, xcb_button_press_event_t *ev)
|
xcb_connection_t *connection, xcb_button_press_event_t *ev)
|
||||||
{
|
{
|
||||||
int screen;
|
int screen;
|
||||||
Client *c;
|
client_t *c;
|
||||||
widget_t *widget;
|
widget_t *widget;
|
||||||
statusbar_t *statusbar;
|
statusbar_t *statusbar;
|
||||||
xcb_query_pointer_cookie_t qc;
|
xcb_query_pointer_cookie_t qc;
|
||||||
|
@ -182,7 +182,7 @@ int
|
||||||
event_handle_configurerequest(void *data __attribute__ ((unused)),
|
event_handle_configurerequest(void *data __attribute__ ((unused)),
|
||||||
xcb_connection_t *connection, xcb_configure_request_event_t *ev)
|
xcb_connection_t *connection, xcb_configure_request_event_t *ev)
|
||||||
{
|
{
|
||||||
Client *c;
|
client_t *c;
|
||||||
area_t geometry;
|
area_t geometry;
|
||||||
|
|
||||||
if((c = client_get_bywin(globalconf.clients, ev->window)))
|
if((c = client_get_bywin(globalconf.clients, ev->window)))
|
||||||
|
@ -297,7 +297,7 @@ event_handle_destroynotify(void *data __attribute__ ((unused)),
|
||||||
xcb_connection_t *connection __attribute__ ((unused)),
|
xcb_connection_t *connection __attribute__ ((unused)),
|
||||||
xcb_destroy_notify_event_t *ev)
|
xcb_destroy_notify_event_t *ev)
|
||||||
{
|
{
|
||||||
Client *c;
|
client_t *c;
|
||||||
|
|
||||||
if((c = client_get_bywin(globalconf.clients, ev->window)))
|
if((c = client_get_bywin(globalconf.clients, ev->window)))
|
||||||
client_unmanage(c);
|
client_unmanage(c);
|
||||||
|
@ -313,7 +313,7 @@ int
|
||||||
event_handle_enternotify(void *data __attribute__ ((unused)),
|
event_handle_enternotify(void *data __attribute__ ((unused)),
|
||||||
xcb_connection_t *connection, xcb_enter_notify_event_t *ev)
|
xcb_connection_t *connection, xcb_enter_notify_event_t *ev)
|
||||||
{
|
{
|
||||||
Client *c;
|
client_t *c;
|
||||||
int screen;
|
int screen;
|
||||||
|
|
||||||
if(ev->mode != XCB_NOTIFY_MODE_NORMAL
|
if(ev->mode != XCB_NOTIFY_MODE_NORMAL
|
||||||
|
@ -359,7 +359,7 @@ event_handle_expose(void *data __attribute__ ((unused)),
|
||||||
{
|
{
|
||||||
int screen;
|
int screen;
|
||||||
statusbar_t *statusbar;
|
statusbar_t *statusbar;
|
||||||
Client *c;
|
client_t *c;
|
||||||
|
|
||||||
if(!ev->count)
|
if(!ev->count)
|
||||||
{
|
{
|
||||||
|
@ -503,7 +503,7 @@ int
|
||||||
event_handle_propertynotify(void *data __attribute__ ((unused)),
|
event_handle_propertynotify(void *data __attribute__ ((unused)),
|
||||||
xcb_connection_t *connection, xcb_property_notify_event_t *ev)
|
xcb_connection_t *connection, xcb_property_notify_event_t *ev)
|
||||||
{
|
{
|
||||||
Client *c;
|
client_t *c;
|
||||||
xcb_window_t trans;
|
xcb_window_t trans;
|
||||||
|
|
||||||
if(ev->state == XCB_PROPERTY_DELETE)
|
if(ev->state == XCB_PROPERTY_DELETE)
|
||||||
|
@ -538,7 +538,7 @@ int
|
||||||
event_handle_unmapnotify(void *data __attribute__ ((unused)),
|
event_handle_unmapnotify(void *data __attribute__ ((unused)),
|
||||||
xcb_connection_t *connection, xcb_unmap_notify_event_t *ev)
|
xcb_connection_t *connection, xcb_unmap_notify_event_t *ev)
|
||||||
{
|
{
|
||||||
Client *c;
|
client_t *c;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* event->send_event (Xlib) is quivalent to (ev->response_type &
|
* event->send_event (Xlib) is quivalent to (ev->response_type &
|
||||||
|
@ -563,7 +563,7 @@ event_handle_shape(void *data __attribute__ ((unused)),
|
||||||
xcb_connection_t *connection __attribute__ ((unused)),
|
xcb_connection_t *connection __attribute__ ((unused)),
|
||||||
xcb_shape_notify_event_t *ev)
|
xcb_shape_notify_event_t *ev)
|
||||||
{
|
{
|
||||||
Client *c = client_get_bywin(globalconf.clients, ev->affected_window);
|
client_t *c = client_get_bywin(globalconf.clients, ev->affected_window);
|
||||||
|
|
||||||
if(c)
|
if(c)
|
||||||
window_setshape(c->win, c->phys_screen);
|
window_setshape(c->win, c->phys_screen);
|
||||||
|
|
12
ewmh.c
12
ewmh.c
|
@ -165,7 +165,7 @@ void
|
||||||
ewmh_update_net_client_list(int phys_screen)
|
ewmh_update_net_client_list(int phys_screen)
|
||||||
{
|
{
|
||||||
xcb_window_t *wins;
|
xcb_window_t *wins;
|
||||||
Client *c;
|
client_t *c;
|
||||||
int n = 0;
|
int n = 0;
|
||||||
|
|
||||||
for(c = globalconf.clients; c; c = c->next)
|
for(c = globalconf.clients; c; c = c->next)
|
||||||
|
@ -240,7 +240,7 @@ void
|
||||||
ewmh_update_net_active_window(int phys_screen)
|
ewmh_update_net_active_window(int phys_screen)
|
||||||
{
|
{
|
||||||
xcb_window_t win;
|
xcb_window_t win;
|
||||||
Client *sel = focus_get_current_client(phys_screen);
|
client_t *sel = focus_get_current_client(phys_screen);
|
||||||
|
|
||||||
win = sel ? sel->win : XCB_NONE;
|
win = sel ? sel->win : XCB_NONE;
|
||||||
|
|
||||||
|
@ -250,7 +250,7 @@ ewmh_update_net_active_window(int phys_screen)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ewmh_process_state_atom(Client *c, xcb_atom_t state, int set)
|
ewmh_process_state_atom(client_t *c, xcb_atom_t state, int set)
|
||||||
{
|
{
|
||||||
const uint32_t raise_window_val = XCB_STACK_MODE_ABOVE;
|
const uint32_t raise_window_val = XCB_STACK_MODE_ABOVE;
|
||||||
|
|
||||||
|
@ -331,7 +331,7 @@ ewmh_process_state_atom(Client *c, xcb_atom_t state, int set)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ewmh_process_window_type_atom(Client *c, xcb_atom_t state)
|
ewmh_process_window_type_atom(client_t *c, xcb_atom_t state)
|
||||||
{
|
{
|
||||||
if(state == net_wm_window_type_normal)
|
if(state == net_wm_window_type_normal)
|
||||||
{
|
{
|
||||||
|
@ -353,7 +353,7 @@ ewmh_process_window_type_atom(Client *c, xcb_atom_t state)
|
||||||
void
|
void
|
||||||
ewmh_process_client_message(xcb_client_message_event_t *ev)
|
ewmh_process_client_message(xcb_client_message_event_t *ev)
|
||||||
{
|
{
|
||||||
Client *c;
|
client_t *c;
|
||||||
int screen;
|
int screen;
|
||||||
|
|
||||||
if(ev->type == net_current_desktop)
|
if(ev->type == net_current_desktop)
|
||||||
|
@ -383,7 +383,7 @@ ewmh_process_client_message(xcb_client_message_event_t *ev)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ewmh_check_client_hints(Client *c)
|
ewmh_check_client_hints(client_t *c)
|
||||||
{
|
{
|
||||||
xcb_atom_t *state;
|
xcb_atom_t *state;
|
||||||
void *data = NULL;
|
void *data = NULL;
|
||||||
|
|
2
ewmh.h
2
ewmh.h
|
@ -39,7 +39,7 @@ void ewmh_update_net_current_desktop(int);
|
||||||
void ewmh_update_net_desktop_names(int);
|
void ewmh_update_net_desktop_names(int);
|
||||||
void ewmh_update_net_active_window(int);
|
void ewmh_update_net_active_window(int);
|
||||||
void ewmh_process_client_message(xcb_client_message_event_t *);
|
void ewmh_process_client_message(xcb_client_message_event_t *);
|
||||||
void ewmh_check_client_hints(Client *);
|
void ewmh_check_client_hints(client_t *);
|
||||||
NetWMIcon * ewmh_get_window_icon(xcb_window_t);
|
NetWMIcon * ewmh_get_window_icon(xcb_window_t);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
16
focus.c
16
focus.c
|
@ -26,7 +26,7 @@
|
||||||
extern AwesomeConf globalconf;
|
extern AwesomeConf globalconf;
|
||||||
|
|
||||||
static client_node_t *
|
static client_node_t *
|
||||||
focus_get_node_by_client(Client *c)
|
focus_get_node_by_client(client_t *c)
|
||||||
{
|
{
|
||||||
client_node_t *node;
|
client_node_t *node;
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ focus_get_node_by_client(Client *c)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
focus_add_client(Client *c)
|
focus_add_client(client_t *c)
|
||||||
{
|
{
|
||||||
client_node_t *node;
|
client_node_t *node;
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ focus_add_client(Client *c)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
focus_delete_client(Client *c)
|
focus_delete_client(client_t *c)
|
||||||
{
|
{
|
||||||
client_node_t *node = focus_get_node_by_client(c);
|
client_node_t *node = focus_get_node_by_client(c);
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ focus_delete_client(Client *c)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static Client *
|
static client_t *
|
||||||
focus_get_latest_client_for_tags(Tag **t, int nindex)
|
focus_get_latest_client_for_tags(Tag **t, int nindex)
|
||||||
{
|
{
|
||||||
client_node_t *node;
|
client_node_t *node;
|
||||||
|
@ -89,11 +89,11 @@ focus_get_latest_client_for_tags(Tag **t, int nindex)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
Client *
|
client_t *
|
||||||
focus_get_current_client(int screen)
|
focus_get_current_client(int screen)
|
||||||
{
|
{
|
||||||
Tag **curtags = tags_get_current(screen);
|
Tag **curtags = tags_get_current(screen);
|
||||||
Client *sel = focus_get_latest_client_for_tags(curtags, 0);
|
client_t *sel = focus_get_latest_client_for_tags(curtags, 0);
|
||||||
p_delete(&curtags);
|
p_delete(&curtags);
|
||||||
|
|
||||||
return sel;
|
return sel;
|
||||||
|
@ -110,7 +110,7 @@ uicb_focus_history(int screen, char *arg)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
Tag **curtags;
|
Tag **curtags;
|
||||||
Client *c;
|
client_t *c;
|
||||||
|
|
||||||
if(arg)
|
if(arg)
|
||||||
{
|
{
|
||||||
|
@ -135,7 +135,7 @@ uicb_focus_history(int screen, char *arg)
|
||||||
void
|
void
|
||||||
uicb_focus_client_byname(int screen, char *arg)
|
uicb_focus_client_byname(int screen, char *arg)
|
||||||
{
|
{
|
||||||
Client *c;
|
client_t *c;
|
||||||
Tag **curtags, **tag;
|
Tag **curtags, **tag;
|
||||||
|
|
||||||
if(arg)
|
if(arg)
|
||||||
|
|
6
focus.h
6
focus.h
|
@ -24,9 +24,9 @@
|
||||||
|
|
||||||
#include "structs.h"
|
#include "structs.h"
|
||||||
|
|
||||||
void focus_add_client(Client *);
|
void focus_add_client(client_t *);
|
||||||
void focus_delete_client(Client *);
|
void focus_delete_client(client_t *);
|
||||||
Client * focus_get_current_client(int);
|
client_t * focus_get_current_client(int);
|
||||||
|
|
||||||
uicb_t uicb_focus_history;
|
uicb_t uicb_focus_history;
|
||||||
uicb_t uicb_focus_client_byname;
|
uicb_t uicb_focus_client_byname;
|
||||||
|
|
2
layout.c
2
layout.c
|
@ -44,7 +44,7 @@ extern AwesomeConf globalconf;
|
||||||
static void
|
static void
|
||||||
arrange(int screen)
|
arrange(int screen)
|
||||||
{
|
{
|
||||||
Client *c;
|
client_t *c;
|
||||||
Layout *curlay = layout_get_current(screen);
|
Layout *curlay = layout_get_current(screen);
|
||||||
int phys_screen = screen_virttophys(screen);
|
int phys_screen = screen_virttophys(screen);
|
||||||
xcb_query_pointer_cookie_t qp_c;
|
xcb_query_pointer_cookie_t qp_c;
|
||||||
|
|
|
@ -31,7 +31,7 @@ static void
|
||||||
layout_fibonacci(int screen, int shape)
|
layout_fibonacci(int screen, int shape)
|
||||||
{
|
{
|
||||||
int n = 0, i = 0;
|
int n = 0, i = 0;
|
||||||
Client *c;
|
client_t *c;
|
||||||
area_t geometry, area;
|
area_t geometry, area;
|
||||||
geometry = area = screen_get_area(screen,
|
geometry = area = screen_get_area(screen,
|
||||||
globalconf.screens[screen].statusbar,
|
globalconf.screens[screen].statusbar,
|
||||||
|
|
|
@ -28,7 +28,7 @@ extern AwesomeConf globalconf;
|
||||||
void
|
void
|
||||||
layout_floating(int screen)
|
layout_floating(int screen)
|
||||||
{
|
{
|
||||||
Client *c;
|
client_t *c;
|
||||||
|
|
||||||
for(c = globalconf.clients; c; c = c->next)
|
for(c = globalconf.clients; c; c = c->next)
|
||||||
if(client_isvisible(c, screen) && !c->ismax)
|
if(client_isvisible(c, screen) && !c->ismax)
|
||||||
|
|
|
@ -30,7 +30,7 @@ extern AwesomeConf globalconf;
|
||||||
void
|
void
|
||||||
layout_max(int screen)
|
layout_max(int screen)
|
||||||
{
|
{
|
||||||
Client *c;
|
client_t *c;
|
||||||
area_t area = screen_get_area(screen,
|
area_t area = screen_get_area(screen,
|
||||||
globalconf.screens[screen].statusbar,
|
globalconf.screens[screen].statusbar,
|
||||||
&globalconf.screens[screen].padding);
|
&globalconf.screens[screen].padding);
|
||||||
|
|
|
@ -36,7 +36,7 @@ uicb_tag_setnmaster(int screen, char * arg)
|
||||||
{
|
{
|
||||||
Tag **curtags = tags_get_current(screen);
|
Tag **curtags = tags_get_current(screen);
|
||||||
Layout *curlay = curtags[0]->layout;
|
Layout *curlay = curtags[0]->layout;
|
||||||
Client *c;
|
client_t *c;
|
||||||
int n;
|
int n;
|
||||||
|
|
||||||
if(!arg || (curlay->arrange != layout_tile
|
if(!arg || (curlay->arrange != layout_tile
|
||||||
|
@ -65,7 +65,7 @@ uicb_tag_setncol(int screen, char * arg)
|
||||||
{
|
{
|
||||||
Tag **curtags = tags_get_current(screen);
|
Tag **curtags = tags_get_current(screen);
|
||||||
Layout *curlay = curtags[0]->layout;
|
Layout *curlay = curtags[0]->layout;
|
||||||
Client *c;
|
client_t *c;
|
||||||
int n;
|
int n;
|
||||||
|
|
||||||
if(!arg || (curlay->arrange != layout_tile
|
if(!arg || (curlay->arrange != layout_tile
|
||||||
|
@ -134,7 +134,7 @@ _tile(int screen, const position_t position)
|
||||||
int n, i, masterwin = 0, otherwin = 0;
|
int n, i, masterwin = 0, otherwin = 0;
|
||||||
int real_ncol = 1, win_by_col = 1, current_col = 0;
|
int real_ncol = 1, win_by_col = 1, current_col = 0;
|
||||||
area_t area, geometry = { 0, 0, 0, 0, NULL, NULL };
|
area_t area, geometry = { 0, 0, 0, 0, NULL, NULL };
|
||||||
Client *c;
|
client_t *c;
|
||||||
Tag **curtags = tags_get_current(screen);
|
Tag **curtags = tags_get_current(screen);
|
||||||
|
|
||||||
area = screen_get_area(screen,
|
area = screen_get_area(screen,
|
||||||
|
|
8
mouse.c
8
mouse.c
|
@ -95,9 +95,9 @@ mouse_snapclienttogeometry_inside(area_t geometry, area_t snap_geometry, int sna
|
||||||
* \return geometry to set to the client
|
* \return geometry to set to the client
|
||||||
*/
|
*/
|
||||||
static area_t
|
static area_t
|
||||||
mouse_snapclient(Client *c, area_t geometry)
|
mouse_snapclient(client_t *c, area_t geometry)
|
||||||
{
|
{
|
||||||
Client *snapper;
|
client_t *snapper;
|
||||||
int snap = globalconf.screens[c->screen].snap;
|
int snap = globalconf.screens[c->screen].snap;
|
||||||
area_t snapper_geometry;
|
area_t snapper_geometry;
|
||||||
area_t screen_geometry =
|
area_t screen_geometry =
|
||||||
|
@ -197,7 +197,7 @@ uicb_client_movemouse(int screen, char *arg __attribute__ ((unused)))
|
||||||
{
|
{
|
||||||
int ocx, ocy, newscreen;
|
int ocx, ocy, newscreen;
|
||||||
area_t geometry;
|
area_t geometry;
|
||||||
Client *c = globalconf.focus->client, *target;
|
client_t *c = globalconf.focus->client, *target;
|
||||||
Layout *layout = layout_get_current(screen);
|
Layout *layout = layout_get_current(screen);
|
||||||
simple_window_t *sw = NULL;
|
simple_window_t *sw = NULL;
|
||||||
DrawCtx *ctx;
|
DrawCtx *ctx;
|
||||||
|
@ -324,7 +324,7 @@ uicb_client_resizemouse(int screen, char *arg __attribute__ ((unused)))
|
||||||
int ocx = 0, ocy = 0, n;
|
int ocx = 0, ocy = 0, n;
|
||||||
xcb_generic_event_t *ev = NULL;
|
xcb_generic_event_t *ev = NULL;
|
||||||
xcb_motion_notify_event_t *ev_motion = NULL;
|
xcb_motion_notify_event_t *ev_motion = NULL;
|
||||||
Client *c = globalconf.focus->client;
|
client_t *c = globalconf.focus->client;
|
||||||
Tag **curtags = tags_get_current(screen);
|
Tag **curtags = tags_get_current(screen);
|
||||||
Layout *layout = curtags[0]->layout;
|
Layout *layout = curtags[0]->layout;
|
||||||
area_t area = { 0, 0, 0, 0, NULL, NULL }, geometry = { 0, 0, 0, 0, NULL, NULL };
|
area_t area = { 0, 0, 0, 0, NULL, NULL }, geometry = { 0, 0, 0, 0, NULL, NULL };
|
||||||
|
|
|
@ -66,9 +66,9 @@ placement_fix_offscreen(area_t geometry, int screen, int border)
|
||||||
* \return new geometry
|
* \return new geometry
|
||||||
*/
|
*/
|
||||||
area_t
|
area_t
|
||||||
placement_smart(Client *c)
|
placement_smart(client_t *c)
|
||||||
{
|
{
|
||||||
Client *client;
|
client_t *client;
|
||||||
area_t newgeometry = { 0, 0, 0, 0, NULL, NULL };
|
area_t newgeometry = { 0, 0, 0, 0, NULL, NULL };
|
||||||
area_t *screen_geometry, *arealist = NULL, *r;
|
area_t *screen_geometry, *arealist = NULL, *r;
|
||||||
bool found = false;
|
bool found = false;
|
||||||
|
@ -129,7 +129,7 @@ placement_smart(Client *c)
|
||||||
}
|
}
|
||||||
|
|
||||||
area_t
|
area_t
|
||||||
placement_under_mouse(Client *c)
|
placement_under_mouse(client_t *c)
|
||||||
{
|
{
|
||||||
xcb_query_pointer_cookie_t qp_c;
|
xcb_query_pointer_cookie_t qp_c;
|
||||||
xcb_query_pointer_reply_t *qp_r;
|
xcb_query_pointer_reply_t *qp_r;
|
||||||
|
|
2
rules.c
2
rules.c
|
@ -53,7 +53,7 @@ tag_match_rule(Tag *t, rule_t *r)
|
||||||
}
|
}
|
||||||
|
|
||||||
rule_t *
|
rule_t *
|
||||||
rule_matching_client(Client *c)
|
rule_matching_client(client_t *c)
|
||||||
{
|
{
|
||||||
rule_t *r;
|
rule_t *r;
|
||||||
char *prop = NULL, buf[512];
|
char *prop = NULL, buf[512];
|
||||||
|
|
2
rules.h
2
rules.h
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
regex_t * rules_compile_regex(char *);
|
regex_t * rules_compile_regex(char *);
|
||||||
bool tag_match_rule(Tag *, rule_t *);
|
bool tag_match_rule(Tag *, rule_t *);
|
||||||
rule_t * rule_matching_client(Client *);
|
rule_t * rule_matching_client(client_t *);
|
||||||
|
|
||||||
DO_SLIST(rule_t, rule, p_delete)
|
DO_SLIST(rule_t, rule, p_delete)
|
||||||
|
|
||||||
|
|
4
screen.c
4
screen.c
|
@ -126,7 +126,7 @@ screen_virttophys(int screen)
|
||||||
* y of the new screen
|
* y of the new screen
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
move_client_to_screen(Client *c, int new_screen, bool doresize)
|
move_client_to_screen(client_t *c, int new_screen, bool doresize)
|
||||||
{
|
{
|
||||||
Tag *tag;
|
Tag *tag;
|
||||||
int old_screen = c->screen;
|
int old_screen = c->screen;
|
||||||
|
@ -268,7 +268,7 @@ void
|
||||||
uicb_client_movetoscreen(int screen __attribute__ ((unused)), char *arg)
|
uicb_client_movetoscreen(int screen __attribute__ ((unused)), char *arg)
|
||||||
{
|
{
|
||||||
int new_screen, prev_screen;
|
int new_screen, prev_screen;
|
||||||
Client *sel = globalconf.focus->client;
|
client_t *sel = globalconf.focus->client;
|
||||||
|
|
||||||
if(!sel || !globalconf.screens_info->xinerama_is_active)
|
if(!sel || !globalconf.screens_info->xinerama_is_active)
|
||||||
return;
|
return;
|
||||||
|
|
2
screen.h
2
screen.h
|
@ -27,7 +27,7 @@
|
||||||
area_t screen_get_area(int, statusbar_t *, Padding *);
|
area_t screen_get_area(int, statusbar_t *, Padding *);
|
||||||
area_t get_display_area(int, statusbar_t *, Padding *);
|
area_t get_display_area(int, statusbar_t *, Padding *);
|
||||||
int screen_virttophys(int);
|
int screen_virttophys(int);
|
||||||
void move_client_to_screen(Client *, int, bool);
|
void move_client_to_screen(client_t *, int, bool);
|
||||||
|
|
||||||
uicb_t uicb_screen_focus;
|
uicb_t uicb_screen_focus;
|
||||||
uicb_t uicb_client_movetoscreen;
|
uicb_t uicb_client_movetoscreen;
|
||||||
|
|
20
structs.h
20
structs.h
|
@ -181,9 +181,9 @@ struct statusbar_t
|
||||||
statusbar_t *prev, *next;
|
statusbar_t *prev, *next;
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Client type */
|
/** client_t type */
|
||||||
typedef struct Client Client;
|
typedef struct client_t client_t;
|
||||||
struct Client
|
struct client_t
|
||||||
{
|
{
|
||||||
/** Client name */
|
/** Client name */
|
||||||
char name[256];
|
char name[256];
|
||||||
|
@ -213,7 +213,7 @@ struct Client
|
||||||
/** true if the client must be skipped from task bar client list */
|
/** true if the client must be skipped from task bar client list */
|
||||||
bool skiptb;
|
bool skiptb;
|
||||||
/** Next and previous clients */
|
/** Next and previous clients */
|
||||||
Client *prev, *next;
|
client_t *prev, *next;
|
||||||
/** Window of the client */
|
/** Window of the client */
|
||||||
xcb_window_t win;
|
xcb_window_t win;
|
||||||
/** Client logical screen */
|
/** Client logical screen */
|
||||||
|
@ -232,7 +232,7 @@ struct Client
|
||||||
typedef struct client_node_t client_node_t;
|
typedef struct client_node_t client_node_t;
|
||||||
struct client_node_t
|
struct client_node_t
|
||||||
{
|
{
|
||||||
Client *client;
|
client_t *client;
|
||||||
/** Next and previous client_nodes */
|
/** Next and previous client_nodes */
|
||||||
client_node_t *prev, *next;
|
client_node_t *prev, *next;
|
||||||
};
|
};
|
||||||
|
@ -266,7 +266,7 @@ typedef struct tag_client_node_t tag_client_node_t;
|
||||||
struct tag_client_node_t
|
struct tag_client_node_t
|
||||||
{
|
{
|
||||||
Tag *tag;
|
Tag *tag;
|
||||||
Client *client;
|
client_t *client;
|
||||||
/** Next and previous tag_client_nodes */
|
/** Next and previous tag_client_nodes */
|
||||||
tag_client_node_t *prev, *next;
|
tag_client_node_t *prev, *next;
|
||||||
};
|
};
|
||||||
|
@ -284,7 +284,7 @@ typedef struct
|
||||||
int right;
|
int right;
|
||||||
} Padding;
|
} Padding;
|
||||||
|
|
||||||
typedef area_t (FloatingPlacement)(Client *);
|
typedef area_t (FloatingPlacement)(client_t *);
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
/** titlebar_t default parameters */
|
/** titlebar_t default parameters */
|
||||||
|
@ -369,12 +369,12 @@ struct AwesomeConf
|
||||||
bool have_randr;
|
bool have_randr;
|
||||||
/** Cursors */
|
/** Cursors */
|
||||||
xcb_cursor_t cursor[CurLast];
|
xcb_cursor_t cursor[CurLast];
|
||||||
/** Clients list */
|
/** client_ts list */
|
||||||
Client *clients;
|
client_t *clients;
|
||||||
/** Scratch client */
|
/** Scratch client */
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
Client *client;
|
client_t *client;
|
||||||
bool isvisible;
|
bool isvisible;
|
||||||
} scratch;
|
} scratch;
|
||||||
/** Path to config file */
|
/** Path to config file */
|
||||||
|
|
14
tag.c
14
tag.c
|
@ -94,7 +94,7 @@ tag_push_to_screen(Tag *tag, int screen)
|
||||||
* \param t the tag to tag the client with
|
* \param t the tag to tag the client with
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
tag_client(Client *c, Tag *t)
|
tag_client(client_t *c, Tag *t)
|
||||||
{
|
{
|
||||||
tag_client_node_t *tc;
|
tag_client_node_t *tc;
|
||||||
|
|
||||||
|
@ -117,7 +117,7 @@ tag_client(Client *c, Tag *t)
|
||||||
* \param t the tag to tag the client with
|
* \param t the tag to tag the client with
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
untag_client(Client *c, Tag *t)
|
untag_client(client_t *c, Tag *t)
|
||||||
{
|
{
|
||||||
tag_client_node_t *tc;
|
tag_client_node_t *tc;
|
||||||
|
|
||||||
|
@ -139,7 +139,7 @@ untag_client(Client *c, Tag *t)
|
||||||
* \return true if the client is tagged with the tag, false otherwise.
|
* \return true if the client is tagged with the tag, false otherwise.
|
||||||
*/
|
*/
|
||||||
bool
|
bool
|
||||||
is_client_tagged(Client *c, Tag *t)
|
is_client_tagged(client_t *c, Tag *t)
|
||||||
{
|
{
|
||||||
tag_client_node_t *tc;
|
tag_client_node_t *tc;
|
||||||
|
|
||||||
|
@ -157,7 +157,7 @@ is_client_tagged(Client *c, Tag *t)
|
||||||
* \param c the client
|
* \param c the client
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
tag_client_with_current_selected(Client *c)
|
tag_client_with_current_selected(client_t *c)
|
||||||
{
|
{
|
||||||
Tag *tag;
|
Tag *tag;
|
||||||
VirtScreen vscreen = globalconf.screens[c->screen];
|
VirtScreen vscreen = globalconf.screens[c->screen];
|
||||||
|
@ -174,7 +174,7 @@ tag_client_with_current_selected(Client *c)
|
||||||
* \param r the rule
|
* \param r the rule
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
tag_client_with_rule(Client *c, rule_t *r)
|
tag_client_with_rule(client_t *c, rule_t *r)
|
||||||
{
|
{
|
||||||
Tag *tag;
|
Tag *tag;
|
||||||
bool matched = false;
|
bool matched = false;
|
||||||
|
@ -232,7 +232,7 @@ uicb_client_tag(int screen, char *arg)
|
||||||
{
|
{
|
||||||
int tag_id = -1;
|
int tag_id = -1;
|
||||||
Tag *tag, *target_tag;
|
Tag *tag, *target_tag;
|
||||||
Client *sel = globalconf.focus->client;
|
client_t *sel = globalconf.focus->client;
|
||||||
|
|
||||||
if(!sel)
|
if(!sel)
|
||||||
return;
|
return;
|
||||||
|
@ -265,7 +265,7 @@ uicb_client_tag(int screen, char *arg)
|
||||||
void
|
void
|
||||||
uicb_client_toggletag(int screen, char *arg)
|
uicb_client_toggletag(int screen, char *arg)
|
||||||
{
|
{
|
||||||
Client *sel = globalconf.focus->client;
|
client_t *sel = globalconf.focus->client;
|
||||||
int i;
|
int i;
|
||||||
Bool is_sticky = True;
|
Bool is_sticky = True;
|
||||||
Tag *tag, *target_tag;
|
Tag *tag, *target_tag;
|
||||||
|
|
10
tag.h
10
tag.h
|
@ -32,11 +32,11 @@ void tag_view(Tag *, bool);
|
||||||
void tag_view_byindex(int, int, bool);
|
void tag_view_byindex(int, int, bool);
|
||||||
void tag_push_to_screen(Tag *, int);
|
void tag_push_to_screen(Tag *, int);
|
||||||
Tag ** tags_get_current(int);
|
Tag ** tags_get_current(int);
|
||||||
void tag_client(Client *, Tag *);
|
void tag_client(client_t *, Tag *);
|
||||||
void untag_client(Client *, Tag *);
|
void untag_client(client_t *, Tag *);
|
||||||
bool is_client_tagged(Client *, Tag *);
|
bool is_client_tagged(client_t *, Tag *);
|
||||||
void tag_client_with_rule(Client *, rule_t *r);
|
void tag_client_with_rule(client_t *, rule_t *r);
|
||||||
void tag_client_with_current_selected(Client *);
|
void tag_client_with_current_selected(client_t *);
|
||||||
void tag_view_only_byindex(int, int);
|
void tag_view_only_byindex(int, int);
|
||||||
void tag_append_to_screen(Tag *, int);
|
void tag_append_to_screen(Tag *, int);
|
||||||
|
|
||||||
|
|
10
titlebar.c
10
titlebar.c
|
@ -35,7 +35,7 @@ extern AwesomeConf globalconf;
|
||||||
* \param c the client
|
* \param c the client
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
titlebar_init(Client *c)
|
titlebar_init(client_t *c)
|
||||||
{
|
{
|
||||||
int width;
|
int width;
|
||||||
|
|
||||||
|
@ -149,7 +149,7 @@ titlebar_geometry_remove(titlebar_t *t, area_t geometry)
|
||||||
* \param c the client
|
* \param c the client
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
titlebar_draw(Client *c)
|
titlebar_draw(client_t *c)
|
||||||
{
|
{
|
||||||
xcb_drawable_t dw = 0;
|
xcb_drawable_t dw = 0;
|
||||||
DrawCtx *ctx;
|
DrawCtx *ctx;
|
||||||
|
@ -228,7 +228,7 @@ titlebar_draw(Client *c)
|
||||||
* \param c the client
|
* \param c the client
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
titlebar_update_geometry_floating(Client *c)
|
titlebar_update_geometry_floating(client_t *c)
|
||||||
{
|
{
|
||||||
int width, x_offset = 0, y_offset = 0;
|
int width, x_offset = 0, y_offset = 0;
|
||||||
|
|
||||||
|
@ -340,7 +340,7 @@ titlebar_update_geometry_floating(Client *c)
|
||||||
* \param geometry the geometry the client will receive
|
* \param geometry the geometry the client will receive
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
titlebar_update_geometry(Client *c, area_t geometry)
|
titlebar_update_geometry(client_t *c, area_t geometry)
|
||||||
{
|
{
|
||||||
int width, x_offset = 0 , y_offset = 0;
|
int width, x_offset = 0 , y_offset = 0;
|
||||||
|
|
||||||
|
@ -468,7 +468,7 @@ titlebar_position_set(titlebar_t *t, position_t p)
|
||||||
void
|
void
|
||||||
uicb_client_toggletitlebar(int screen __attribute__ ((unused)), char *arg __attribute__ ((unused)))
|
uicb_client_toggletitlebar(int screen __attribute__ ((unused)), char *arg __attribute__ ((unused)))
|
||||||
{
|
{
|
||||||
Client *c = globalconf.focus->client;
|
client_t *c = globalconf.focus->client;
|
||||||
|
|
||||||
if(!c || !c->titlebar.sw)
|
if(!c || !c->titlebar.sw)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -24,10 +24,10 @@
|
||||||
|
|
||||||
#include "structs.h"
|
#include "structs.h"
|
||||||
|
|
||||||
void titlebar_init(Client *);
|
void titlebar_init(client_t *);
|
||||||
void titlebar_draw(Client *);
|
void titlebar_draw(client_t *);
|
||||||
void titlebar_update_geometry_floating(Client *);
|
void titlebar_update_geometry_floating(client_t *);
|
||||||
void titlebar_update_geometry(Client *, area_t);
|
void titlebar_update_geometry(client_t *, area_t);
|
||||||
area_t titlebar_geometry_add(titlebar_t *, area_t);
|
area_t titlebar_geometry_add(titlebar_t *, area_t);
|
||||||
area_t titlebar_geometry_remove(titlebar_t *, area_t);
|
area_t titlebar_geometry_remove(titlebar_t *, area_t);
|
||||||
void titlebar_position_set(titlebar_t *, position_t);
|
void titlebar_position_set(titlebar_t *, position_t);
|
||||||
|
|
2
uicb.c
2
uicb.c
|
@ -65,7 +65,7 @@ uicb_restart(int screen, char *arg __attribute__ ((unused)))
|
||||||
void
|
void
|
||||||
uicb_exec(int screen __attribute__ ((unused)), char *cmd)
|
uicb_exec(int screen __attribute__ ((unused)), char *cmd)
|
||||||
{
|
{
|
||||||
Client *c;
|
client_t *c;
|
||||||
char *args, *path;
|
char *args, *path;
|
||||||
|
|
||||||
/* remap all clients since some WM won't handle them otherwise */
|
/* remap all clients since some WM won't handle them otherwise */
|
||||||
|
|
|
@ -35,7 +35,7 @@ focusicon_draw(widget_t *widget, DrawCtx *ctx, int offset,
|
||||||
{
|
{
|
||||||
area_t area;
|
area_t area;
|
||||||
rule_t *r;
|
rule_t *r;
|
||||||
Client *sel = focus_get_current_client(widget->statusbar->screen);
|
client_t *sel = focus_get_current_client(widget->statusbar->screen);
|
||||||
NetWMIcon *icon;
|
NetWMIcon *icon;
|
||||||
|
|
||||||
if(!sel)
|
if(!sel)
|
||||||
|
|
|
@ -38,7 +38,7 @@ extern AwesomeConf globalconf;
|
||||||
static bool
|
static bool
|
||||||
isoccupied(Tag *t)
|
isoccupied(Tag *t)
|
||||||
{
|
{
|
||||||
Client *c;
|
client_t *c;
|
||||||
|
|
||||||
for(c = globalconf.clients; c; c = c->next)
|
for(c = globalconf.clients; c; c = c->next)
|
||||||
if(is_client_tagged(c, t) && !c->skip && c != globalconf.scratch.client)
|
if(is_client_tagged(c, t) && !c->skip && c != globalconf.scratch.client)
|
||||||
|
@ -50,7 +50,7 @@ isoccupied(Tag *t)
|
||||||
static bool
|
static bool
|
||||||
isurgent(Tag *t)
|
isurgent(Tag *t)
|
||||||
{
|
{
|
||||||
Client *c;
|
client_t *c;
|
||||||
|
|
||||||
for(c = globalconf.clients; c; c = c->next)
|
for(c = globalconf.clients; c; c = c->next)
|
||||||
if(is_client_tagged(c, t) && c->isurgent)
|
if(is_client_tagged(c, t) && c->isurgent)
|
||||||
|
@ -77,7 +77,7 @@ taglist_draw(widget_t *widget,
|
||||||
int used __attribute__ ((unused)))
|
int used __attribute__ ((unused)))
|
||||||
{
|
{
|
||||||
Tag *tag;
|
Tag *tag;
|
||||||
Client *sel = globalconf.focus->client;
|
client_t *sel = globalconf.focus->client;
|
||||||
VirtScreen vscreen = globalconf.screens[widget->statusbar->screen];
|
VirtScreen vscreen = globalconf.screens[widget->statusbar->screen];
|
||||||
int w = 0, flagsize;
|
int w = 0, flagsize;
|
||||||
style_t style;
|
style_t style;
|
||||||
|
|
|
@ -37,11 +37,11 @@ typedef enum
|
||||||
ShowFocus,
|
ShowFocus,
|
||||||
ShowTags,
|
ShowTags,
|
||||||
ShowAll,
|
ShowAll,
|
||||||
} ShowClient;
|
} Showclient_t;
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
ShowClient show;
|
Showclient_t show;
|
||||||
bool show_icons;
|
bool show_icons;
|
||||||
alignment_t align;
|
alignment_t align;
|
||||||
struct
|
struct
|
||||||
|
@ -53,7 +53,7 @@ typedef struct
|
||||||
} Data;
|
} Data;
|
||||||
|
|
||||||
static inline bool
|
static inline bool
|
||||||
tasklist_isvisible(Client *c, int screen, ShowClient show)
|
tasklist_isvisible(client_t *c, int screen, Showclient_t show)
|
||||||
{
|
{
|
||||||
if(c->skip || c->skiptb)
|
if(c->skip || c->skiptb)
|
||||||
return false;
|
return false;
|
||||||
|
@ -73,7 +73,7 @@ tasklist_isvisible(Client *c, int screen, ShowClient show)
|
||||||
static int
|
static int
|
||||||
tasklist_draw(widget_t *widget, DrawCtx *ctx, int offset, int used)
|
tasklist_draw(widget_t *widget, DrawCtx *ctx, int offset, int used)
|
||||||
{
|
{
|
||||||
Client *c;
|
client_t *c;
|
||||||
Data *d = widget->data;
|
Data *d = widget->data;
|
||||||
rule_t *r;
|
rule_t *r;
|
||||||
area_t area;
|
area_t area;
|
||||||
|
@ -193,7 +193,7 @@ static void
|
||||||
tasklist_button_press(widget_t *widget, xcb_button_press_event_t *ev)
|
tasklist_button_press(widget_t *widget, xcb_button_press_event_t *ev)
|
||||||
{
|
{
|
||||||
Button *b;
|
Button *b;
|
||||||
Client *c;
|
client_t *c;
|
||||||
Data *d = widget->data;
|
Data *d = widget->data;
|
||||||
Tag *tag;
|
Tag *tag;
|
||||||
int n = 0, box_width = 0, i, ci = 0;
|
int n = 0, box_width = 0, i, ci = 0;
|
||||||
|
|
Loading…
Reference in New Issue