Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Williams2019-01-17 10:36:03 -0500
committerEric Williams2019-01-17 10:45:55 -0500
commitdc3bb22999125806861acbbcc02236b8df519d05 (patch)
tree7377003c6f3098265766daee933eb31796f23ace
parentb9f753eab5d34a9451bdb38ca8d97953775601d9 (diff)
downloadeclipse.platform.swt-dc3bb22999125806861acbbcc02236b8df519d05.tar.gz
eclipse.platform.swt-dc3bb22999125806861acbbcc02236b8df519d05.tar.xz
eclipse.platform.swt-dc3bb22999125806861acbbcc02236b8df519d05.zip
Bug 539706: [GTK3] Replace deprecated gdk_flush()
Remove gdk_flush() as it can cause crashes. This function was already removed on GTK4, and AFAICT it is not needed on GTK3. Change-Id: I306cd3ad4336f719628242f717d653e04afbda82 Signed-off-by: Eric Williams <ericwill@redhat.com>
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c18
-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/GDK.java13
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java1
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java2
7 files changed, 0 insertions, 38 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 951296034d..10ccc1f87e 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
@@ -1273,24 +1273,6 @@ JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1event_1set_1device)
}
#endif
-#ifndef NO__1gdk_1flush
-JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1flush)
- (JNIEnv *env, jclass that)
-{
- GDK_NATIVE_ENTER(env, that, _1gdk_1flush_FUNC);
-/*
- gdk_flush();
-*/
- {
- GDK_LOAD_FUNCTION(fp, gdk_flush)
- if (fp) {
- ((void (CALLING_CONVENTION*)())fp)();
- }
- }
- GDK_NATIVE_EXIT(env, that, _1gdk_1flush_FUNC);
-}
-#endif
-
#ifndef NO__1gdk_1get_1default_1root_1window
JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1get_1default_1root_1window)
(JNIEnv *env, jclass that)
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 83d268442a..aab50dea25 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
@@ -123,7 +123,6 @@ char * GDK_nativeFunctionNames[] = {
"_1gdk_1event_1peek",
"_1gdk_1event_1put",
"_1gdk_1event_1set_1device",
- "_1gdk_1flush",
"_1gdk_1get_1default_1root_1window",
"_1gdk_1keymap_1get_1entries_1for_1keyval",
"_1gdk_1keymap_1get_1for_1display",
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 b7245e7950..48066bcd1b 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
@@ -133,7 +133,6 @@ typedef enum {
_1gdk_1event_1peek_FUNC,
_1gdk_1event_1put_FUNC,
_1gdk_1event_1set_1device_FUNC,
- _1gdk_1flush_FUNC,
_1gdk_1get_1default_1root_1window_FUNC,
_1gdk_1keymap_1get_1entries_1for_1keyval_FUNC,
_1gdk_1keymap_1get_1for_1display_FUNC,
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GDK.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GDK.java
index d8500816ab..32067e48e7 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GDK.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GDK.java
@@ -1249,19 +1249,6 @@ public class GDK extends OS {
lock.unlock();
}
}
- /**
- * @method flags=dynamic
- */
- public static final native void _gdk_flush();
- /** [GTK3 only] */
- public static final void gdk_flush() {
- lock.lock();
- try {
- _gdk_flush();
- } finally {
- lock.unlock();
- }
- }
public static final native long /*int*/ _gdk_get_default_root_window();
/** [GTK3 only, if-def'd in os.h] */
public static final long /*int*/ gdk_get_default_root_window() {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java
index a48dfa48bc..294e7e740b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java
@@ -4916,7 +4916,6 @@ void setCursor (long /*int*/ cursor) {
long /*int*/ window = eventWindow ();
if (window != 0) {
GDK.gdk_window_set_cursor (window, cursor);
- GDK.gdk_flush ();
}
}
}
@@ -6445,7 +6444,6 @@ void update (boolean all, boolean flush) {
if (GTK.GTK_VERSION < OS.VERSION(3, 16, 0)) {
GDK.gdk_window_process_updates (window, all);
}
- if (!GTK.GTK4) GDK.gdk_flush ();
}
void updateBackgroundMode () {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java
index 1e321e6895..7038d1fcae 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java
@@ -877,7 +877,6 @@ public void asyncExec (Runnable runnable) {
public void beep () {
if (!isValidThread ()) error (SWT.ERROR_THREAD_INVALID_ACCESS);
GDK.gdk_display_beep(GDK.gdk_display_get_default());
- GDK.gdk_flush ();
}
long /*int*/ cellDataProc (long /*int*/ tree_column, long /*int*/ cell, long /*int*/ tree_model, long /*int*/ iter, long /*int*/ data) {
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 a0df7af801..bf86bc343b 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
@@ -2084,7 +2084,6 @@ void setCursor (long /*int*/ cursor) {
} else {
if (enableWindow != 0) {
GDK.gdk_window_set_cursor (enableWindow, cursor);
- GDK.gdk_flush ();
}
}
super.setCursor (cursor);
@@ -2152,7 +2151,6 @@ public void setEnabled (boolean enabled) {
if (enableWindow != 0) {
if (cursor != null) {
GDK.gdk_window_set_cursor (enableWindow, cursor.handle);
- GDK.gdk_flush ();
}
/* 427776: we need to listen to all enter-notify-event signals to
* see if this new GdkWindow has been added to a widget's internal

Back to the top