1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:47:45 +00:00

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.
This commit is contained in:
Andreas Kling 2019-07-28 10:18:49 +02:00
parent 63619b9f7c
commit 841b2e5d13
21 changed files with 193 additions and 19 deletions

View file

@ -17,6 +17,7 @@
*/
#include <LibDraw/GraphicsBitmap.h>
#include <LibDraw/PNGLoader.h>
#include <LibGUI/GApplication.h>
#include <LibGUI/GLabel.h>
#include <LibGUI/GPainter.h>
@ -229,7 +230,7 @@ int main(int argc, char** argv)
fire->set_stat_label(time);
window->show();
window->set_icon_path("/res/icons/16x16/app-demo.png");
window->set_icon(load_png("/res/icons/16x16/app-demo.png"));
return app.exec();
}