mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
finish unfucking the screen_ctx handling.
remove screen_current() it was utterly bogus when nscreens > 1. pass a fake client_ctx in the case where there's no client and the kbfunc or mousefunc doesn't need a real one, it just contains the current screen, modify these functions so that they pass down the screen context to their callees. make groups per screen, it's the only way it makes sense in this regard. ok okan@.
This commit is contained in:
13
screen.c
13
screen.c
@@ -21,8 +21,6 @@
|
||||
#include "headers.h"
|
||||
#include "calmwm.h"
|
||||
|
||||
extern struct screen_ctx *Curscreen;
|
||||
|
||||
struct screen_ctx *
|
||||
screen_fromroot(Window rootwin)
|
||||
{
|
||||
@@ -36,22 +34,13 @@ screen_fromroot(Window rootwin)
|
||||
return (TAILQ_FIRST(&Screenq));
|
||||
}
|
||||
|
||||
struct screen_ctx *
|
||||
screen_current(void)
|
||||
{
|
||||
return (Curscreen);
|
||||
}
|
||||
|
||||
void
|
||||
screen_updatestackingorder(void)
|
||||
screen_updatestackingorder(struct screen_ctx *sc)
|
||||
{
|
||||
Window *wins, w0, w1;
|
||||
struct screen_ctx *sc;
|
||||
struct client_ctx *cc;
|
||||
u_int nwins, i, s;
|
||||
|
||||
sc = screen_current();
|
||||
|
||||
if (!XQueryTree(X_Dpy, sc->rootwin, &w0, &w1, &wins, &nwins))
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user