ppy / osu-framework

A game framework written with osu! in mind.
MIT License
1.67k stars 419 forks source link

Add notification tray icon on windows (boss key) #6341

Open adryzz opened 4 months ago

adryzz commented 4 months ago

This PR adds support for creating/removing notification tray icons, needed for boss key support.

This implementation is windows-only, i have a linux one half working but it'll be its own separate patch.

On windows, notification tray icons are closely intertwined with windowing logic, so i had to add 2 methods to IWindow to handle that.

osu!-side PR: https://github.com/ppy/osu/pull/28972

https://github.com/user-attachments/assets/27f1c4f2-09d9-4742-bf0b-641dc3a94fd4

In my testing there's a problem with hiding the game window, and it looks like there's 2 windows, one that gets hidden and the other that remains, but i don't know if that's a framework issue or an osu! side issue.

https://github.com/user-attachments/assets/254eb751-b93b-483a-905d-779fe20a3098

EDIT: this only happens in fullscreen, borderless and windowed work just fine.

image