Another copy of my dotfiles. Because I don't completely trust GitHub.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
2.8 KiB

4 years ago
  1. From 67840904a9510d6a6fc991b7f04046e74d196a26 Mon Sep 17 00:00:00 2001
  2. From: bakkeby <bakkeby@gmail.com>
  3. Date: Sun, 25 Oct 2020 16:40:05 +0100
  4. Subject: [PATCH] Adds the _NET_CLIENT_LIST_STACKING property which may be
  5. needed by some applications, e.g. zoom for window sharing.
  6. ---
  7. dwm.c | 13 ++++++++++++-
  8. 1 file changed, 12 insertions(+), 1 deletion(-)
  9. diff --git a/dwm.c b/dwm.c
  10. index 4465af1..0be261f 100644
  11. --- a/dwm.c
  12. +++ b/dwm.c
  13. @@ -62,7 +62,7 @@ enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */
  14. enum { SchemeNorm, SchemeSel }; /* color schemes */
  15. enum { NetSupported, NetWMName, NetWMState, NetWMCheck,
  16. NetWMFullscreen, NetActiveWindow, NetWMWindowType,
  17. - NetWMWindowTypeDialog, NetClientList, NetLast }; /* EWMH atoms */
  18. + NetWMWindowTypeDialog, NetClientList, NetClientListStacking, NetLast }; /* EWMH atoms */
  19. enum { WMProtocols, WMDelete, WMState, WMTakeFocus, WMLast }; /* default atoms */
  20. enum { ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle,
  21. ClkClientWin, ClkRootWin, ClkLast }; /* clicks */
  22. @@ -1066,6 +1066,8 @@ manage(Window w, XWindowAttributes *wa)
  23. attachstack(c);
  24. XChangeProperty(dpy, root, netatom[NetClientList], XA_WINDOW, 32, PropModeAppend,
  25. (unsigned char *) &(c->win), 1);
  26. + XChangeProperty(dpy, root, netatom[NetClientListStacking], XA_WINDOW, 32, PropModePrepend,
  27. + (unsigned char *) &(c->win), 1);
  28. XMoveResizeWindow(dpy, c->win, c->x + 2 * sw, c->y, c->w, c->h); /* some windows require this */
  29. setclientstate(c, NormalState);
  30. if (c->mon == selmon)
  31. @@ -1562,6 +1564,7 @@ setup(void)
  32. netatom[NetWMWindowType] = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE", False);
  33. netatom[NetWMWindowTypeDialog] = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE_DIALOG", False);
  34. netatom[NetClientList] = XInternAtom(dpy, "_NET_CLIENT_LIST", False);
  35. + netatom[NetClientListStacking] = XInternAtom(dpy, "_NET_CLIENT_LIST_STACKING", False);
  36. /* init cursors */
  37. cursor[CurNormal] = drw_cur_create(drw, XC_left_ptr);
  38. cursor[CurResize] = drw_cur_create(drw, XC_sizing);
  39. @@ -1585,6 +1588,7 @@ setup(void)
  40. XChangeProperty(dpy, root, netatom[NetSupported], XA_ATOM, 32,
  41. PropModeReplace, (unsigned char *) netatom, NetLast);
  42. XDeleteProperty(dpy, root, netatom[NetClientList]);
  43. + XDeleteProperty(dpy, root, netatom[NetClientListStacking]);
  44. /* select events */
  45. wa.cursor = cursor[CurNormal]->cursor;
  46. wa.event_mask = SubstructureRedirectMask|SubstructureNotifyMask
  47. @@ -1845,6 +1849,13 @@ updateclientlist()
  48. XChangeProperty(dpy, root, netatom[NetClientList],
  49. XA_WINDOW, 32, PropModeAppend,
  50. (unsigned char *) &(c->win), 1);
  51. +
  52. + XDeleteProperty(dpy, root, netatom[NetClientListStacking]);
  53. + for (m = mons; m; m = m->next)
  54. + for (c = m->stack; c; c = c->snext)
  55. + XChangeProperty(dpy, root, netatom[NetClientListStacking],
  56. + XA_WINDOW, 32, PropModeAppend,
  57. + (unsigned char *) &(c->win), 1);
  58. }
  59. int
  60. --
  61. 2.19.1