1
0
Fork 0
This commit is contained in:
Henrik Hautakoski 2020-10-21 12:59:55 +02:00
parent 58513d70c0
commit 0c6105e418
7 changed files with 168 additions and 2 deletions

View file

@ -1,4 +1,5 @@
#include <Spectre/Graphics/Image.h>
#include <Spectre/Display/DisplayDescription.h> // Prevents conflict with X.h defining "None"
#include <Spectre/System/Log.h>
#include "X11WindowEventHandler.h"
@ -118,7 +119,22 @@ void X11Display::setCaption(const std::string& caption)
void X11Display::setIcon(const std::string& icon)
{
// TODO: Implement
Image img;
/*
if (img.loadFromFile(icon)) {
Atom net_wm_icon = getAtom("_NET_WM_ICON", False);
Atom cardinal = getAtom("CARDINAL", False);
unsigned int length = (img.getWidth() + img.getHeight()) * (img.getBpp() / 8);
XChangeProperty(m_disp, m_win,
net_wm_icon, cardinal,
img.getBpp(), PropModeReplace,
(const unsigned char*) img.getPixels(),
length);
} else {
Log::warn("Failed to set icon %s", icon.c_str());
} */
}
void X11Display::createHiddenCursor()