
Screwtape at
I'm trying to write a GTK+-based UI for my favourite terminal-based editor, Kakoune. Kakoune heavily uses its own completion menus, so I couldn't really use the existing GTK+ popup menus, but rather added my own that matched Kakoune's expectations.
Under X11, this is fine and works beautifully.
Under Wayland, well...
- Wayland (or GDK's Wayland backend) tells every window its position is (0,0), so I can't make a menu change direction if it would pop up off the screen.
- Wayland (or GDK's Wayland backend) always reports the full size of the monitor rather than cropping off the space used by launchers/docks/etc., so I can't prevent my menu from overlapping those either
- Thanks to client-side decorations, when I ask "how big is my window" I get a rectangle whose origin is a little bit up and to the left of my actual drawing area, so my menu always appears a bit up and to the left as well.
- GTK+'s built-in menus suffer none of these problems, because GDK provides a special function that does exactly what I want, but it's private and unstable so it's not listed in the documentation and I can't call it.
clacke@libranet.de ❌ likes this.
clacke@libranet.de ❌, clacke@libranet.de ❌, clacke@libranet.de ❌ shared this.

» Screwtape:
“[...] Thanks to client-side decorations [...]”
Yuck!
JanKusanagi at 2018-05-23T13:06:17Z
Screwtape likes this.