Commit 25721ae3 authored by Carlos Garnacho's avatar Carlos Garnacho Committed by Matthias Clasen

window: Only avoid queueing resizes if the popover position didn't change

If the same position is requested on a popover, it should at least ensure
the window is realized and raised, even if no resizes are queued on the
content. Otherwise other widgets being mapped might raise the windows over
the popover's if its original position is unchanged.

https://bugzilla.gnome.org/show_bug.cgi?id=734129
parent 9f2e0902
......@@ -11489,6 +11489,7 @@ _gtk_window_set_popover_position (GtkWindow *window,
GtkPositionType pos,
const cairo_rectangle_int_t *rect)
{
gboolean need_resize = TRUE;
GtkWindowPopover *data;
g_return_if_fail (GTK_IS_WINDOW (window));
......@@ -11507,7 +11508,7 @@ _gtk_window_set_popover_position (GtkWindow *window,
{
if (data->pos == pos &&
memcmp (&data->rect, rect, sizeof (cairo_rectangle_int_t)) == 0)
return;
need_resize = FALSE;
}
data->rect = *rect;
......@@ -11524,7 +11525,8 @@ _gtk_window_set_popover_position (GtkWindow *window,
gdk_window_raise (data->window);
}
gtk_widget_queue_resize (popover);
if (need_resize)
gtk_widget_queue_resize (popover);
}
void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment