Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2017-02-23 18:32:33 +0000
committerAlexander Kurtakov2017-02-23 18:44:32 +0000
commit7cae20325233990f595e6a68eb77b2b89014ab82 (patch)
tree6df637cd716115ad4f973e7b81a65bd8cec01db9 /bundles/org.eclipse.swt/Eclipse SWT PI
parentf3e5b6a5ba2e8349ef431dd087a6ea8375e7fbe1 (diff)
downloadeclipse.platform.swt-7cae20325233990f595e6a68eb77b2b89014ab82.tar.gz
eclipse.platform.swt-7cae20325233990f595e6a68eb77b2b89014ab82.tar.xz
eclipse.platform.swt-7cae20325233990f595e6a68eb77b2b89014ab82.zip
Bug 512659 - Shell with SWT.NO_TRIM still has title bar under Wayland
Use gtk_window_set_decorated and do that in createHandle as calls like that after the window is shown will have no effect. Change-Id: I5a7d2614a1ed8ed9d4e3818677a6758a4ee1aede Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT PI')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c10
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c1
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h1
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java15
4 files changed, 26 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c
index 82fe47869a..021736bb59 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c
@@ -17323,6 +17323,16 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1window_1resize)
}
#endif
+#ifndef NO__1gtk_1window_1set_1decorated
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1window_1set_1decorated)
+ (JNIEnv *env, jclass that, jintLong arg0, jboolean arg1)
+{
+ OS_NATIVE_ENTER(env, that, _1gtk_1window_1set_1decorated_FUNC);
+ gtk_window_set_decorated((GtkWindow *)arg0, (gboolean)arg1);
+ OS_NATIVE_EXIT(env, that, _1gtk_1window_1set_1decorated_FUNC);
+}
+#endif
+
#ifndef NO__1gtk_1window_1set_1default
JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1window_1set_1default)
(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c
index bf8e48c499..575d2eb4df 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c
@@ -1406,6 +1406,7 @@ char * OS_nativeFunctionNames[] = {
"_1gtk_1window_1new",
"_1gtk_1window_1remove_1accel_1group",
"_1gtk_1window_1resize",
+ "_1gtk_1window_1set_1decorated",
"_1gtk_1window_1set_1default",
"_1gtk_1window_1set_1destroy_1with_1parent",
"_1gtk_1window_1set_1geometry_1hints",
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h
index 144a5e02b0..07ae755ae7 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h
@@ -1416,6 +1416,7 @@ typedef enum {
_1gtk_1window_1new_FUNC,
_1gtk_1window_1remove_1accel_1group_FUNC,
_1gtk_1window_1resize_FUNC,
+ _1gtk_1window_1set_1decorated_FUNC,
_1gtk_1window_1set_1default_FUNC,
_1gtk_1window_1set_1destroy_1with_1parent_FUNC,
_1gtk_1window_1set_1geometry_1hints_FUNC,
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 c44775d087..fde5d06134 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
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2016 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2017 IBM Corporation and others. All rights reserved.
* The contents of this file are made available under the terms
* of the GNU Lesser General Public License (LGPL) Version 2.1 that
* accompanies this distribution (lgpl-v21.txt). The LGPL is also
@@ -14716,6 +14716,19 @@ public static final void gtk_window_set_default(long /*int*/ window, long /*int*
}
/**
* @param window cast=(GtkWindow *)
+ * @param decorated cast=(gboolean)
+ */
+public static final native void _gtk_window_set_decorated(long /*int*/ window, boolean decorated);
+public static final void gtk_window_set_decorated(long /*int*/ window, boolean decorated) {
+ lock.lock();
+ try {
+ _gtk_window_set_decorated(window, decorated);
+ } finally {
+ lock.unlock();
+ }
+}
+/**
+ * @param window cast=(GtkWindow *)
* @param setting cast=(gboolean)
*/
public static final native void _gtk_window_set_destroy_with_parent(long /*int*/ window, boolean setting);

Back to the top