Browse Source

tags/2021-05-28
jules 18 years ago
parent
commit
ed07353834
1 changed files with 16 additions and 7 deletions
  1. +16
    -7
      build/linux/platform_specific_code/juce_linux_Windowing.cpp

+ 16
- 7
build/linux/platform_specific_code/juce_linux_Windowing.cpp View File

@@ -1096,14 +1096,23 @@ public:
void setIcon (const Image& newIcon)
{
/*XWMHints* wmHints = XAllocWMHints();
wmHints->flags = IconPixmapHint | IconMaskHint;
wmHints->icon_pixmap =
wmHints->icon_mask =
const int dataSize = newIcon.getWidth() * newIcon.getHeight() + 2;
uint32* const data = (uint32*) juce_malloc (dataSize);
XSetWMHints (display, windowH, wmHints);
XFree (wmHints);
*/
int index = 0;
data[index++] = newIcon.getWidth();
data[index++] = newIcon.getHeight();
for (int y = 0; y < newIcon.getHeight(); ++y)
for (int x = 0; x < newIcon.getWidth(); ++x)
data[index++] = newIcon.getPixelAt (x, y).getARGB();
XChangeProperty (display, windowH,
XInternAtom (display, "_NET_WM_ICON", False),
XA_CARDINAL, 32, PropModeReplace,
(unsigned char*) data, dataSize);
juce_free (data);
}
//==============================================================================


Loading…
Cancel
Save