Improve the call signature of get_current_tag and get_current_layout.
This commit is contained in:
parent
8264f15fc6
commit
2b5ba1f16f
18
client.c
18
client.c
|
@ -177,7 +177,7 @@ void
|
||||||
focus(Client *c, Bool selscreen, awesome_config *awesomeconf, int screen)
|
focus(Client *c, Bool selscreen, awesome_config *awesomeconf, int screen)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
Tag *tag = get_current_tag(awesomeconf->screens[screen].tags, awesomeconf->screens[screen].ntags);
|
Tag *tag = get_current_tag(awesomeconf->screens[screen]);
|
||||||
|
|
||||||
/* if c is NULL or invisible, take next client in the stack */
|
/* if c is NULL or invisible, take next client in the stack */
|
||||||
if((!c && selscreen) || (c && !isvisible(c, screen, awesomeconf->screens[screen].tags, awesomeconf->screens[screen].ntags)))
|
if((!c && selscreen) || (c && !isvisible(c, screen, awesomeconf->screens[screen].tags, awesomeconf->screens[screen].ntags)))
|
||||||
|
@ -436,7 +436,7 @@ client_resize(Client *c, int x, int y, int w, int h, awesome_config *awesomeconf
|
||||||
c->h = wc.height = h;
|
c->h = wc.height = h;
|
||||||
if(!volatile_coords
|
if(!volatile_coords
|
||||||
&& (c->isfloating
|
&& (c->isfloating
|
||||||
|| get_current_layout(awesomeconf->screens[c->screen].tags, awesomeconf->screens[c->screen].ntags)->arrange == layout_floating))
|
|| get_current_layout(awesomeconf->screens[c->screen])->arrange == layout_floating))
|
||||||
{
|
{
|
||||||
c->rx = c->x;
|
c->rx = c->x;
|
||||||
c->ry = c->y;
|
c->ry = c->y;
|
||||||
|
@ -496,7 +496,7 @@ client_unmanage(Client *c, long state, awesome_config *awesomeconf)
|
||||||
XGrabServer(c->display);
|
XGrabServer(c->display);
|
||||||
XConfigureWindow(c->display, c->win, CWBorderWidth, &wc); /* restore border */
|
XConfigureWindow(c->display, c->win, CWBorderWidth, &wc); /* restore border */
|
||||||
client_detach(&awesomeconf->clients, c);
|
client_detach(&awesomeconf->clients, c);
|
||||||
if(get_current_tag(awesomeconf->screens[c->screen].tags, awesomeconf->screens[c->screen].ntags)->client_sel == c)
|
if(get_current_tag(awesomeconf->screens[c->screen])->client_sel == c)
|
||||||
focus(NULL, True, awesomeconf, c->screen);
|
focus(NULL, True, awesomeconf, c->screen);
|
||||||
for(tag = 0; tag < awesomeconf->screens[c->screen].ntags; tag++)
|
for(tag = 0; tag < awesomeconf->screens[c->screen].ntags; tag++)
|
||||||
if(awesomeconf->screens[c->screen].tags[tag].client_sel == c)
|
if(awesomeconf->screens[c->screen].tags[tag].client_sel == c)
|
||||||
|
@ -623,7 +623,7 @@ uicb_client_settrans(awesome_config *awesomeconf,
|
||||||
unsigned long n, left;
|
unsigned long n, left;
|
||||||
unsigned int current_opacity_raw = 0;
|
unsigned int current_opacity_raw = 0;
|
||||||
int set_prop = 0;
|
int set_prop = 0;
|
||||||
Client *sel = get_current_tag(awesomeconf->screens[screen].tags, awesomeconf->screens[screen].ntags)->client_sel;
|
Client *sel = get_current_tag(awesomeconf->screens[screen])->client_sel;
|
||||||
|
|
||||||
if(!sel)
|
if(!sel)
|
||||||
return;
|
return;
|
||||||
|
@ -680,7 +680,7 @@ uicb_client_swapnext(awesome_config *awesomeconf,
|
||||||
int screen,
|
int screen,
|
||||||
const char *arg __attribute__ ((unused)))
|
const char *arg __attribute__ ((unused)))
|
||||||
{
|
{
|
||||||
Client *next, *sel = get_current_tag(awesomeconf->screens[screen].tags, awesomeconf->screens[screen].ntags)->client_sel;
|
Client *next, *sel = get_current_tag(awesomeconf->screens[screen])->client_sel;
|
||||||
|
|
||||||
if(!sel)
|
if(!sel)
|
||||||
return;
|
return;
|
||||||
|
@ -700,7 +700,7 @@ uicb_client_swapprev(awesome_config *awesomeconf,
|
||||||
int screen,
|
int screen,
|
||||||
const char *arg __attribute__ ((unused)))
|
const char *arg __attribute__ ((unused)))
|
||||||
{
|
{
|
||||||
Client *prev, *sel = get_current_tag(awesomeconf->screens[screen].tags, awesomeconf->screens[screen].ntags)->client_sel;
|
Client *prev, *sel = get_current_tag(awesomeconf->screens[screen])->client_sel;
|
||||||
|
|
||||||
if(!sel)
|
if(!sel)
|
||||||
return;
|
return;
|
||||||
|
@ -725,9 +725,9 @@ uicb_client_moveresize(awesome_config *awesomeconf,
|
||||||
int mx, my, dx, dy, nmx, nmy;
|
int mx, my, dx, dy, nmx, nmy;
|
||||||
unsigned int dui;
|
unsigned int dui;
|
||||||
Window dummy;
|
Window dummy;
|
||||||
Client *sel = get_current_tag(awesomeconf->screens[screen].tags, awesomeconf->screens[screen].ntags)->client_sel;
|
Client *sel = get_current_tag(awesomeconf->screens[screen])->client_sel;
|
||||||
|
|
||||||
if(get_current_layout(awesomeconf->screens[screen].tags, awesomeconf->screens[screen].ntags)->arrange != layout_floating)
|
if(get_current_layout(awesomeconf->screens[screen])->arrange != layout_floating)
|
||||||
if(!sel || !sel->isfloating || sel->isfixed || !arg)
|
if(!sel || !sel->isfloating || sel->isfixed || !arg)
|
||||||
return;
|
return;
|
||||||
if(sscanf(arg, "%s %s %s %s", x, y, w, h) != 4)
|
if(sscanf(arg, "%s %s %s %s", x, y, w, h) != 4)
|
||||||
|
@ -763,7 +763,7 @@ uicb_client_kill(awesome_config *awesomeconf,
|
||||||
const char *arg __attribute__ ((unused)))
|
const char *arg __attribute__ ((unused)))
|
||||||
{
|
{
|
||||||
XEvent ev;
|
XEvent ev;
|
||||||
Client *sel = get_current_tag(awesomeconf->screens[screen].tags, awesomeconf->screens[screen].ntags)->client_sel;
|
Client *sel = get_current_tag(awesomeconf->screens[screen])->client_sel;
|
||||||
|
|
||||||
if(!sel)
|
if(!sel)
|
||||||
return;
|
return;
|
||||||
|
|
8
event.c
8
event.c
|
@ -141,8 +141,7 @@ handle_event_configurerequest(XEvent * e, awesome_config *awesomeconf)
|
||||||
if(ev->value_mask & CWBorderWidth)
|
if(ev->value_mask & CWBorderWidth)
|
||||||
c->border = ev->border_width;
|
c->border = ev->border_width;
|
||||||
if(c->isfixed || c->isfloating
|
if(c->isfixed || c->isfloating
|
||||||
|| get_current_layout(awesomeconf->screens[c->screen].tags,
|
|| get_current_layout(awesomeconf->screens[c->screen])->arrange == layout_floating)
|
||||||
awesomeconf->screens[c->screen].ntags)->arrange == layout_floating)
|
|
||||||
{
|
{
|
||||||
if(ev->value_mask & CWX)
|
if(ev->value_mask & CWX)
|
||||||
c->rx = c->x = ev->x;
|
c->rx = c->x = ev->x;
|
||||||
|
@ -237,8 +236,7 @@ handle_event_enternotify(XEvent * e, awesome_config *awesomeconf)
|
||||||
{
|
{
|
||||||
focus(c, ev->same_screen, awesomeconf, c->screen);
|
focus(c, ev->same_screen, awesomeconf, c->screen);
|
||||||
if (c->isfloating
|
if (c->isfloating
|
||||||
|| get_current_layout(awesomeconf->screens[c->screen].tags,
|
|| get_current_layout(awesomeconf->screens[c->screen])->arrange == layout_floating)
|
||||||
awesomeconf->screens[c->screen].ntags)->arrange == layout_floating)
|
|
||||||
window_grabbuttons(c->display, c->phys_screen, c->win,
|
window_grabbuttons(c->display, c->phys_screen, c->win,
|
||||||
True, False, awesomeconf->buttons.root,
|
True, False, awesomeconf->buttons.root,
|
||||||
awesomeconf->buttons.client, awesomeconf->numlockmask);
|
awesomeconf->buttons.client, awesomeconf->numlockmask);
|
||||||
|
@ -366,7 +364,7 @@ handle_event_propertynotify(XEvent * e, awesome_config *awesomeconf)
|
||||||
if(ev->atom == XA_WM_NAME || ev->atom == XInternAtom(c->display, "_NET_WM_NAME", False))
|
if(ev->atom == XA_WM_NAME || ev->atom == XInternAtom(c->display, "_NET_WM_NAME", False))
|
||||||
{
|
{
|
||||||
updatetitle(c);
|
updatetitle(c);
|
||||||
if(c == get_current_tag(awesomeconf->screens[c->screen].tags, awesomeconf->screens[c->screen].ntags)->client_sel)
|
if(c == get_current_tag(awesomeconf->screens[c->screen])->client_sel)
|
||||||
drawstatusbar(awesomeconf, c->screen);
|
drawstatusbar(awesomeconf, c->screen);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
39
layout.c
39
layout.c
|
@ -30,18 +30,17 @@
|
||||||
#include "layouts/floating.h"
|
#include "layouts/floating.h"
|
||||||
|
|
||||||
/** Find the index of the first currently selected tag
|
/** Find the index of the first currently selected tag
|
||||||
* \param tags the array of tags to search
|
* \param screen the screen to search
|
||||||
* \param ntags number of elements in above array
|
|
||||||
* \return tag
|
* \return tag
|
||||||
*/
|
*/
|
||||||
Tag *
|
Tag *
|
||||||
get_current_tag(Tag *tags, int ntags)
|
get_current_tag(VirtScreen screen)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for(i = 0; i < ntags; i++)
|
for(i = 0; i < screen.ntags; i++)
|
||||||
if(tags[i].selected == True)
|
if(screen.tags[i].selected == True)
|
||||||
return &tags[i];
|
return &screen.tags[i];
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -54,7 +53,7 @@ void
|
||||||
arrange(awesome_config *awesomeconf, int screen)
|
arrange(awesome_config *awesomeconf, int screen)
|
||||||
{
|
{
|
||||||
Client *c;
|
Client *c;
|
||||||
Tag *curtag = get_current_tag(awesomeconf->screens[screen].tags, awesomeconf->screens[screen].ntags);
|
Tag *curtag = get_current_tag(awesomeconf->screens[screen]);
|
||||||
|
|
||||||
for(c = awesomeconf->clients; c; c = c->next)
|
for(c = awesomeconf->clients; c; c = c->next)
|
||||||
{
|
{
|
||||||
|
@ -71,11 +70,11 @@ arrange(awesome_config *awesomeconf, int screen)
|
||||||
}
|
}
|
||||||
|
|
||||||
Layout *
|
Layout *
|
||||||
get_current_layout(Tag *tags, int ntags)
|
get_current_layout(VirtScreen screen)
|
||||||
{
|
{
|
||||||
Tag *curtag;
|
Tag *curtag;
|
||||||
|
|
||||||
if ((curtag = get_current_tag(tags, ntags)))
|
if ((curtag = get_current_tag(screen)))
|
||||||
return curtag->layout;
|
return curtag->layout;
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -86,7 +85,7 @@ uicb_client_focusnext(awesome_config * awesomeconf,
|
||||||
int screen,
|
int screen,
|
||||||
const char *arg __attribute__ ((unused)))
|
const char *arg __attribute__ ((unused)))
|
||||||
{
|
{
|
||||||
Client *c, *sel = get_current_tag(awesomeconf->screens[screen].tags, awesomeconf->screens[screen].ntags)->client_sel;
|
Client *c, *sel = get_current_tag(awesomeconf->screens[screen])->client_sel;
|
||||||
|
|
||||||
if(!sel)
|
if(!sel)
|
||||||
return;
|
return;
|
||||||
|
@ -105,7 +104,7 @@ uicb_client_focusprev(awesome_config *awesomeconf,
|
||||||
int screen,
|
int screen,
|
||||||
const char *arg __attribute__ ((unused)))
|
const char *arg __attribute__ ((unused)))
|
||||||
{
|
{
|
||||||
Client *c, *sel = get_current_tag(awesomeconf->screens[screen].tags, awesomeconf->screens[screen].ntags)->client_sel;
|
Client *c, *sel = get_current_tag(awesomeconf->screens[screen])->client_sel;
|
||||||
|
|
||||||
if(!sel)
|
if(!sel)
|
||||||
return;
|
return;
|
||||||
|
@ -144,7 +143,7 @@ loadawesomeprops(awesome_config * awesomeconf, int screen)
|
||||||
void
|
void
|
||||||
restack(awesome_config *awesomeconf, int screen)
|
restack(awesome_config *awesomeconf, int screen)
|
||||||
{
|
{
|
||||||
Client *c, *sel = get_current_tag(awesomeconf->screens[screen].tags, awesomeconf->screens[screen].ntags)->client_sel;
|
Client *c, *sel = get_current_tag(awesomeconf->screens[screen])->client_sel;
|
||||||
XEvent ev;
|
XEvent ev;
|
||||||
XWindowChanges wc;
|
XWindowChanges wc;
|
||||||
|
|
||||||
|
@ -156,9 +155,9 @@ restack(awesome_config *awesomeconf, int screen)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(sel->isfloating ||
|
if(sel->isfloating ||
|
||||||
get_current_layout(awesomeconf->screens[screen].tags, awesomeconf->screens[screen].ntags)->arrange == layout_floating)
|
get_current_layout(awesomeconf->screens[screen])->arrange == layout_floating)
|
||||||
XRaiseWindow(sel->display, sel->win);
|
XRaiseWindow(sel->display, sel->win);
|
||||||
if(!(get_current_layout(awesomeconf->screens[screen].tags, awesomeconf->screens[screen].ntags)->arrange == layout_floating))
|
if(!(get_current_layout(awesomeconf->screens[screen])->arrange == layout_floating))
|
||||||
{
|
{
|
||||||
wc.stack_mode = Below;
|
wc.stack_mode = Below;
|
||||||
wc.sibling = awesomeconf->screens[screen].statusbar.window;
|
wc.sibling = awesomeconf->screens[screen].statusbar.window;
|
||||||
|
@ -209,7 +208,7 @@ uicb_tag_setlayout(awesome_config * awesomeconf,
|
||||||
{
|
{
|
||||||
/* compute current index */
|
/* compute current index */
|
||||||
for(i = 0; i < awesomeconf->screens[screen].nlayouts &&
|
for(i = 0; i < awesomeconf->screens[screen].nlayouts &&
|
||||||
&awesomeconf->screens[screen].layouts[i] != get_current_layout(awesomeconf->screens[screen].tags, awesomeconf->screens[screen].ntags); i++);
|
&awesomeconf->screens[screen].layouts[i] != get_current_layout(awesomeconf->screens[screen]); i++);
|
||||||
i = compute_new_value_from_arg(arg, (double) i);
|
i = compute_new_value_from_arg(arg, (double) i);
|
||||||
if(i >= awesomeconf->screens[screen].nlayouts)
|
if(i >= awesomeconf->screens[screen].nlayouts)
|
||||||
i = 0;
|
i = 0;
|
||||||
|
@ -223,7 +222,7 @@ uicb_tag_setlayout(awesome_config * awesomeconf,
|
||||||
if (awesomeconf->screens[screen].tags[j].selected)
|
if (awesomeconf->screens[screen].tags[j].selected)
|
||||||
awesomeconf->screens[screen].tags[j].layout = &awesomeconf->screens[screen].layouts[i];
|
awesomeconf->screens[screen].tags[j].layout = &awesomeconf->screens[screen].layouts[i];
|
||||||
|
|
||||||
if(get_current_tag(awesomeconf->screens[screen].tags, awesomeconf->screens[screen].ntags)->client_sel)
|
if(get_current_tag(awesomeconf->screens[screen])->client_sel)
|
||||||
arrange(awesomeconf, screen);
|
arrange(awesomeconf, screen);
|
||||||
else
|
else
|
||||||
drawstatusbar(awesomeconf, screen);
|
drawstatusbar(awesomeconf, screen);
|
||||||
|
@ -234,7 +233,7 @@ uicb_tag_setlayout(awesome_config * awesomeconf,
|
||||||
static void
|
static void
|
||||||
maximize(int x, int y, int w, int h, awesome_config *awesomeconf, int screen)
|
maximize(int x, int y, int w, int h, awesome_config *awesomeconf, int screen)
|
||||||
{
|
{
|
||||||
Client *sel = get_current_tag(awesomeconf->screens[screen].tags, awesomeconf->screens[screen].ntags)->client_sel;
|
Client *sel = get_current_tag(awesomeconf->screens[screen])->client_sel;
|
||||||
|
|
||||||
if(!sel)
|
if(!sel)
|
||||||
return;
|
return;
|
||||||
|
@ -272,7 +271,7 @@ uicb_client_toggleverticalmax(awesome_config *awesomeconf,
|
||||||
int screen,
|
int screen,
|
||||||
const char *arg __attribute__ ((unused)))
|
const char *arg __attribute__ ((unused)))
|
||||||
{
|
{
|
||||||
Client *sel = get_current_tag(awesomeconf->screens[screen].tags, awesomeconf->screens[screen].ntags)->client_sel;
|
Client *sel = get_current_tag(awesomeconf->screens[screen])->client_sel;
|
||||||
ScreenInfo *si = get_screen_info(awesomeconf->display, screen, &awesomeconf->screens[screen].statusbar, &awesomeconf->screens[screen].padding);
|
ScreenInfo *si = get_screen_info(awesomeconf->display, screen, &awesomeconf->screens[screen].statusbar, &awesomeconf->screens[screen].padding);
|
||||||
|
|
||||||
if(sel)
|
if(sel)
|
||||||
|
@ -290,7 +289,7 @@ uicb_client_togglehorizontalmax(awesome_config *awesomeconf,
|
||||||
int screen,
|
int screen,
|
||||||
const char *arg __attribute__ ((unused)))
|
const char *arg __attribute__ ((unused)))
|
||||||
{
|
{
|
||||||
Client *sel = get_current_tag(awesomeconf->screens[screen].tags, awesomeconf->screens[screen].ntags)->client_sel;
|
Client *sel = get_current_tag(awesomeconf->screens[screen])->client_sel;
|
||||||
ScreenInfo *si = get_screen_info(awesomeconf->display, screen, &awesomeconf->screens[screen].statusbar, &awesomeconf->screens[screen].padding);
|
ScreenInfo *si = get_screen_info(awesomeconf->display, screen, &awesomeconf->screens[screen].statusbar, &awesomeconf->screens[screen].padding);
|
||||||
|
|
||||||
if(sel)
|
if(sel)
|
||||||
|
@ -307,7 +306,7 @@ uicb_client_zoom(awesome_config *awesomeconf,
|
||||||
int screen,
|
int screen,
|
||||||
const char *arg __attribute__ ((unused)))
|
const char *arg __attribute__ ((unused)))
|
||||||
{
|
{
|
||||||
Client *sel = get_current_tag(awesomeconf->screens[screen].tags, awesomeconf->screens[screen].ntags)->client_sel;
|
Client *sel = get_current_tag(awesomeconf->screens[screen])->client_sel;
|
||||||
|
|
||||||
if(awesomeconf->clients == sel)
|
if(awesomeconf->clients == sel)
|
||||||
for(sel = sel->next; sel && !isvisible(sel, screen, awesomeconf->screens[screen].tags, awesomeconf->screens[screen].ntags); sel = sel->next);
|
for(sel = sel->next; sel && !isvisible(sel, screen, awesomeconf->screens[screen].tags, awesomeconf->screens[screen].ntags); sel = sel->next);
|
||||||
|
|
4
layout.h
4
layout.h
|
@ -27,8 +27,8 @@
|
||||||
#define AWESOMEPROPS_ATOM(disp) XInternAtom(disp, "_AWESOME_PROPERTIES", False)
|
#define AWESOMEPROPS_ATOM(disp) XInternAtom(disp, "_AWESOME_PROPERTIES", False)
|
||||||
|
|
||||||
void arrange(awesome_config *, int);
|
void arrange(awesome_config *, int);
|
||||||
Layout * get_current_layout(Tag *, int);
|
Layout * get_current_layout(VirtScreen);
|
||||||
Tag * get_current_tag(Tag *, int);
|
Tag * get_current_tag(VirtScreen);
|
||||||
void restack(awesome_config *, int);
|
void restack(awesome_config *, int);
|
||||||
void loadawesomeprops(awesome_config *, int);
|
void loadawesomeprops(awesome_config *, int);
|
||||||
void saveawesomeprops(awesome_config *, int);
|
void saveawesomeprops(awesome_config *, int);
|
||||||
|
|
|
@ -33,7 +33,7 @@ uicb_tag_setnmaster(awesome_config *awesomeconf,
|
||||||
int screen,
|
int screen,
|
||||||
const char * arg)
|
const char * arg)
|
||||||
{
|
{
|
||||||
Tag *curtag = get_current_tag(awesomeconf->screens[screen].tags, awesomeconf->screens[screen].ntags);
|
Tag *curtag = get_current_tag(awesomeconf->screens[screen]);
|
||||||
Layout *curlay = curtag->layout;
|
Layout *curlay = curtag->layout;
|
||||||
|
|
||||||
if(!arg || (curlay->arrange != layout_tile && curlay->arrange != layout_tileleft))
|
if(!arg || (curlay->arrange != layout_tile && curlay->arrange != layout_tileleft))
|
||||||
|
@ -50,7 +50,7 @@ uicb_tag_setncol(awesome_config *awesomeconf,
|
||||||
int screen,
|
int screen,
|
||||||
const char * arg)
|
const char * arg)
|
||||||
{
|
{
|
||||||
Tag *curtag = get_current_tag(awesomeconf->screens[screen].tags, awesomeconf->screens[screen].ntags);
|
Tag *curtag = get_current_tag(awesomeconf->screens[screen]);
|
||||||
Layout *curlay = curtag->layout;
|
Layout *curlay = curtag->layout;
|
||||||
|
|
||||||
if(!arg || (curlay->arrange != layout_tile && curlay->arrange != layout_tileleft))
|
if(!arg || (curlay->arrange != layout_tile && curlay->arrange != layout_tileleft))
|
||||||
|
@ -68,7 +68,7 @@ uicb_tag_setmwfact(awesome_config * awesomeconf,
|
||||||
const char *arg)
|
const char *arg)
|
||||||
{
|
{
|
||||||
char *newarg;
|
char *newarg;
|
||||||
Tag *curtag = get_current_tag(awesomeconf->screens[screen].tags, awesomeconf->screens[screen].ntags);
|
Tag *curtag = get_current_tag(awesomeconf->screens[screen]);
|
||||||
Layout *curlay = curtag->layout;
|
Layout *curlay = curtag->layout;
|
||||||
|
|
||||||
if(!arg || (curlay->arrange != layout_tile && curlay->arrange != layout_tileleft))
|
if(!arg || (curlay->arrange != layout_tile && curlay->arrange != layout_tileleft))
|
||||||
|
@ -105,7 +105,7 @@ _tile(awesome_config *awesomeconf, int screen, const Bool right)
|
||||||
int real_ncol = 1, win_by_col = 1, current_col = 0;
|
int real_ncol = 1, win_by_col = 1, current_col = 0;
|
||||||
ScreenInfo *screens_info = NULL;
|
ScreenInfo *screens_info = NULL;
|
||||||
Client *c;
|
Client *c;
|
||||||
Tag *curtag = get_current_tag(awesomeconf->screens[screen].tags, awesomeconf->screens[screen].ntags);
|
Tag *curtag = get_current_tag(awesomeconf->screens[screen]);
|
||||||
|
|
||||||
screens_info = get_screen_info(awesomeconf->display, screen, &awesomeconf->screens[screen].statusbar, &awesomeconf->screens[screen].padding);
|
screens_info = get_screen_info(awesomeconf->display, screen, &awesomeconf->screens[screen].statusbar, &awesomeconf->screens[screen].padding);
|
||||||
|
|
||||||
|
|
8
mouse.c
8
mouse.c
|
@ -36,12 +36,12 @@ uicb_client_movemouse(awesome_config *awesomeconf, int screen, const char *arg _
|
||||||
Window dummy;
|
Window dummy;
|
||||||
XEvent ev;
|
XEvent ev;
|
||||||
ScreenInfo *si;
|
ScreenInfo *si;
|
||||||
Client *c = get_current_tag(awesomeconf->screens[screen].tags, awesomeconf->screens[screen].ntags)->client_sel;
|
Client *c = get_current_tag(awesomeconf->screens[screen])->client_sel;
|
||||||
|
|
||||||
if(!c)
|
if(!c)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if((get_current_layout(awesomeconf->screens[screen].tags, awesomeconf->screens[screen].ntags)->arrange != layout_floating)
|
if((get_current_layout(awesomeconf->screens[screen])->arrange != layout_floating)
|
||||||
&& !c->isfloating)
|
&& !c->isfloating)
|
||||||
uicb_client_togglefloating(awesomeconf, screen, "DUMMY");
|
uicb_client_togglefloating(awesomeconf, screen, "DUMMY");
|
||||||
else
|
else
|
||||||
|
@ -96,12 +96,12 @@ uicb_client_resizemouse(awesome_config *awesomeconf, int screen, const char *arg
|
||||||
{
|
{
|
||||||
int ocx, ocy, nw, nh;
|
int ocx, ocy, nw, nh;
|
||||||
XEvent ev;
|
XEvent ev;
|
||||||
Client *c = get_current_tag(awesomeconf->screens[screen].tags, awesomeconf->screens[screen].ntags)->client_sel;
|
Client *c = get_current_tag(awesomeconf->screens[screen])->client_sel;
|
||||||
|
|
||||||
if(!c)
|
if(!c)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if((get_current_layout(awesomeconf->screens[screen].tags, awesomeconf->screens[screen].ntags)->arrange != layout_floating)
|
if((get_current_layout(awesomeconf->screens[screen])->arrange != layout_floating)
|
||||||
&& !c->isfloating)
|
&& !c->isfloating)
|
||||||
uicb_client_togglefloating(awesomeconf, screen, "DUMMY");
|
uicb_client_togglefloating(awesomeconf, screen, "DUMMY");
|
||||||
else
|
else
|
||||||
|
|
5
screen.c
5
screen.c
|
@ -262,8 +262,7 @@ uicb_screen_focus(awesome_config *awesomeconf, int screen, const char *arg)
|
||||||
if (new_screen > (numscreens - 1))
|
if (new_screen > (numscreens - 1))
|
||||||
new_screen = 0;
|
new_screen = 0;
|
||||||
|
|
||||||
focus(get_current_tag(awesomeconf->screens[new_screen].tags,
|
focus(get_current_tag(awesomeconf->screens[new_screen])->client_sel,
|
||||||
awesomeconf->screens[new_screen].ntags)->client_sel,
|
|
||||||
True, awesomeconf, new_screen);
|
True, awesomeconf, new_screen);
|
||||||
|
|
||||||
move_mouse_pointer_to_screen(awesomeconf->display, new_screen);
|
move_mouse_pointer_to_screen(awesomeconf->display, new_screen);
|
||||||
|
@ -280,7 +279,7 @@ uicb_client_movetoscreen(awesome_config * awesomeconf,
|
||||||
const char *arg)
|
const char *arg)
|
||||||
{
|
{
|
||||||
int new_screen, prev_screen;
|
int new_screen, prev_screen;
|
||||||
Client *sel = get_current_tag(awesomeconf->screens[screen].tags, awesomeconf->screens[screen].ntags)->client_sel;
|
Client *sel = get_current_tag(awesomeconf->screens[screen])->client_sel;
|
||||||
|
|
||||||
if(!sel || !XineramaIsActive(awesomeconf->display))
|
if(!sel || !XineramaIsActive(awesomeconf->display))
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -50,7 +50,7 @@ void
|
||||||
drawstatusbar(awesome_config *awesomeconf, int screen)
|
drawstatusbar(awesome_config *awesomeconf, int screen)
|
||||||
{
|
{
|
||||||
int z, i, x = 0, y = 0, w;
|
int z, i, x = 0, y = 0, w;
|
||||||
Client *sel = get_current_tag(awesomeconf->screens[screen].tags, awesomeconf->screens[screen].ntags)->client_sel;
|
Client *sel = get_current_tag(awesomeconf->screens[screen])->client_sel;
|
||||||
Drawable drawable;
|
Drawable drawable;
|
||||||
int phys_screen = get_phys_screen(awesomeconf->display, screen);
|
int phys_screen = get_phys_screen(awesomeconf->display, screen);
|
||||||
|
|
||||||
|
@ -119,7 +119,7 @@ drawstatusbar(awesome_config *awesomeconf, int screen)
|
||||||
awesomeconf->screens[screen].statusbar.width,
|
awesomeconf->screens[screen].statusbar.width,
|
||||||
awesomeconf->screens[screen].statusbar.height,
|
awesomeconf->screens[screen].statusbar.height,
|
||||||
awesomeconf->screens[screen].font,
|
awesomeconf->screens[screen].font,
|
||||||
get_current_layout(awesomeconf->screens[screen].tags, awesomeconf->screens[screen].ntags)->symbol,
|
get_current_layout(awesomeconf->screens[screen])->symbol,
|
||||||
awesomeconf->screens[screen].colors_normal);
|
awesomeconf->screens[screen].colors_normal);
|
||||||
z = x + awesomeconf->screens[screen].statusbar.txtlayoutwidth;
|
z = x + awesomeconf->screens[screen].statusbar.txtlayoutwidth;
|
||||||
w = textwidth(awesomeconf->display, awesomeconf->screens[screen].font, awesomeconf->screens[screen].statustext);
|
w = textwidth(awesomeconf->display, awesomeconf->screens[screen].font, awesomeconf->screens[screen].statustext);
|
||||||
|
|
6
tag.c
6
tag.c
|
@ -69,7 +69,7 @@ uicb_client_tag(awesome_config *awesomeconf,
|
||||||
const char *arg)
|
const char *arg)
|
||||||
{
|
{
|
||||||
int i, tag_id = -1;
|
int i, tag_id = -1;
|
||||||
Client *sel = get_current_tag(awesomeconf->screens[screen].tags, awesomeconf->screens[screen].ntags)->client_sel;
|
Client *sel = get_current_tag(awesomeconf->screens[screen])->client_sel;
|
||||||
|
|
||||||
if(!sel)
|
if(!sel)
|
||||||
return;
|
return;
|
||||||
|
@ -100,7 +100,7 @@ uicb_client_togglefloating(awesome_config * awesomeconf,
|
||||||
int screen,
|
int screen,
|
||||||
const char *arg __attribute__ ((unused)))
|
const char *arg __attribute__ ((unused)))
|
||||||
{
|
{
|
||||||
Client *sel = get_current_tag(awesomeconf->screens[screen].tags, awesomeconf->screens[screen].ntags)->client_sel;
|
Client *sel = get_current_tag(awesomeconf->screens[screen])->client_sel;
|
||||||
|
|
||||||
if(!sel)
|
if(!sel)
|
||||||
return;
|
return;
|
||||||
|
@ -125,7 +125,7 @@ uicb_client_toggletag(awesome_config *awesomeconf,
|
||||||
int screen,
|
int screen,
|
||||||
const char *arg)
|
const char *arg)
|
||||||
{
|
{
|
||||||
Client *sel = get_current_tag(awesomeconf->screens[screen].tags, awesomeconf->screens[screen].ntags)->client_sel;
|
Client *sel = get_current_tag(awesomeconf->screens[screen])->client_sel;
|
||||||
int i, j;
|
int i, j;
|
||||||
|
|
||||||
if(!sel)
|
if(!sel)
|
||||||
|
|
Loading…
Reference in New Issue