1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 03:47:34 +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

@ -111,10 +111,14 @@ struct WSAPI_ServerMessage {
DidGetWallpaper,
DidSetWindowHasAlphaChannel,
ScreenRectChanged,
__Begin_WM_Events__,
WM_WindowRemoved,
WM_WindowStateChanged,
WM_WindowRectChanged,
WM_WindowIconChanged,
WM_WindowIconBitmapChanged,
__End_WM_Events__,
};
Type type { Invalid };
int window_id { -1 };
@ -145,6 +149,8 @@ struct WSAPI_ServerMessage {
bool is_active;
bool is_minimized;
WSAPI_WindowType window_type;
int icon_buffer_id;
WSAPI_Size icon_size;
} wm;
struct {
WSAPI_Rect rect;
@ -229,6 +235,7 @@ struct WSAPI_ClientMessage {
SetWindowIcon,
SetWindowHasAlphaChannel,
MoveWindowToFront,
SetWindowIconBitmap,
};
Type type { Invalid };
int window_id { -1 };
@ -278,6 +285,8 @@ struct WSAPI_ClientMessage {
WSAPI_Size base_size;
WSAPI_Size size_increment;
WSAPI_Color background_color;
int icon_buffer_id;
WSAPI_Size icon_size;
} window;
struct {
WSAPI_Size size;