summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBilly Biggs <bbiggs>2005-05-09 18:12:15 +0000
committerBilly Biggs <bbiggs>2005-05-09 18:12:15 +0000
commitb1a22393d3a58b25d5d2f699eebfe7eacef313f4 (patch)
tree8c91748b953492d6c0798e811943a2080fefa5e4
parent1a6a67f9df122e586724d5c54e1a58995ea075df (diff)
downloadeclipse.platform.swt-b1a22393d3a58b25d5d2f699eebfe7eacef313f4.tar.gz
eclipse.platform.swt-b1a22393d3a58b25d5d2f699eebfe7eacef313f4.tar.xz
eclipse.platform.swt-b1a22393d3a58b25d5d2f699eebfe7eacef313f4.zip
72784
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java1
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java3
2 files changed, 3 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java
index 77789a0c2c..57c5917b85 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java
@@ -505,6 +505,7 @@ public static final int Above = 0;
public static final int Below = 1;
public static final int ButtonRelease = 5;
public static final int ClientMessage = 33;
+public static final int CurrentTime = 0;
public static final int CWSibling = 0x20;
public static final int CWStackMode = 0x40;
public static final int EnterNotify = 7;
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 a28f3e6ecd..d8ba414669 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
@@ -424,7 +424,8 @@ void bringToTop (boolean force) {
int /*long*/ xDisplay = OS.gdk_x11_drawable_get_xdisplay (window);
int /*long*/ xWindow = OS.gdk_x11_drawable_get_xid (window);
OS.gdk_error_trap_push ();
- OS.XSetInputFocus (xDisplay, xWindow, OS.RevertToParent, OS.gtk_get_current_event_time ());
+ /* Use CurrentTime instead of the last event time to ensure that the shell becomes active */
+ OS.XSetInputFocus (xDisplay, xWindow, OS.RevertToParent, OS.CurrentTime);
OS.gdk_error_trap_pop ();
} else {
OS.gdk_window_focus (window, OS.gtk_get_current_event_time ());