mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-11 11:20:12 +00:00
[broadway] Correctly track remote visible state
GDK_WINDOW_IS_MAPPED is not false for withdrawn windows, so we need to track real visibility ourselves.
This commit is contained in:
parent
33d16b16c9
commit
7b3b4a6ad9
@ -229,7 +229,9 @@ _gdk_broadway_resync_windows (void)
|
|||||||
window->window_type == GDK_WINDOW_TEMP);
|
window->window_type == GDK_WINDOW_TEMP);
|
||||||
if (impl->transient_for)
|
if (impl->transient_for)
|
||||||
broadway_output_set_transient_for (display->output, impl->id, impl->transient_for);
|
broadway_output_set_transient_for (display->output, impl->id, impl->transient_for);
|
||||||
if (GDK_WINDOW_IS_MAPPED (window))
|
/* Can't check GDK_WINDOW_IS_MAPPED here, because that doesn't correctly handle
|
||||||
|
withdrawn windows like menus */
|
||||||
|
if (impl->visible)
|
||||||
{
|
{
|
||||||
broadway_output_show_surface (display->output, impl->id);
|
broadway_output_show_surface (display->output, impl->id);
|
||||||
window_data_send (display->output, impl);
|
window_data_send (display->output, impl);
|
||||||
@ -521,6 +523,7 @@ gdk_window_broadway_show (GdkWindow *window, gboolean already_mapped)
|
|||||||
GdkBroadwayDisplay *broadway_display;
|
GdkBroadwayDisplay *broadway_display;
|
||||||
|
|
||||||
impl = GDK_WINDOW_IMPL_BROADWAY (window->impl);
|
impl = GDK_WINDOW_IMPL_BROADWAY (window->impl);
|
||||||
|
impl->visible = TRUE;
|
||||||
|
|
||||||
if (window->event_mask & GDK_STRUCTURE_MASK)
|
if (window->event_mask & GDK_STRUCTURE_MASK)
|
||||||
_gdk_make_event (GDK_WINDOW (window), GDK_MAP, NULL, FALSE);
|
_gdk_make_event (GDK_WINDOW (window), GDK_MAP, NULL, FALSE);
|
||||||
@ -543,6 +546,7 @@ gdk_window_broadway_hide (GdkWindow *window)
|
|||||||
GdkBroadwayDisplay *broadway_display;
|
GdkBroadwayDisplay *broadway_display;
|
||||||
|
|
||||||
impl = GDK_WINDOW_IMPL_BROADWAY (window->impl);
|
impl = GDK_WINDOW_IMPL_BROADWAY (window->impl);
|
||||||
|
impl->visible = FALSE;
|
||||||
|
|
||||||
if (window->event_mask & GDK_STRUCTURE_MASK)
|
if (window->event_mask & GDK_STRUCTURE_MASK)
|
||||||
_gdk_make_event (GDK_WINDOW (window), GDK_UNMAP, NULL, FALSE);
|
_gdk_make_event (GDK_WINDOW (window), GDK_UNMAP, NULL, FALSE);
|
||||||
|
@ -60,6 +60,7 @@ struct _GdkWindowImplBroadway
|
|||||||
|
|
||||||
int id;
|
int id;
|
||||||
|
|
||||||
|
gboolean visible;
|
||||||
int transient_for;
|
int transient_for;
|
||||||
|
|
||||||
gint8 toplevel_window_type;
|
gint8 toplevel_window_type;
|
||||||
|
Loading…
Reference in New Issue
Block a user