Create new window/widget from extension?

I am currently creating an extension for a customer. All I ever did was creating top panel buttons for my extensions, but the customer wants a new borderless, allways on top window / popup / widget in the corner of the desktop which shows and hides to some signals.

I read through some other extensions to find clues on how to add a widget to the desktop by itself. But all I ever found was that these extensions use allready defined containers of the imports.ui.main.layoutManager or other predefined containers.

I extend a St.Widget as my widget which I want to show. How do I, for example, add it in the bottom right corner, allways on top of all other windows and still be able to controll the underlaying windows? Not like the Alt + F2 command input modal which supresses controll of the underlaying programm?

Anyone got some ideas or clues?
Thanks in advance.

I would use the global.stage.add_actor(widget) function to add the widget on the screen. The widget would be on top of everything (except magnified view from accessibility menu) and transparent for the mouse events. The position must be calculated within global.display.get_monitor_geometry(monitorIndex).

I tried this, finaly, last week. Worked like a charm.
I used Main.layoutManager.primaryMonitor as source of my calculations for the postioning with this.set_position(x, y).
While St.Button doesn’t react on hovering, the click event on them is captured and can be used.

Thank you for the solution.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.