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-WM_CLASS.patch

43 lines
839 B

--- llpp-7/link.c
+++ llpp-7/link.c
@@ -1982,6 +1982,32 @@
CAMLreturn (caml_copy_double (w));
}
+#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;
+ int screen;
+ XClassHint hint;
+
+ dpy = XOpenDisplay (getenv ("DISPLAY"));
+ screen = 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 value ml_init (value sock_v, value params_v)
{
CAMLparam2 (sock_v, params_v);
@@ -2044,5 +2070,6 @@
}
#endif
+ set_wm_class ();
CAMLreturn (Val_unit);
}