Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelipe Heidrich2003-07-18 18:41:12 +0000
committerFelipe Heidrich2003-07-18 18:41:12 +0000
commit1a8f8051844a26b6c79ba409bc51ec148ff096fd (patch)
tree1bccdf62fedfe4210d82b5e7cef303623d3156f8
parent298d47afaeaee32d403fc96fe30efcf595859927 (diff)
downloadeclipse.platform.swt-V3_0M2.tar.gz
eclipse.platform.swt-V3_0M2.tar.xz
eclipse.platform.swt-V3_0M2.zip
*** empty log message ***v3014eV3_0M2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java37
1 files changed, 21 insertions, 16 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java
index 3712e2ac63..c7075b43f7 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java
@@ -947,25 +947,30 @@ public void setVisible (boolean visible) {
sendEvent (SWT.Show);
// widget could be disposed at this point
if (isDisposed ()) return;
- OS.gtk_widget_show (shellHandle);
-
+
//TEMPORARY CODE
- final boolean[] mapped = new boolean [1];
- Callback proc = new Callback(new Object() {
- public int proc(int widget, int event, int userdata) {
- mapped [0] = true;
- return 0;
+ if (!OS.GTK_WIDGET_MAPPED (shellHandle)) {
+ OS.gtk_widget_show (shellHandle);
+ final boolean[] mapped = new boolean [1];
+ Callback proc = new Callback(new Object() {
+ public int proc(int widget, int event, int userdata) {
+ mapped [0] = true;
+ return 0;
+ }
+ }, "proc", 3);
+ int id = OS.g_signal_connect (shellHandle, OS.map_event, proc.getAddress (), 0);
+ while (!isDisposed () && !mapped [0]) {
+ OS.gtk_main_iteration ();
}
- }, "proc", 3);
- int id = OS.g_signal_connect (shellHandle, OS.map_event, proc.getAddress (), 0);
- while (!isDisposed () && !mapped [0]) {
- OS.gtk_main_iteration ();
+ proc.dispose();
+ //widget could be disposed at this point
+ if (isDisposed ()) return;
+ OS.g_signal_handler_disconnect (shellHandle, id);
+ } else {
+ OS.gtk_widget_show (shellHandle);
}
- proc.dispose();
- // widget could be disposed at this point
- if (isDisposed ()) return;
- OS.g_signal_handler_disconnect (shellHandle, id);
-
+ //widget could be disposed at this point
+ if (isDisposed ()) return;
adjustTrim ();
} else {
OS.gtk_widget_hide (shellHandle);

Back to the top