forked from AuroraMiddleware/gtk
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
This commit is contained in:
parent
9f2e0902f6
commit
25721ae3e7
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user