summaryrefslogtreecommitdiff
path: root/Games/Minesweeper
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-07-28 10:18:49 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-07-28 10:18:49 +0200
commit841b2e5d1367b1b5638d13dbed155ec53914e015 (patch)
tree93518fad445a53d5a8b79dc56150b9ba352170db /Games/Minesweeper
parent63619b9f7c5141d8ecdce98ea0f70039f4186e25 (diff)
downloadserenity-841b2e5d1367b1b5638d13dbed155ec53914e015.zip
WindowServer+LibGUI: Pass window icons as shared buffers rather than paths.
Now that we support more than 2 clients per shared buffer, we can use them for window icons. I didn't do that previously since it would have made the Taskbar process unable to access the icons. This opens up some nice possibilities for programmatically generated icons.
Diffstat (limited to 'Games/Minesweeper')
-rw-r--r--Games/Minesweeper/main.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Games/Minesweeper/main.cpp b/Games/Minesweeper/main.cpp
index a66f53c06d..9ae7c9ca21 100644
--- a/Games/Minesweeper/main.cpp
+++ b/Games/Minesweeper/main.cpp
@@ -1,5 +1,6 @@
#include "Field.h"
#include <LibCore/CConfigFile.h>
+#include <LibDraw/PNGLoader.h>
#include <LibGUI/GAction.h>
#include <LibGUI/GApplication.h>
#include <LibGUI/GBoxLayout.h>
@@ -93,7 +94,7 @@ int main(int argc, char** argv)
window->show();
- window->set_icon_path("/res/icons/minesweeper/mine.png");
+ window->set_icon(load_png("/res/icons/minesweeper/mine.png"));
return app.exec();
}