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.
gentoo-overlay/app-text/llpp/files/llpp-26b-WM_CLASS.patch

42 lines
860 B

--- llpp-26b/link.c
+++ llpp-26b/link.c
@@ -4392,6 +4392,31 @@
return caml_copy_string (FZ_VERSION);
}
+#if !defined (_WIN32) && !defined (__APPLE__)
+#undef pixel
+#include <X11/X.h>
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+#include <GL/glx.h>
+
+static void set_wm_class (void)
+{
+ Display *dpy;
+ Window win;
+ XClassHint hint;
+
+ dpy = XOpenDisplay (getenv ("DISPLAY"));
+ DefaultScreen (dpy);
+ hint.res_name = "llpp";
+ hint.res_class = "llpp";
+ win = glXGetCurrentDrawable ();
+ XSetClassHint (dpy, win, &hint);
+ XCloseDisplay (dpy);
+}
+#else
+#define set_wm_class()
+#endif
+
CAMLprim void ml_init (value csock_v, value params_v)
{
CAMLparam2 (csock_v, params_v);
@@ -4460,5 +4485,6 @@
errx (1, "pthread_create: %s", strerror (ret));
}
+ set_wm_class ();
CAMLreturn0;
}