unban() all clients before execing or quitting awesome
This commit is contained in:
parent
105f89a58b
commit
35b4005b7a
11
awesome.c
11
awesome.c
|
@ -219,7 +219,9 @@ main(int argc, char *argv[])
|
||||||
event_handler **handler;
|
event_handler **handler;
|
||||||
struct sockaddr_un *addr;
|
struct sockaddr_un *addr;
|
||||||
int opt;
|
int opt;
|
||||||
static struct option long_options[] = {
|
Client *c;
|
||||||
|
static struct option long_options[] =
|
||||||
|
{
|
||||||
{"help", 0, NULL, 'h'},
|
{"help", 0, NULL, 'h'},
|
||||||
{"version", 0, NULL, 'v'},
|
{"version", 0, NULL, 'v'},
|
||||||
{NULL, 0, NULL, 0}
|
{NULL, 0, NULL, 0}
|
||||||
|
@ -428,12 +430,19 @@ main(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if(csfd > 0 && close(csfd))
|
if(csfd > 0 && close(csfd))
|
||||||
perror("error closing UNIX domain socket");
|
perror("error closing UNIX domain socket");
|
||||||
if(unlink(addr->sun_path))
|
if(unlink(addr->sun_path))
|
||||||
perror("error unlinking UNIX domain socket");
|
perror("error unlinking UNIX domain socket");
|
||||||
p_delete(&addr);
|
p_delete(&addr);
|
||||||
|
|
||||||
|
/* remap all clients since some WM won't handle them otherwise */
|
||||||
|
for(c = globalconf.clients; c; c = c->next)
|
||||||
|
client_unban(c);
|
||||||
|
|
||||||
|
XSync(globalconf.display, False);
|
||||||
|
|
||||||
XCloseDisplay(dpy);
|
XCloseDisplay(dpy);
|
||||||
|
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
|
|
10
xutil.c
10
xutil.c
|
@ -24,8 +24,8 @@
|
||||||
#include <X11/extensions/Xinerama.h>
|
#include <X11/extensions/Xinerama.h>
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
|
|
||||||
#include "structs.h"
|
|
||||||
#include "xutil.h"
|
#include "xutil.h"
|
||||||
|
#include "client.h"
|
||||||
|
|
||||||
extern AwesomeConf globalconf;
|
extern AwesomeConf globalconf;
|
||||||
|
|
||||||
|
@ -37,7 +37,15 @@ extern AwesomeConf globalconf;
|
||||||
void
|
void
|
||||||
uicb_exec(int screen __attribute__ ((unused)), char *arg)
|
uicb_exec(int screen __attribute__ ((unused)), char *arg)
|
||||||
{
|
{
|
||||||
|
Client *c;
|
||||||
char path[PATH_MAX];
|
char path[PATH_MAX];
|
||||||
|
|
||||||
|
/* remap all clients since some WM won't handle them otherwise */
|
||||||
|
for(c = globalconf.clients; c; c = c->next)
|
||||||
|
client_unban(c);
|
||||||
|
|
||||||
|
XSync(globalconf.display, False);
|
||||||
|
|
||||||
if(globalconf.display)
|
if(globalconf.display)
|
||||||
close(ConnectionNumber(globalconf.display));
|
close(ConnectionNumber(globalconf.display));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue