From 248fd276262358d0f2fa1a7daa6a4e19b7a40396 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Fri, 8 Dec 2023 18:20:33 +0100 Subject: Set wm client machine --- src/window/window.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/window') diff --git a/src/window/window.c b/src/window/window.c index ba4e8d5..9c82b3e 100644 --- a/src/window/window.c +++ b/src/window/window.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include @@ -620,6 +621,17 @@ static int mgl_window_init(mgl_window *self, const char *title, const mgl_window 32, PropModeReplace, (const unsigned char*)&pid, 1); } + char host_name[HOST_NAME_MAX]; + if(gethostname(host_name, sizeof(host_name)) == 0) { + fprintf(stderr, "host name: %s\n", host_name); + XTextProperty txt_prop; + txt_prop.value = host_name; + txt_prop.encoding = XA_STRING; + txt_prop.format = 8; + txt_prop.nitems = strlen(host_name); + XSetWMClientMachine(context->connection, self->window, &txt_prop); + } + if(params && params->class_name) { XClassHint class_hint = { params->class_name, params->class_name }; XSetClassHint(context->connection, self->window, &class_hint); -- cgit v1.2.3