[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] set urgent flag on _NET_WM_STATE_DEMANDS_ATTENTION and clear it on window focus
- To: Gabor Adam Toth <tg _at_ tgbit _dot_ net>
- Subject: Re: [PATCH] set urgent flag on _NET_WM_STATE_DEMANDS_ATTENTION and clear it on window focus
- From: Thorsten Wißmann <edu _at_ thorsten _minus_ wissmann _dot_ de>
- Date: Tue, 2 Oct 2012 02:06:24 +0200
Hi Gabor,
Thanks for your patch! The code looks nice and I applied it as
3dafabe Handle _NET_WM_STATE_DEMANDS_ATTENTION
including two modifications:
I added a short first line in the commit message so that it fits into 50
characters.
On Tue, Sep 25, 2012 at 06:49:41AM +0200, Gabor Adam Toth wrote:
> + if (state) {
> + hook_emit_list("urgent", "on", winid_str, NULL);
> + client->urgent = true;
> + } else {
> hook_emit_list("urgent", "off", winid_str, NULL);
> client->urgent = false;
> + }
As already mentioned in the IRC I shortened this to:
hook_emit_list("urgent", state ? "on" : "off", winid_str, NULL);
client->urgent = state;
> @@ -312,6 +313,8 @@ void ewmh_handle_client_message(XEvent* event) {
> } client_atoms[] = {
> { NetWmStateFullscreen,
> client->fullscreen, client_set_fullscreen },
> + { NetWmStateDemandsAttention,
> + client->urgent, client_set_urgent },
> };
>
> /* me->data.l[1] and [2] describe the properties to alter */
> @@ -360,6 +363,7 @@ void ewmh_update_window_state(struct HSClient* client) {
> bool enabled;
> } client_atoms[] = {
> { NetWmStateFullscreen, client->fullscreen },
> + { NetWmStateDemandsAttention, client->urgent },
> };
Thanks for using the tables! I knew it could be useful to safe those
data as tables :)
Regards,
Thorsten