问题
I try use http://xkbind.sourceforge.net/ (useful for displaying keyboard state in window title) on my Mint Maya (based on Ubuntu 12.04)
But xkbind change only WM_NAME property
Here is xkbind.c code fragment
if(XGetWindowAttributes(dpy, window, &wa)) {
XSelectInput(dpy, window, wa.your_event_mask&~PropertyChangeMask);
XSync(dpy, False);
XSetWMName(dpy, window, p_tp);
XSelectInput(dpy, window, wa.your_event_mask);
}
What function should be used change _NET_WM_NAME property too?
Example
xkbind
gvim
xprop output
WM_NAME(STRING) = "Lat::[No Name] - GVIM"
_NET_WM_NAME(UTF8_STRING) = "[No Name] - GVIM"
回答1:
Straightforward call of XChangeProperty() should do the trick:
XChangeProperty( display, win,
XInternAtom(display, "_NET_WM_NAME", False),
XInternAtom(display, "UTF8_STRING", False),
8, PropModeReplace, (unsigned char *) utf8_buffer,
count);
来源:https://stackoverflow.com/questions/23273292/how-to-change-net-wm-name-x-library