screen/client: Add y in the if of screen_get_sel and client_moveresize for find the screen verticaly
This commit is contained in:
parent
af399b9f49
commit
8eec996d1b
@ -458,7 +458,10 @@ client_moveresize(Client *c, XRectangle geo, bool r)
|
||||
/* Set the client screen */
|
||||
for(i = 0; i < screen_count(); ++i)
|
||||
if(geo.x >= screen_get_geo(i).x
|
||||
&& geo.x < screen_get_geo(i).x + screen_get_geo(i).width)
|
||||
&& geo.x < screen_get_geo(i).x + screen_get_geo(i).width
|
||||
&& geo.y >= screen_get_geo(i).y - INFOBARH - TBARH
|
||||
&& geo.y < screen_get_geo(i).y - INFOBARH - TBARH + screen_get_geo(i).height + INFOBARH)
|
||||
|
||||
c->screen = i;
|
||||
|
||||
frame_moveresize(c, geo);
|
||||
|
||||
@ -478,7 +478,6 @@ init_conf(void)
|
||||
tags[j][conf.ntag[j]].resizehint = cfg_getbool(cfgtmp, "resizehint");
|
||||
tags[j][conf.ntag[j]].layout = layout_name_to_struct(conf.layout, cfg_getstr(cfgtmp, "layout"), conf.nlayout);
|
||||
}
|
||||
|
||||
for(i = 0; i < screen_count(); ++i)
|
||||
if(!conf.ntag[i] || conf.ntag[i] > MAXTAG)
|
||||
{
|
||||
|
||||
@ -65,7 +65,7 @@ buttonpress(XButtonEvent *ev)
|
||||
/* Root */
|
||||
if(ev->window == root)
|
||||
for(i = 0; i < conf.root.nmouse; ++i)
|
||||
if(conf.root.mouse[i].tag == seltag[selscreen]
|
||||
if(conf.root.mouse[i].tag == seltag[screen_get_sel()]
|
||||
|| conf.root.mouse[i].tag < 0)
|
||||
if(ev->button == conf.root.mouse[i].button)
|
||||
if(conf.root.mouse[i].func)
|
||||
|
||||
@ -46,7 +46,6 @@ init(void)
|
||||
init_root();
|
||||
init_atom();
|
||||
infobar_init();
|
||||
screen_init();
|
||||
grabkeys();
|
||||
|
||||
/* Warning about font */
|
||||
|
||||
@ -531,7 +531,6 @@ uicb_togglemax(uicb_t cmd)
|
||||
client_moveresize(sel, geo, False);
|
||||
sel->max = False;
|
||||
}
|
||||
arrange();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
15
src/screen.c
15
src/screen.c
@ -98,8 +98,9 @@ screen_get_sel(void)
|
||||
XQueryPointer(dpy, root, &w, &w, &x, &y, &d, &d, &du);
|
||||
|
||||
for(i = 0; i < screen_count(); ++i)
|
||||
if(x >= screen_get_geo(i).x
|
||||
&& x < screen_get_geo(i).x + screen_get_geo(i).width)
|
||||
if((x >= screen_get_geo(i).x && x < screen_get_geo(i).x + screen_get_geo(i).width)
|
||||
&& (y >= screen_get_geo(i).y - INFOBARH - TBARH
|
||||
&& y < screen_get_geo(i).y - INFOBARH - TBARH + screen_get_geo(i).height + INFOBARH))
|
||||
selscreen = i;
|
||||
|
||||
return selscreen;
|
||||
@ -107,13 +108,3 @@ screen_get_sel(void)
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
/** Init screen geometry
|
||||
*/
|
||||
void
|
||||
screen_init(void)
|
||||
{
|
||||
screen_get_sel();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@ -184,7 +184,6 @@ void uicb_tagtransfert(uicb_t);
|
||||
int screen_count(void);
|
||||
XRectangle screen_get_geo(int s);
|
||||
int screen_get_sel(void);
|
||||
void screen_init(void);
|
||||
|
||||
/* layout.c */
|
||||
void arrange(void);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user