Gtk3 Popover outside the window
Asked Answered
M

1

7

How can i make Popover appears outside application window like menu in gnome-shell panel? Or should i use another GTK widget?

gnome-shell panel popup menu

Marra answered 16/11, 2015 at 19:45 Comment(9)
If I recall correctly, this is a limitation of GTK+; sorry.Chromo
@Chromo But how gnome-shell panel works?Marra
Gnome-shell isn't GTK. It renders the desktop, so it can draw outside of windows if it likes.Xeroderma
@ptomato, I dig in source, and think that Gnome-shell uses Clutter as container for GTK Widget. I made undecorated transparent window with this stack, but still not found good method for embedding gtk widget.Marra
I believe on Wayland GtkPopovers can go beyond the window though.Finnougric
Exactly, this is an X11 implementation limitation one of GTK+. There could easily be a workaround, but nobody has implemented it and all manpower now goes to wayland.Melloney
On sway, it appears that popovers can go beyond the window, but then they do not receive any mouse events :/Disjoint
So necro. Much postMarra
There is no "necro" when it comes to useful information. People update old content all the time - see wikipedia. You don't need to tell others about that br. - many old answers can still be partially correct but simply require more information to work. Perhaps things have changed in GTK4 now, I would not be surprised.Scudo
J
1

This should be possible (at least on wayland). gtk_popover_set_constrain_to (GtkPopover *popover, GtkPopoverConstraint constraint); "GTK_POPOVER_CONSTRAINT_NONE"

and

gtk_popover_set_pointing_to (GtkPopover *popover, const GdkRectangle *rect);

Jehu answered 3/1, 2021 at 14:16 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.