Skip to content

Commit

Permalink
Let "icesh restore" also clear the urgency flag.
Browse files Browse the repository at this point in the history
  • Loading branch information
gijsbers committed Apr 25, 2024
1 parent af5650d commit 2dadb9b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
4 changes: 2 additions & 2 deletions man/icesh.pod
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ Minimize the window.

=item B<restore>

Restore the window to normal.
Restore the window to normal and clear urgency.

=item B<hide>

Expand Down Expand Up @@ -385,7 +385,7 @@ Show the window on just one workspace.

=item B<urgent>

Set the urgent flag to flash the task button.
Set the urgency flag to flash the task button.

=item B<resize> I<WIDTH> I<HEIGHT>

Expand Down
11 changes: 10 additions & 1 deletion src/icesh.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3534,6 +3534,9 @@ void IceSh::showProperty(Window window, Atom atom, const char* prefix) {
if (f & IconWindowHint) {
printf(" Window(0x%lx)", h->icon_window);
}
if (f & XUrgencyHint) {
printf(" urgency");
}
newline();
}
return;
Expand Down Expand Up @@ -5353,9 +5356,15 @@ void IceSh::parseAction()
YNetState(window) -= NetSkipPager | NetSkipTaskbar;
}
else if (isAction("restore", 0)) {
FOREACH_WINDOW(window)
FOREACH_WINDOW(window) {
YNetState(window) -= NetFullscreen | NetShaded | NetDemands |
NetHorizontal | NetVertical;
xsmart<XWMHints> h(XGetWMHints(display, window));
if (h && hasbit(h->flags, XUrgencyHint)) {
h->flags &= ~XUrgencyHint;
XSetWMHints(display, window, h);
}
}
changeState(NormalState);
}
else if (isAction("denormal", 0)) {
Expand Down

0 comments on commit 2dadb9b

Please sign in to comment.