aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2011-11-12 11:23:30 +0000
committerAnders Broman <anders.broman@ericsson.com>2011-11-12 11:23:30 +0000
commitec9a5ca9cbe3470a71badb0cc94c8977248e6baf (patch)
tree538a6e51949ba52f2c694d3b3a78091801ca005c
parent292a5b6f93765751cf57278e77b67cd98a4f0bc8 (diff)
From Jan Šafránek:
if the message box is displayed when the main window is in GDK_WINDOW_STATE_WITHDRAWN state (i.e. the main window is being composed and it is not shown yet), the message box gets overlapped by the main window when it's finally shown. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6559 svn path=/trunk/; revision=39800
-rw-r--r--gtk/simple_dialog.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/gtk/simple_dialog.c b/gtk/simple_dialog.c
index 56c4d76e25..1e43a95f86 100644
--- a/gtk/simple_dialog.c
+++ b/gtk/simple_dialog.c
@@ -314,10 +314,11 @@ vsimple_dialog(ESD_TYPE_E type, gint btn_mask, const gchar *msg_format, va_list
state = gdk_window_get_state(gtk_widget_get_window(top_level));
}
- /* If we don't yet have a main window or it's iconified, don't show the
- dialog. If showing up a dialog, while main window is iconified, program
- will become unresponsive! */
- if (top_level == NULL || state & GDK_WINDOW_STATE_ICONIFIED) {
+ /* If we don't yet have a main window or it's iconified or hidden (i.e. not
+ yet ready, don't show the dialog. If showing up a dialog, while main
+ window is iconified, program will become unresponsive! */
+ if (top_level == NULL || state & GDK_WINDOW_STATE_ICONIFIED
+ || state & GDK_WINDOW_STATE_WITHDRAWN) {
queued_message = g_malloc(sizeof (queued_message_t));
queued_message->type = type;