Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add IGNOREURGENT quirk #592

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions spectrwm.1
Original file line number Diff line number Diff line change
Expand Up @@ -1966,6 +1966,8 @@ Especially useful for terminal windows that share a process.
.It IGNORESPAWNWS
Ignore the spawn workspace when determining the initial workspace for a new
window.
.It IGNOREURGENT
Ignore urgency hint.
.It MAXIMIZE
Put the window into maximized state upon being managed.
.It MINIMALBORDER
Expand Down
7 changes: 5 additions & 2 deletions spectrwm.c
Original file line number Diff line number Diff line change
Expand Up @@ -971,6 +971,7 @@ struct quirk {
#define SWM_Q_MAXIMIZE (1 << 13)/* Maximize window when mapped. */
#define SWM_Q_BELOW (1 << 14)/* Put window below when mapped. */
#define SWM_Q_ICONIFY (1 << 15)/* Put window below when mapped. */
#define SWM_Q_IGNOREURGENT (1 << 16)/* Ignore urgency hint. */
};
TAILQ_HEAD(quirk_list, quirk) quirks = TAILQ_HEAD_INITIALIZER(quirks);

Expand Down Expand Up @@ -4115,8 +4116,9 @@ set_attention(struct ws_win *win)
static bool
win_urgent(struct ws_win *win)
{
return (xcb_icccm_wm_hints_get_urgency(&win->hints) != 0 ||
DEMANDS_ATTENTION(win));
return (!(win->quirks & SWM_Q_IGNOREURGENT) &&
(xcb_icccm_wm_hints_get_urgency(&win->hints) != 0 ||
DEMANDS_ATTENTION(win)));
}

static void
Expand Down Expand Up @@ -12808,6 +12810,7 @@ const char *quirkname[] = {
"MAXIMIZE",
"BELOW",
"ICONIFY",
"IGNOREURGENT",
};

/* SWM_Q_DELIM: retain '|' for back compat for now (2009-08-11) */
Expand Down