summaryrefslogtreecommitdiffstats
path: root/bundles
diff options
context:
space:
mode:
authorBilly Biggs <bbiggs>2005-04-29 16:31:48 +0000
committerBilly Biggs <bbiggs>2005-04-29 16:31:48 +0000
commita98644bc0b6dc757301b2cc6d635f4f25fb4039d (patch)
tree20abd3c8fcaf33c62ebdd5cc605cfdd8466b060b /bundles
parent37a18d1950a562443022016a81fc59b3ff133076 (diff)
downloadeclipse.platform.swt-a98644bc0b6dc757301b2cc6d635f4f25fb4039d.tar.gz
eclipse.platform.swt-a98644bc0b6dc757301b2cc6d635f4f25fb4039d.tar.xz
eclipse.platform.swt-a98644bc0b6dc757301b2cc6d635f4f25fb4039d.zip
93222
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.gtk.OS.properties3
-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.c5
-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.java9
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java7
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java7
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java14
9 files changed, 51 insertions, 6 deletions
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.gtk.OS.properties b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.gtk.OS.properties
index 0d0a4488b3..b4c46b1459 100644
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.gtk.OS.properties
+++ b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.gtk.OS.properties
@@ -670,6 +670,9 @@ OS__XDefaultRootWindow_0=cast=Display *
OS__XDefaultScreen=
OS__XDefaultScreen_0=cast=Display *
+OS__XFlush=
+OS__XFlush_0=cast=(Display *)
+
OS__XFree=
OS__XFree_0=cast=void *
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 afadbf82fd..f8a2dc65a9 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
@@ -1301,6 +1301,16 @@ JNIEXPORT jint JNICALL OS_NATIVE(_1XDefaultScreen)
}
#endif
+#ifndef NO__1XFlush
+JNIEXPORT void JNICALL OS_NATIVE(_1XFlush)
+ (JNIEnv *env, jclass that, jint arg0)
+{
+ OS_NATIVE_ENTER(env, that, _1XFlush_FUNC);
+ XFlush((Display *)arg0);
+ OS_NATIVE_EXIT(env, that, _1XFlush_FUNC);
+}
+#endif
+
#ifndef NO__1XFree
JNIEXPORT void JNICALL OS_NATIVE(_1XFree)
(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 12f869d9e1..4bdac2fd98 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
@@ -48,6 +48,7 @@
#define NO__1XCheckIfEvent
#define NO__1XDefaultScreen
#define NO__1XDefaultRootWindow
+#define NO__1XFlush
#define NO__1XGetSelectionOwner
#define NO__1XQueryTree
#define NO__1XKeysymToKeycode
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 ed7b3fe8cc..744ce16302 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
@@ -18,8 +18,8 @@
#ifdef NATIVE_STATS
-int OS_nativeFunctionCount = 982;
-int OS_nativeFunctionCallCount[982];
+int OS_nativeFunctionCount = 983;
+int OS_nativeFunctionCallCount[983];
char * OS_nativeFunctionNames[] = {
"Call",
"GDK_1WINDOWING_1X11",
@@ -130,6 +130,7 @@ char * OS_nativeFunctionNames[] = {
"_1XCheckWindowEvent",
"_1XDefaultRootWindow",
"_1XDefaultScreen",
+ "_1XFlush",
"_1XFree",
"_1XGetSelectionOwner",
"_1XInternAtom",
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 d76c9c1edb..71b39fb864 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
@@ -134,6 +134,7 @@ typedef enum {
_1XCheckWindowEvent_FUNC,
_1XDefaultRootWindow_FUNC,
_1XDefaultScreen_FUNC,
+ _1XFlush_FUNC,
_1XFree_FUNC,
_1XGetSelectionOwner_FUNC,
_1XInternAtom_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 08c8eaacc5..655e743174 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
@@ -587,6 +587,15 @@ public static final int /*long*/ XDefaultRootWindow(int /*long*/ display) {
lock.unlock();
}
}
+public static final native void _XFlush(int /*long*/ display);
+public static final void XFlush(int /*long*/ display) {
+ lock.lock();
+ try {
+ _XFlush(display);
+ } finally {
+ lock.unlock();
+ }
+}
public static final native void _XFree(int /*long*/ address);
public static final void XFree(int /*long*/ address) {
lock.lock();
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 2489f4677b..4b76d0c1f2 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
@@ -2590,7 +2590,12 @@ void setCursor (int /*long*/ cursor) {
int /*long*/ window = paintWindow ();
if (window != 0) {
OS.gdk_window_set_cursor (window, cursor);
- OS.gdk_flush ();
+ if (!OS.GDK_WINDOWING_X11 ()) {
+ OS.gdk_flush ();
+ } else {
+ int /*long*/ xDisplay = OS.GDK_DISPLAY ();
+ OS.XFlush (xDisplay);
+ }
}
}
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 c1402e9abc..f785e6b7c8 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
@@ -597,7 +597,12 @@ public void asyncExec (Runnable runnable) {
public void beep () {
if (!isValidThread ()) error (SWT.ERROR_THREAD_INVALID_ACCESS);
OS.gdk_beep();
- OS.gdk_flush();
+ if (!OS.GDK_WINDOWING_X11 ()) {
+ OS.gdk_flush ();
+ } else {
+ int /*long*/ xDisplay = OS.GDK_DISPLAY ();
+ OS.XFlush (xDisplay);
+ }
}
protected void checkDevice () {
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 3d8c377808..c48407699c 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
@@ -1075,7 +1075,12 @@ int setBounds (int x, int y, int width, int height, boolean move, boolean resize
void setCursor (int /*long*/ cursor) {
if (enableWindow != 0) {
OS.gdk_window_set_cursor (enableWindow, cursor);
- OS.gdk_flush ();
+ if (!OS.GDK_WINDOWING_X11 ()) {
+ OS.gdk_flush ();
+ } else {
+ int /*long*/ xDisplay = OS.GDK_DISPLAY ();
+ OS.XFlush (xDisplay);
+ }
}
super.setCursor (cursor);
}
@@ -1119,7 +1124,12 @@ public void setEnabled (boolean enabled) {
if (enableWindow != 0) {
if (cursor != null) {
OS.gdk_window_set_cursor (enableWindow, cursor.handle);
- OS.gdk_flush ();
+ if (!OS.GDK_WINDOWING_X11 ()) {
+ OS.gdk_flush ();
+ } else {
+ int /*long*/ xDisplay = OS.GDK_DISPLAY ();
+ OS.XFlush (xDisplay);
+ }
}
OS.gdk_window_set_user_data (enableWindow, parentHandle);
OS.gdk_window_show (enableWindow);