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

Access GTK window before it's mapped #925

Open
andrewbaxter opened this issue May 11, 2024 · 0 comments
Open

Access GTK window before it's mapped #925

andrewbaxter opened this issue May 11, 2024 · 0 comments

Comments

@andrewbaxter
Copy link

andrewbaxter commented May 11, 2024

Is your feature request related to a problem? Please describe.
I'm trying to do wl-layer-shell stuff on the window the webview is in. Per tauri-apps/wry#1253 I am able to access the gtk window, but it's already mapped at that point it seems (is this due to the redraw call?):

custom_shell_surface_init: assertion '!gtk_widget_get_mapped (GTK_WIDGET (gtk_window))' failed
GtkWindow is not a layer surface. Make sure you called gtk_layer_init_for_window ()
GtkWindow is not a layer surface. Make sure you called gtk_layer_init_for_window ()
GtkWindow is not a layer surface. Make sure you called gtk_layer_init_for_window ()
GtkWindow is not a layer surface. Make sure you called gtk_layer_init_for_window ()
GtkWindow is not a layer surface. Make sure you called gtk_layer_init_for_window ()
GtkWindow is not a layer surface. Make sure you called gtk_layer_init_for_window ()
GtkWindow is not a layer surface. Make sure you called gtk_layer_init_for_window ()
GtkWindow is not a layer surface. Make sure you called gtk_layer_init_for_window ()

Describe the solution you'd like
I'm not sure the best way to do this... maybe in the long run a wl_layer_shell abstraction that could handle other platforms as well would be good.

Either being able to prevent the initial draw/put it off until later (maybe until the event loop starts?) or provide a callback to do stuff with the window earlier on would probably work.

Describe alternatives you've considered
A way to "bring your own window" might be a more flexible solution, for when cross-platform support isn't needed.

Additional context

@amrbashir amrbashir transferred this issue from tauri-apps/wry May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant