mupdf-x11有WM_CLASS(STRING) = "mupdf","MuPDF",但是mupdf-gl没有。我需要wm_class在FVWM中正确地使用mupdf-gl。我该如何解决这个问题?可能是在编译前对源代码做了一些小改动吧?解决方案表明here不起作用。
发布于 2022-10-14 21:52:28
我的朋友程序员帮了我,我们找到了一个解决方案,在编译之前修改了mupdf的源代码。在文件thirdparty/freeglut/src/x11/fg_menu_x11.c中进行了两个更改
XClassHint *classhint;。这个块现在读为void fgPlatformOpenWindow( SFG_Window* window, const char* title,
GLboolean positionUse, int x, int y,
GLboolean sizeUse, int w, int h,
GLboolean gameMode, GLboolean isSubWindow )
{
XClassHint *classhint;classhint = XAllocClassHint();
if (classhint)
{
classhint->res_name = "mupdf-gl";
classhint->res_class = "MuPDF-gl";
XSetClassHint(fgDisplay.pDisplay.Display, window->Window.Handle, classhint);
XFree(classhint);
}编译后,mupdf-gl的窗口被标识为WM_CLASS(STRING) = "mupdf-gl",“MuPDF”。
https://stackoverflow.com/questions/74008506
复制相似问题