mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-13 14:00:09 +00:00
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master See merge request GNOME/gtk!2779
This commit is contained in:
commit
ed78fb1366
@ -1491,9 +1491,7 @@ gdk_surface_freeze_updates (GdkSurface *surface)
|
|||||||
|
|
||||||
surface->update_freeze_count++;
|
surface->update_freeze_count++;
|
||||||
if (surface->update_freeze_count == 1)
|
if (surface->update_freeze_count == 1)
|
||||||
{
|
|
||||||
_gdk_frame_clock_uninhibit_freeze (surface->frame_clock);
|
_gdk_frame_clock_uninhibit_freeze (surface->frame_clock);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -2657,18 +2655,6 @@ gdk_synthesize_surface_state (GdkSurface *surface,
|
|||||||
gdk_surface_set_state (surface, (surface->state | set_flags) & ~unset_flags);
|
gdk_surface_set_state (surface, (surface->state | set_flags) & ~unset_flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
hide_popup_chain (GdkSurface *surface)
|
|
||||||
{
|
|
||||||
GdkSurface *parent;
|
|
||||||
|
|
||||||
gdk_surface_hide (surface);
|
|
||||||
|
|
||||||
parent = surface->parent;
|
|
||||||
if (parent->autohide)
|
|
||||||
hide_popup_chain (parent);
|
|
||||||
}
|
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
check_autohide (GdkEvent *event)
|
check_autohide (GdkEvent *event)
|
||||||
{
|
{
|
||||||
@ -2695,10 +2681,23 @@ check_autohide (GdkEvent *event)
|
|||||||
device = gdk_event_get_device (event);
|
device = gdk_event_get_device (event);
|
||||||
if (gdk_device_grab_info (display, device, &grab_surface, NULL))
|
if (gdk_device_grab_info (display, device, &grab_surface, NULL))
|
||||||
{
|
{
|
||||||
if (grab_surface != gdk_event_get_surface (event) &&
|
GdkSurface *event_surface;
|
||||||
|
|
||||||
|
event_surface = gdk_event_get_surface (event);
|
||||||
|
|
||||||
|
if (grab_surface != event_surface &&
|
||||||
|
grab_surface != event_surface->parent &&
|
||||||
grab_surface->autohide)
|
grab_surface->autohide)
|
||||||
{
|
{
|
||||||
hide_popup_chain (grab_surface);
|
GdkSurface *surface = grab_surface;
|
||||||
|
|
||||||
|
do
|
||||||
|
{
|
||||||
|
gdk_surface_hide (surface);
|
||||||
|
surface = surface->parent;
|
||||||
|
}
|
||||||
|
while (surface->autohide && surface != event_surface);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -696,6 +696,8 @@ gtk_menu_section_box_add_custom (GtkPopoverMenu *popover,
|
|||||||
|
|
||||||
stack = gtk_popover_get_child (GTK_POPOVER (popover));
|
stack = gtk_popover_get_child (GTK_POPOVER (popover));
|
||||||
box = GTK_MENU_SECTION_BOX (gtk_stack_get_child_by_name (GTK_STACK (stack), "main"));
|
box = GTK_MENU_SECTION_BOX (gtk_stack_get_child_by_name (GTK_STACK (stack), "main"));
|
||||||
|
if (box == NULL)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
slot = (GtkWidget *)g_hash_table_lookup (box->custom_slots, id);
|
slot = (GtkWidget *)g_hash_table_lookup (box->custom_slots, id);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user