[gtk/gtk-3-22: 1/2] entrycompletion: Realize popup after setting screen
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/gtk-3-22: 1/2] entrycompletion: Realize popup after setting screen
- Date: Thu, 15 Mar 2018 17:50:04 +0000 (UTC)
commit ba83a2c46b44d51cec995246f38682f845e4ad69
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Wed Mar 14 11:54:02 2018 +0800
entrycompletion: Realize popup after setting screen
Realization is done as a side effect of calling
_gtk_entry_completion_resize_popup(), but if this is done before the
GdkScreen of the GtkWindow is set up correctly, it may result in the
widget being unrealized when the screen is updated. This may happen
when the file dialog parent window is not using the default GdkDisplay.
To avoid this issue, realize the popup after the screen has been
properly set up.
Fixes #83 in gtk3
gtk/gtkentrycompletion.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkentrycompletion.c b/gtk/gtkentrycompletion.c
index 2ab53d6bdc..8c80b1c058 100644
--- a/gtk/gtkentrycompletion.c
+++ b/gtk/gtkentrycompletion.c
@@ -1648,8 +1648,6 @@ gtk_entry_completion_popup (GtkEntryCompletion *completion)
/* default on no match */
completion->priv->current_selected = -1;
- _gtk_entry_completion_resize_popup (completion);
-
toplevel = gtk_widget_get_toplevel (completion->priv->entry);
if (GTK_IS_WINDOW (toplevel))
{
@@ -1662,6 +1660,8 @@ gtk_entry_completion_popup (GtkEntryCompletion *completion)
gtk_window_set_screen (GTK_WINDOW (completion->priv->popup_window),
gtk_widget_get_screen (completion->priv->entry));
+ _gtk_entry_completion_resize_popup (completion);
+
if (completion->priv->device)
{
gtk_grab_add (completion->priv->popup_window);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]