fixed tab responding under marukuru
This commit is contained in:
parent
276fe8e8ed
commit
98beb2bfa1
11
surf.c
11
surf.c
|
@ -154,6 +154,7 @@ typedef struct Client {
|
|||
GtkWidget *tab_bar;
|
||||
int tab_click_index;
|
||||
bool tab_drag;
|
||||
pid_t subprocess_pid;
|
||||
} Client;
|
||||
|
||||
typedef struct {
|
||||
|
@ -651,6 +652,13 @@ void tab_bar_click(Client *c, bool close) {
|
|||
return;
|
||||
}
|
||||
|
||||
int status;
|
||||
pid_t result = waitpid(c->subprocess_pid, &status, WNOHANG);
|
||||
|
||||
if (result == 0 && c->subprocess_pid != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (close) {
|
||||
Arg close_arg = {.i = c->tab_click_index};
|
||||
close_tab(c, &close_arg);
|
||||
|
@ -1556,7 +1564,8 @@ newwindow(Client *c, const Arg *a, int noembed)
|
|||
void
|
||||
spawn(Client *c, const Arg *a)
|
||||
{
|
||||
if (fork() == 0) {
|
||||
c->subprocess_pid = fork();
|
||||
if (c->subprocess_pid == 0) {
|
||||
if (dpy)
|
||||
close(ConnectionNumber(dpy));
|
||||
close(spair[0]);
|
||||
|
|
Loading…
Reference in a new issue