Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Popups on Wayland #2538

Open
ngortheone opened this issue Jan 3, 2023 · 4 comments
Open

Popups on Wayland #2538

ngortheone opened this issue Jan 3, 2023 · 4 comments
Labels
feature New feature or request native-linux Problem specific to Linux

Comments

@ngortheone
Copy link

ngortheone commented Jan 3, 2023

Popups on Wayland are rendered to a separate surface, which allows a popup to extend beyond the area of the main window. This is useful for creating applications like docks/panels - think of classic Windows "Start" button that shows a popup menu with installed programs. (and any other application that has small height)

A demonstration of popups on wayland:

recording.3.webm

It appears that with egui popups are rendered to the same surface as the main window ( at least this is how demo app behaves)

I am very new to egui, is it possible to do this with egui today? Would it be possible to add such functionality? (If not supported today)? I'd love to dive into the code and contribute this feature, please give me some pointers if possible

Thanks!

@ngortheone ngortheone added the feature New feature or request label Jan 3, 2023
@ngortheone
Copy link
Author

Popups in demo app on wayland today:

recording.4.webm

@coderedart
Copy link
Contributor

egui doesn't have support for native popups. this requires native UI toolkit support (gtk/fltk etc..). As far as egui is concerned, there is just one giant rectangle (viewport) inside which it draws the ui.

@parasyte
Copy link
Contributor

parasyte commented Jan 3, 2023

It is certainly true that as of today, the "single surface principle" is how egui operates. But I do believe it ought to be capable of creating and rasterizing to multiple surfaces, given the capability is exposed at a separate abstraction layer. An example of such a layer might be glazier, whose "Scope" includes this as it's number one bullet point:

  • Window creation, including subwindows (useful for context menus and the like).

I don't believe it's contentious that this is a desired property to have. It just happens to be missing from the status quo.

I would also point out that this limitation is not restricted to Wayland, nor should any solution be constrained to Wayland. It is relevant across all platforms.

See also: #1176

@codecnotsupported
Copy link

I'd like to propose a suggestion, it would be possible to make the pup-op menu scroll-able.
Here's what it looks like in Obsidian (I think it works around the same limitation).

Scrollable.mp4

@emilk emilk added the native-linux Problem specific to Linux label Sep 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request native-linux Problem specific to Linux
Projects
None yet
Development

No branches or pull requests

5 participants