]> git.sur5r.net Git - i3/i3lock/commitdiff
Set window name
authorAxel Wagner <mail@merovius.de>
Tue, 9 Apr 2013 16:31:25 +0000 (18:31 +0200)
committerMichael Stapelberg <michael@stapelberg.de>
Thu, 11 Apr 2013 20:54:48 +0000 (22:54 +0200)
xcb.c

diff --git a/xcb.c b/xcb.c
index 6498241419a2f016fdd204d1d5516700a999e9a0..5f3d298416947c37fff1f6e5da72ca00222da275 100644 (file)
--- a/xcb.c
+++ b/xcb.c
@@ -9,10 +9,12 @@
  */
 #include <xcb/xcb.h>
 #include <xcb/xcb_image.h>
+#include <xcb/xcb_atom.h>
 #include <xcb/dpms.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdbool.h>
+#include <string.h>
 #include <unistd.h>
 #include <assert.h>
 #include <err.h>
@@ -133,6 +135,16 @@ xcb_window_t open_fullscreen_window(xcb_connection_t *conn, xcb_screen_t *scr, c
                       mask,
                       values);
 
+    char *name = "i3lock";
+    xcb_change_property(conn,
+                        XCB_PROP_MODE_REPLACE,
+                        win,
+                        XCB_ATOM_WM_NAME,
+                        XCB_ATOM_STRING,
+                        8,
+                        strlen(name),
+                        name);
+
     /* Map the window (= make it visible) */
     xcb_map_window(conn, win);