vene fix notify window while its visible
This commit is contained in:
@@ -18,8 +18,8 @@ static const char col_gray4[] = "#eeeeee";
|
||||
static const char col_cyan[] = "#005577";
|
||||
static const char* colors[][3] = {
|
||||
/* fg bg border */
|
||||
[SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
|
||||
[SchemeSel] = { col_gray4, col_cyan, col_cyan },
|
||||
[SchemeNorm] = { col_gray3, col_gray1, "#000000" },
|
||||
[SchemeSel] = { col_gray4, col_cyan, "#FFFF00" },
|
||||
};
|
||||
|
||||
/* tagging */
|
||||
|
||||
@@ -224,7 +224,7 @@ void updatestatus(void);
|
||||
static void updatetitle(Client *c);
|
||||
static void updatewindowtype(Client *c);
|
||||
static void updatewmhints(Client *c);
|
||||
void view(const Arg *arg);
|
||||
static void view(const Arg *arg);
|
||||
static Client *wintoclient(Window w);
|
||||
static Monitor *wintomon(Window w);
|
||||
static int xerror(Display *dpy, XErrorEvent *ee);
|
||||
@@ -527,8 +527,12 @@ clientmessage(XEvent *e)
|
||||
if (c != selmon->sel && !c->isurgent)
|
||||
seturgent(c, 1);
|
||||
|
||||
const Arg tag = {.ui = c->tags}; /* switch to show highlighted window*/
|
||||
view(&tag);
|
||||
if( !ISVISIBLE(c) )
|
||||
{
|
||||
const Arg tag = {.ui = c->tags}; /* switch to show highlighted window */
|
||||
view(&tag);
|
||||
// Todo: c->tags can be multiple tags
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -105,17 +105,17 @@ extern "C"
|
||||
time_point<system_clock> now = system_clock::now();
|
||||
if(has_child && check_exited(child))
|
||||
{
|
||||
// Clean up all zombies
|
||||
while (waitpid(-1, nullptr, WNOHANG) > 0);
|
||||
|
||||
has_child = false;
|
||||
updatestatus();
|
||||
next_update = now + 5s;
|
||||
next_update = now + 10s;
|
||||
}
|
||||
else if(now > next_update)
|
||||
{
|
||||
// Clean up all zombies
|
||||
while (waitpid(-1, nullptr, WNOHANG) > 0);
|
||||
|
||||
updatestatus();
|
||||
next_update = now + 5s;
|
||||
next_update = now + 10s;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user