mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-13 04:10:13 +00:00
gdkwayland-window: Don't map the grab transfer menu for GtkMenu
This is a bad idea in general, but it also means that the focus for a window drops when we pop up a menu, since the grab transfer menu exists.
This commit is contained in:
parent
f5d1d31043
commit
966b191e13
@ -1031,12 +1031,25 @@ find_grab_input_seat (GdkWindow *window, GdkWindow *transient_for)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
should_be_mapped (GdkWindow *window)
|
||||||
|
{
|
||||||
|
/* Don't map crazy temp that GTK+ uses for internal X11 shenanigans. */
|
||||||
|
if (window->window_type == GDK_WINDOW_TEMP && window->x < 0 && window->y < 0)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gdk_wayland_window_map (GdkWindow *window)
|
gdk_wayland_window_map (GdkWindow *window)
|
||||||
{
|
{
|
||||||
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
|
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
|
||||||
GdkWindow *transient_for;
|
GdkWindow *transient_for;
|
||||||
|
|
||||||
|
if (!should_be_mapped (window))
|
||||||
|
return;
|
||||||
|
|
||||||
if (!impl->mapped && !impl->use_custom_surface)
|
if (!impl->mapped && !impl->use_custom_surface)
|
||||||
{
|
{
|
||||||
/* Popup menus can appear without a transient parent, which means they
|
/* Popup menus can appear without a transient parent, which means they
|
||||||
|
Loading…
Reference in New Issue
Block a user