Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRolf Theunissen2016-10-09 11:20:12 +0000
committerRolf Theunissen2016-10-09 11:40:10 +0000
commit2812dab7c573c1bb3a52aef6a74d5cf6314899fb (patch)
tree7f3b799ab0ddbb95f6c4835e5e2e198f863a9a04
parentf8861741ba8263ba52fd1fc7220277f2135cbb01 (diff)
downloadeclipse.platform.swt-2812dab7c573c1bb3a52aef6a74d5cf6314899fb.tar.gz
eclipse.platform.swt-2812dab7c573c1bb3a52aef6a74d5cf6314899fb.tar.xz
eclipse.platform.swt-2812dab7c573c1bb3a52aef6a74d5cf6314899fb.zip
Bug 505604 - OS.GTK_IS_PLUG should only be called when OS.isX11
Guard X11 calls at runtime. Signed-off-by: Rolf Theunissen <rolf.theunissen@altran.com>
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java5
1 files changed, 3 insertions, 2 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 a3b61bd44e..1e858c052d 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
@@ -770,6 +770,7 @@ void createHandle (int index) {
@Override
long /*int*/ filterProc (long /*int*/ xEvent, long /*int*/ gdkEvent, long /*int*/ data2) {
+ if (!OS.isX11()) return 0;
int eventType = OS.X_EVENT_TYPE (xEvent);
if (eventType != OS.FocusOut && eventType != OS.FocusIn) return 0;
XFocusChangeEvent xFocusEvent = new XFocusChangeEvent();
@@ -2389,7 +2390,7 @@ public void setVisible (boolean visible) {
OS.gtk_widget_show (shellHandle);
if (enableWindow != 0) OS.gdk_window_raise (enableWindow);
if (isDisposed ()) return;
- if (!OS.GTK_IS_PLUG (shellHandle)) {
+ if (!(OS.isX11() && OS.GTK_IS_PLUG (shellHandle))) {
display.dispatchEvents = new int [] {
OS.GDK_EXPOSE,
OS.GDK_FOCUS_CHANGE,
@@ -2575,7 +2576,7 @@ int trimWidth () {
}
void updateModal () {
- if (OS.GTK_IS_PLUG (shellHandle)) return;
+ if (OS.isX11() && OS.GTK_IS_PLUG (shellHandle)) return;
long /*int*/ group = 0;
boolean isModalShell = false;
if (display.getModalDialog () == null) {

Back to the top