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.

41 lines
1.2 KiB

  1. #define SYSTEM_TRAY_REQUEST_DOCK 0
  2. #define _NET_SYSTEM_TRAY_ORIENTATION_HORZ 0
  3. /* XEMBED messages */
  4. #define XEMBED_EMBEDDED_NOTIFY 0
  5. #define XEMBED_WINDOW_ACTIVATE 1
  6. #define XEMBED_FOCUS_IN 4
  7. #define XEMBED_MODALITY_ON 10
  8. #define XEMBED_MAPPED (1 << 0)
  9. #define XEMBED_WINDOW_ACTIVATE 1
  10. #define XEMBED_WINDOW_DEACTIVATE 2
  11. #define VERSION_MAJOR 0
  12. #define VERSION_MINOR 0
  13. #define XEMBED_EMBEDDED_VERSION (VERSION_MAJOR << 16) | VERSION_MINOR
  14. /* enums */
  15. enum { Manager, Xembed, XembedInfo, XLast }; /* Xembed atoms */
  16. typedef struct Systray Systray;
  17. struct Systray {
  18. Window win;
  19. Client *icons;
  20. Bar *bar;
  21. int h;
  22. };
  23. /* bar integration */
  24. static int width_systray(Bar *bar, BarArg *a);
  25. static int draw_systray(Bar *bar, BarArg *a);
  26. static int click_systray(Bar *bar, Arg *arg, BarArg *a);
  27. /* function declarations */
  28. static Atom getatomprop(Client *c, Atom prop);
  29. static void removesystrayicon(Client *i);
  30. static void resizerequest(XEvent *e);
  31. static void updatesystrayicongeom(Client *i, int w, int h);
  32. static void updatesystrayiconstate(Client *i, XPropertyEvent *ev);
  33. static Client *wintosystrayicon(Window w);