[GTK4] How to show window above tray menu when clicked?

image

I want to develop an application which stays on dash as icon.

When a user click on the icon, I want to show a custom window but not just a menu.

For example Time & Weather app on dash is similiar to what I want, it has custom widgets in it:

How can I do this? How can I put an icon to dash and what is the correct way to design a window to popup on it? Thanks!

( I tried deprecated tray menu icons but it is deprecated and requires an extension to work. Also I want to show the app above the icon, but this cannot be achieved on Wayland because can’t set the coordinates of the window from GTK)

The windows shown in the screenshots are not apps. They are part of GNOME Shell itself.

If you want to add something new to the panel, you’ll have to write a shell extension.