mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
store screen of client, first step to multi head support
This commit is contained in:
parent
48f17aa9f1
commit
c02be2ab82
4 changed files with 7 additions and 5 deletions
|
@ -109,7 +109,7 @@ scan(Display *disp, DC *drawcontext, awesome_config *awesomeconf)
|
|||
|| XGetTransientForHint(disp, wins[i], &d1))
|
||||
continue;
|
||||
if(wa.map_state == IsViewable || getstate(disp, wins[i]) == IconicState)
|
||||
manage(disp, drawcontext, wins[i], &wa, awesomeconf);
|
||||
manage(disp, DefaultScreen(disp), drawcontext, wins[i], &wa, awesomeconf);
|
||||
}
|
||||
/* now the transients */
|
||||
for(i = 0; i < num; i++)
|
||||
|
@ -118,7 +118,7 @@ scan(Display *disp, DC *drawcontext, awesome_config *awesomeconf)
|
|||
continue;
|
||||
if(XGetTransientForHint(disp, wins[i], &d1)
|
||||
&& (wa.map_state == IsViewable || getstate(disp, wins[i]) == IconicState))
|
||||
manage(disp, drawcontext, wins[i], &wa, awesomeconf);
|
||||
manage(disp, DefaultScreen(disp), drawcontext, wins[i], &wa, awesomeconf);
|
||||
}
|
||||
if(wins)
|
||||
XFree(wins);
|
||||
|
|
3
client.c
3
client.c
|
@ -347,7 +347,7 @@ loadprops(Client * c, int ntags)
|
|||
}
|
||||
|
||||
void
|
||||
manage(Display * disp, DC *drawcontext, Window w, XWindowAttributes * wa, awesome_config *awesomeconf)
|
||||
manage(Display * disp, int screen, DC *drawcontext, Window w, XWindowAttributes * wa, awesome_config *awesomeconf)
|
||||
{
|
||||
int i;
|
||||
Client *c, *t = NULL;
|
||||
|
@ -365,6 +365,7 @@ manage(Display * disp, DC *drawcontext, Window w, XWindowAttributes * wa, awesom
|
|||
c->h = c->rh = wa->height;
|
||||
c->oldborder = wa->border_width;
|
||||
c->display = disp;
|
||||
c->screen = screen;
|
||||
if(c->w == DisplayWidth(disp, DefaultScreen(disp))
|
||||
&& c->h == DisplayHeight(disp, DefaultScreen(disp)))
|
||||
{
|
||||
|
|
3
client.h
3
client.h
|
@ -45,6 +45,7 @@ struct Client
|
|||
Client *snext;
|
||||
Window win;
|
||||
Display * display;
|
||||
int screen;
|
||||
Bool ftview; /* first time viewed on new layout */
|
||||
};
|
||||
|
||||
|
@ -53,7 +54,7 @@ void ban(Client *); /* bans c */
|
|||
void configure(Client *); /* send synthetic configure event */
|
||||
void detach(Client *); /* detaches c from global client list */
|
||||
void focus(Display *, DC *, Client *, Bool, awesome_config *); /* focus c if visible && !NULL, or focus top visible */
|
||||
void manage(Display *, DC *, Window, XWindowAttributes *, awesome_config *); /* manage new client */
|
||||
void manage(Display *, int, DC *, Window, XWindowAttributes *, awesome_config *); /* manage new client */
|
||||
void resize(Client *, int, int, int, int, Bool); /* resize with given coordinates c */
|
||||
void unban(Client *); /* unbans c */
|
||||
void unmanage(Client *, DC *, long, awesome_config *); /* unmanage c */
|
||||
|
|
2
event.c
2
event.c
|
@ -351,7 +351,7 @@ handle_event_maprequest(XEvent * e, awesome_config *awesomeconf)
|
|||
if(wa.override_redirect)
|
||||
return;
|
||||
if(!getclient(ev->window))
|
||||
manage(e->xany.display, &dc, ev->window, &wa, awesomeconf);
|
||||
manage(e->xany.display, DefaultScreen(e->xany.display), &dc, ev->window, &wa, awesomeconf);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in a new issue