Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Williams2019-04-16 13:49:37 -0400
committerEric Williams2019-04-16 13:52:45 -0400
commitbfbff4c83c848210dc0210324cab85b42b965a4e (patch)
tree62d7cc1cd7b31dc1b10b16f41d059926a52c7480 /bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library
parentbb98207d55709a339e0a6668837bc9377d627a44 (diff)
downloadeclipse.platform.swt-bfbff4c83c848210dc0210324cab85b42b965a4e.tar.gz
eclipse.platform.swt-bfbff4c83c848210dc0210324cab85b42b965a4e.tar.xz
eclipse.platform.swt-bfbff4c83c848210dc0210324cab85b42b965a4e.zip
Bug 546488: [GTK4] Cursor never reverts back to normal
Use gtk_widget_set_cursor() in certain instances in order to make sure the cursor is set/unset properly. Change-Id: Iad680c4ab71aae79faf6ac7e61513b793dd5380a Signed-off-by: Eric Williams <ericwill@redhat.com>
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library')
-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.h1
-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
4 files changed, 13 insertions, 0 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 90815ab001..483247a7d2 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
@@ -12672,6 +12672,16 @@ fail:
}
#endif
+#ifndef NO__1gtk_1widget_1set_1cursor
+JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1set_1cursor)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1)
+{
+ GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1set_1cursor_FUNC);
+ gtk_widget_set_cursor((GtkWidget *)arg0, (GdkCursor *)arg1);
+ GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1set_1cursor_FUNC);
+}
+#endif
+
#ifndef NO__1gtk_1widget_1set_1default_1direction
JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1set_1default_1direction)
(JNIEnv *env, jclass that, jint arg0)
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.h b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.h
index 1b346b1121..99b1e5f6b5 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.h
@@ -451,6 +451,7 @@
#define NO__1gdk_1cursor_1new_1from_1name___3BI
#define NO__1gdk_1cursor_1new_1from_1name___3BJ
#define NO__1gdk_1cursor_1new_1from_1texture
+#define NO__1gtk_1widget_1set_1cursor
// No GdkTexture on GTK3
#define NO__1gdk_1texture_1new_1for_1pixbuf
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 d863e2af8f..d507b756f3 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
@@ -998,6 +998,7 @@ char * GTK_nativeFunctionNames[] = {
"_1gtk_1widget_1set_1can_1default",
"_1gtk_1widget_1set_1can_1focus",
"_1gtk_1widget_1set_1clip",
+ "_1gtk_1widget_1set_1cursor",
"_1gtk_1widget_1set_1default_1direction",
"_1gtk_1widget_1set_1direction",
"_1gtk_1widget_1set_1double_1buffered",
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 cbb6566264..b895961cfe 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
@@ -996,6 +996,7 @@ typedef enum {
_1gtk_1widget_1set_1can_1default_FUNC,
_1gtk_1widget_1set_1can_1focus_FUNC,
_1gtk_1widget_1set_1clip_FUNC,
+ _1gtk_1widget_1set_1cursor_FUNC,
_1gtk_1widget_1set_1default_1direction_FUNC,
_1gtk_1widget_1set_1direction_FUNC,
_1gtk_1widget_1set_1double_1buffered_FUNC,

Back to the top