Bug 702438

Summary: no WM_CLASS for mupdf-gl, patched freeglut
Product: MuPDF Reporter: hisacro <hisacro>
Component: mupdfAssignee: MuPDF bugs <mupdf-bugs>
Status: UNCONFIRMED ---    
Severity: normal CC: hisacro
Priority: P4    
Version: master   
Hardware: PC   
OS: Linux   
Customer: Word Size: ---
Attachments: patched fg_window_x11.c
patched fg_window_x11.c
thirdparty/freeglut/src/x11/fg_window_x11.c
patched fg_window_x11.c
patched fg_window_x11.c - included XSsetClassHint

Description hisacro 2020-05-26 21:25:41 UTC
Created attachment 19250 [details]
patched fg_window_x11.c

added XSetClassHint call to thirdparty/freeglut/src/x11/fg_window_x11.c so WM_CLASS is assigned for mupdf-gl
Comment 1 hisacro 2020-05-26 21:35:24 UTC
Created attachment 19251 [details]
patched fg_window_x11.c
Comment 2 hisacro 2020-05-27 07:07:10 UTC
Created attachment 19252 [details]
thirdparty/freeglut/src/x11/fg_window_x11.c
Comment 3 hisacro 2020-05-27 07:12:36 UTC
Created attachment 19253 [details]
patched fg_window_x11.c

diff fg_window_x11.c fg_window_x11_patch.c

150a151
>     XClassHint *classhint;
377a379,385
> 
>     classhint = XAllocClassHint();
>     classhint->res_name = "mupdf";
>     classhint->res_class = "MuPDF";
> 
>     XSetClassHint( fgDisplay.pDisplay.Display, window->Window.Handle, classhint );
>     XFree( classhint );
this sets WM_CLASS(STRING) = "mupdf", "MuPDF"
Comment 4 hisacro 2020-05-27 07:18:12 UTC
Created attachment 19254 [details]
patched fg_window_x11.c - included XSsetClassHint

diff fg_window_x11.c fg_window_x11_patch.c

150a151
>     XClassHint *classhint;
377a379,385
> 
>     classhint = XAllocClassHint();
>     classhint->res_name = "mupdf";
>     classhint->res_class = "MuPDF";
> 
>     XSetClassHint( fgDisplay.pDisplay.Display, window->Window.Handle, classhint );
>     XFree( classhint );
this sets WM_CLASS(STRING) = "mupdf", "MuPDF"