From 961b2164ce40191070c7ab4caea0adc13e9b82fa Mon Sep 17 00:00:00 2001 From: "pkw%us.ibm.com" Date: Sat, 20 Aug 2005 07:13:17 +0000 Subject: [PATCH] AIX: Calling gtk_realize_widget on a gtk_entry causes a root status window to come up. r=katakai@japan.sun.com, sr=blizzard@mozilla.org, a=asa@mozilla.org --- widget/src/gtk/gtkdrawing.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/widget/src/gtk/gtkdrawing.c b/widget/src/gtk/gtkdrawing.c index 8e0479af32f..ab00801bee9 100644 --- a/widget/src/gtk/gtkdrawing.c +++ b/widget/src/gtk/gtkdrawing.c @@ -132,6 +132,19 @@ ensure_entry_widget() if (!gEntryWidget) { gEntryWidget = gtk_entry_new(); setup_widget_prototype(gEntryWidget); +#ifdef _AIX + /* On AIX, calling gdk_widget_realize on a gtk entry with an + * input context style of type GDK_IM_STATUS_NOTHING causes a + * root status window to come up. It remains up until the widget + * is destroyed (which is never in this case). To work around + * this problem, we destroy its XIC here to prevent the root + * status window from remaining on the screen. */ + if (GTK_EDITABLE(gEntryWidget)->ic && + GTK_EDITABLE(gEntryWidget)->ic_attr->style & GDK_IM_STATUS_NOTHING) { + gdk_ic_destroy(GTK_EDITABLE(gEntryWidget)->ic); + GTK_EDITABLE(gEntryWidget)->ic = NULL; + } +#endif } return MOZ_GTK_SUCCESS; }