x11 - XChangeProperty to change icon in unity bar and alt tab menu and window of running app? -
for x11 systems trying alter icon of application during run time. means window icon should change, icon showed in alt+tab menu, , icon in unity bar.
this preview of ubuntu:
ubuntu doesnt have window icon, other operating systems metacity do.
so thinking of using xchangeproperty
this:
unsigned int buffer[] = {16, 16, 4294901760..............., 32, 32, 0............}; //argb 32bit packed array display *d = xopendisplay(0); int s = defaultscreen(d); atom net_wm_icon = xinternatom(d, "_net_wm_icon", false); atom cardinal = xinternatom(d, "cardinal", false); xevent e; //w == window int length = 2 + 16 * 16 + 2 + 32 * 32; xchangeproperty(d, w, net_wm_icon, cardinal, 32, propmodereplace, (const unsigned char*) buffer, length); xmapwindow(d, w); while(1) xnextevent(d, &e);
i code in js-ctypes, above c code found during research, work running application?
thanks
icons x11 xorg
No comments:
Post a Comment