move ewmh_update_net_client_list() into ewmh.c
This commit is contained in:
parent
73691143af
commit
423659d401
26
client.c
26
client.c
|
@ -33,6 +33,7 @@
|
||||||
#include "statusbar.h"
|
#include "statusbar.h"
|
||||||
#include "window.h"
|
#include "window.h"
|
||||||
#include "focus.h"
|
#include "focus.h"
|
||||||
|
#include "ewmh.h"
|
||||||
#include "layouts/floating.h"
|
#include "layouts/floating.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -257,31 +258,6 @@ focus(Client *c, Bool selscreen, int screen)
|
||||||
RevertToPointerRoot, CurrentTime);
|
RevertToPointerRoot, CurrentTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
ewmh_update_net_client_list(int phys_screen)
|
|
||||||
{
|
|
||||||
Window *wins;
|
|
||||||
Client *c;
|
|
||||||
int n = 0;
|
|
||||||
|
|
||||||
for(c = globalconf.clients; c; c = c->next)
|
|
||||||
if(c->phys_screen == phys_screen)
|
|
||||||
n++;
|
|
||||||
|
|
||||||
wins = p_new(Window, n + 1);
|
|
||||||
|
|
||||||
for(n = 0, c = globalconf.clients; c; c = c->next, n++)
|
|
||||||
if(c->phys_screen == phys_screen)
|
|
||||||
wins[n] = c->win;
|
|
||||||
|
|
||||||
XChangeProperty(globalconf.display, RootWindow(globalconf.display, phys_screen),
|
|
||||||
XInternAtom(globalconf.display, "_NET_CLIENT_LIST", False), XA_WINDOW, 32,
|
|
||||||
PropModeReplace, (unsigned char*)wins, n);
|
|
||||||
|
|
||||||
p_delete(&wins);
|
|
||||||
XFlush(globalconf.display);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Manage a new client
|
/** Manage a new client
|
||||||
* \param w The window
|
* \param w The window
|
||||||
* \param wa Window attributes
|
* \param wa Window attributes
|
||||||
|
|
25
ewmh.c
25
ewmh.c
|
@ -22,7 +22,7 @@
|
||||||
#include <X11/Xatom.h>
|
#include <X11/Xatom.h>
|
||||||
|
|
||||||
#include "ewmh.h"
|
#include "ewmh.h"
|
||||||
#include "config.h"
|
#include "util.h"
|
||||||
|
|
||||||
extern AwesomeConf globalconf;
|
extern AwesomeConf globalconf;
|
||||||
|
|
||||||
|
@ -80,5 +80,28 @@ ewmh_set_supported_hints(int phys_screen)
|
||||||
PropModeReplace, (unsigned char *) atom, i);
|
PropModeReplace, (unsigned char *) atom, i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
ewmh_update_net_client_list(int phys_screen)
|
||||||
|
{
|
||||||
|
Window *wins;
|
||||||
|
Client *c;
|
||||||
|
int n = 0;
|
||||||
|
|
||||||
|
for(c = globalconf.clients; c; c = c->next)
|
||||||
|
if(c->phys_screen == phys_screen)
|
||||||
|
n++;
|
||||||
|
|
||||||
|
wins = p_new(Window, n + 1);
|
||||||
|
|
||||||
|
for(n = 0, c = globalconf.clients; c; c = c->next, n++)
|
||||||
|
if(c->phys_screen == phys_screen)
|
||||||
|
wins[n] = c->win;
|
||||||
|
|
||||||
|
XChangeProperty(globalconf.display, RootWindow(globalconf.display, phys_screen),
|
||||||
|
net_client_list, XA_WINDOW, 32, PropModeReplace, (unsigned char *) wins, n);
|
||||||
|
|
||||||
|
p_delete(&wins);
|
||||||
|
XFlush(globalconf.display);
|
||||||
|
}
|
||||||
|
|
||||||
// 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
|
||||||
|
|
1
ewmh.h
1
ewmh.h
|
@ -24,6 +24,7 @@
|
||||||
|
|
||||||
void ewmh_init_atoms(void);
|
void ewmh_init_atoms(void);
|
||||||
void ewmh_set_supported_hints(int);
|
void ewmh_set_supported_hints(int);
|
||||||
|
void ewmh_update_net_client_list(int);
|
||||||
|
|
||||||
#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
|
||||||
|
|
Loading…
Reference in New Issue