summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKim Woelders <kim@woelders.dk>2021-08-19 08:28:41 +0200
committerKim Woelders <kim@woelders.dk>2021-08-21 20:57:04 +0200
commit0d6bdb4272fb5be6abb54e7b45d6303ddecc9a85 (patch)
treed3c76b16e37fcd6293acc9b112d6f30f2bc860a4
parent8f9a57fb10f684b85807bdfe71ee37e00fb6a914 (diff)
Support _NET_WM_STATE_FOCUSED
GTK apps apparently use this.
-rw-r--r--src/ewmh.c2
-rw-r--r--src/focus.c7
2 files changed, 5 insertions, 4 deletions
diff --git a/src/ewmh.c b/src/ewmh.c
index 37aeb335..01a2dcef 100644
--- a/src/ewmh.c
+++ b/src/ewmh.c
@@ -131,6 +131,7 @@ EWMH_Init(EX_Window win_wm_check)
131 atom_list[atom_count++] = EX_ATOM_NET_WM_STATE_ABOVE; 131 atom_list[atom_count++] = EX_ATOM_NET_WM_STATE_ABOVE;
132 atom_list[atom_count++] = EX_ATOM_NET_WM_STATE_BELOW; 132 atom_list[atom_count++] = EX_ATOM_NET_WM_STATE_BELOW;
133 atom_list[atom_count++] = EX_ATOM_NET_WM_STATE_DEMANDS_ATTENTION; 133 atom_list[atom_count++] = EX_ATOM_NET_WM_STATE_DEMANDS_ATTENTION;
134 atom_list[atom_count++] = EX_ATOM_NET_WM_STATE_FOCUSED;
134 135
135 atom_list[atom_count++] = EX_ATOM_NET_WM_ALLOWED_ACTIONS; 136 atom_list[atom_count++] = EX_ATOM_NET_WM_ALLOWED_ACTIONS;
136 atom_list[atom_count++] = EX_ATOM_NET_WM_ACTION_MOVE; 137 atom_list[atom_count++] = EX_ATOM_NET_WM_ACTION_MOVE;
@@ -383,6 +384,7 @@ EWMH_SetWindowState(const EWin * ewin)
383 ATOM_ADD_IF(EX_ATOM_NET_WM_STATE_ABOVE, EoGetLayer(ewin) >= 6); 384 ATOM_ADD_IF(EX_ATOM_NET_WM_STATE_ABOVE, EoGetLayer(ewin) >= 6);
384 ATOM_ADD_IF(EX_ATOM_NET_WM_STATE_BELOW, EoGetLayer(ewin) <= 2); 385 ATOM_ADD_IF(EX_ATOM_NET_WM_STATE_BELOW, EoGetLayer(ewin) <= 2);
385 ATOM_ADD_IF(EX_ATOM_NET_WM_STATE_DEMANDS_ATTENTION, ewin->state.attention); 386 ATOM_ADD_IF(EX_ATOM_NET_WM_STATE_DEMANDS_ATTENTION, ewin->state.attention);
387 ATOM_ADD_IF(EX_ATOM_NET_WM_STATE_FOCUSED, ewin->state.active);
386 388
387 if (ewin->ewmh.current_state == atom_mask) 389 if (ewin->ewmh.current_state == atom_mask)
388 return; 390 return;
diff --git a/src/focus.c b/src/focus.c
index d270af10..7dff4c03 100644
--- a/src/focus.c
+++ b/src/focus.c
@@ -329,10 +329,9 @@ FocusEwinSetActive(EWin * ewin, int active)
329 EwinUpdateOpacity(ewin); 329 EwinUpdateOpacity(ewin);
330 330
331 if (active && ewin->state.attention) 331 if (active && ewin->state.attention)
332 { 332 ewin->state.attention = 0;
333 ewin->state.attention = 0; 333
334 HintsSetWindowState(ewin); 334 HintsSetWindowState(ewin);
335 }
336} 335}
337 336
338static void 337static void