summaryrefslogtreecommitdiff
path: root/dwm/patch/bar_systray.h
diff options
context:
space:
mode:
authorcoasteen <coasteen@proton.me>2026-07-09 10:42:28 +0330
committercoasteen <coasteen@proton.me>2026-07-09 10:42:28 +0330
commit8cbadb61604667b407b53ee1258433994fa4765a (patch)
tree97765fb29418fd6278fcb4cbb9760893afaf7a58 /dwm/patch/bar_systray.h
Diffstat (limited to 'dwm/patch/bar_systray.h')
-rwxr-xr-xdwm/patch/bar_systray.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/dwm/patch/bar_systray.h b/dwm/patch/bar_systray.h
new file mode 100755
index 0000000..092a6ff
--- /dev/null
+++ b/dwm/patch/bar_systray.h
@@ -0,0 +1,41 @@
+#define SYSTEM_TRAY_REQUEST_DOCK 0
+#define _NET_SYSTEM_TRAY_ORIENTATION_HORZ 0
+
+/* XEMBED messages */
+#define XEMBED_EMBEDDED_NOTIFY 0
+#define XEMBED_WINDOW_ACTIVATE 1
+#define XEMBED_FOCUS_IN 4
+#define XEMBED_MODALITY_ON 10
+
+#define XEMBED_MAPPED (1 << 0)
+#define XEMBED_WINDOW_ACTIVATE 1
+#define XEMBED_WINDOW_DEACTIVATE 2
+
+#define VERSION_MAJOR 0
+#define VERSION_MINOR 0
+#define XEMBED_EMBEDDED_VERSION (VERSION_MAJOR << 16) | VERSION_MINOR
+
+/* enums */
+enum { Manager, Xembed, XembedInfo, XLast }; /* Xembed atoms */
+
+typedef struct Systray Systray;
+struct Systray {
+ Window win;
+ Client *icons;
+ Bar *bar;
+ int h;
+};
+
+/* bar integration */
+static int width_systray(Bar *bar, BarArg *a);
+static int draw_systray(Bar *bar, BarArg *a);
+static int click_systray(Bar *bar, Arg *arg, BarArg *a);
+
+/* function declarations */
+static void removesystrayicon(Client *i);
+static void resizerequest(XEvent *e);
+static void updatesystrayicongeom(Client *i, int w, int h);
+static void updatesystrayiconstate(Client *i, XPropertyEvent *ev);
+static Client *wintosystrayicon(Window w);
+
+