xlibwindow-managers

Xlib ARGB Window Icon


I have a ARGB image data. I wish to set my window icon to this data. After searching for hours I am still at the start with nothing at hand. I know that I need to create a pixmap for image data and (may be) another pixmap for mask and use hints to hint the window manager about this. However, I do not know how to setup 32bit ARGB or 24bit RGB + 8bit alpha image. A sample would really be nice.


Solution

  • If 32 bit depth visual is available (check xdpyinfo) then code from my question should work for you. After you create RGBA pixmap just assign it's handle to _NET_WM_ICON property