Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#2 The Interface does not set WM_CLASS

open
nobody
cm (2)
5
2012-09-03
2012-09-03
c00kiemon5ter
No

On Linux the interface does not set the WM_CLASS property.
This can be easily checked with `xprop`. Use like:

1. open cm-grace
2. run:
xprop WM_CLASS
3. select the cm-grace window

no information is returned.

To set WM_CLASS one must create an XClassHint struct
and fill the res_name and res_classs members.

I do not know my way through the cm-grace source code,
based on some grepping, I think the right file to patch is 'src/juce_amalgamated.cpp'.

I set out to create a patch, but when I realised that the build system is not
what I expected it to be (I couldnt get premake.lua to work) I gave up.

Something along the lines of the attached patch should do it (untested..).
The allocated memory should be free'd with 'XFree(..)'

Here are some relevant links:
http://www.tronche.com/gui/x/xlib/ICC/client-to-window-manager/wm-class.html
http://www.tronche.com/gui/x/xlib/ICC/client-to-window-manager/XSetClassHint.html
http://www.tronche.com/gui/x/xlib/ICC/client-to-window-manager/XAllocClassHint.html

Discussion

  • c00kiemon5ter
    c00kiemon5ter
    2012-09-03

    class_hint.diff

     
    Attachments