Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2012-02-28 14:43:32 +0000
committerSilenio Quarti2012-02-28 19:34:17 +0000
commit1d8346aea092907f235391a00d0ca08a5840c300 (patch)
tree26b89d92a8fd544860818669e1a8f0d71d7897cd
parentc4cf222e3fe3cc10edd722f83c8c46fcaaa0e328 (diff)
downloadeclipse.platform.swt-1d8346aea092907f235391a00d0ca08a5840c300.tar.gz
eclipse.platform.swt-1d8346aea092907f235391a00d0ca08a5840c300.tar.xz
eclipse.platform.swt-1d8346aea092907f235391a00d0ca08a5840c300.zip
Replace usage of GDK_DISPLAY with gdk_x11_display_get_xdisplay.
GDK_DISPLAY macro is deprecated and removed in gtk3. The function used is in gtk since 2.2.
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT AWT/gtk/org/eclipse/swt/awt/SWT_AWT.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c24
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java19
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Program/gtk/org/eclipse/swt/program/Program.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java18
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TrayItem.java2
13 files changed, 47 insertions, 46 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT AWT/gtk/org/eclipse/swt/awt/SWT_AWT.java b/bundles/org.eclipse.swt/Eclipse SWT AWT/gtk/org/eclipse/swt/awt/SWT_AWT.java
index 2dead66273..2718463a26 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT AWT/gtk/org/eclipse/swt/awt/SWT_AWT.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT AWT/gtk/org/eclipse/swt/awt/SWT_AWT.java
@@ -203,7 +203,7 @@ public static Frame new_Frame (final Composite parent) {
int /*long*/ awtHandle = getAWTHandle(window);
if (awtHandle == 0) return;
int /*long*/ xWindow = OS.gdk_x11_drawable_get_xid(OS.GTK_WIDGET_WINDOW(OS.gtk_widget_get_toplevel(shell.handle)));
- OS.XSetTransientForHint(OS.GDK_DISPLAY(), awtHandle, xWindow);
+ OS.XSetTransientForHint(OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default()), awtHandle, xWindow);
}
});
}
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 01c8304d17..86bcbd877c 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
@@ -1299,18 +1299,6 @@ fail:
}
#endif
-#ifndef NO__1GDK_1DISPLAY
-JNIEXPORT jintLong JNICALL OS_NATIVE(_1GDK_1DISPLAY)
- (JNIEnv *env, jclass that)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, _1GDK_1DISPLAY_FUNC);
- rc = (jintLong)GDK_DISPLAY();
- OS_NATIVE_EXIT(env, that, _1GDK_1DISPLAY_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO__1GDK_1PIXMAP_1XID
JNIEXPORT jintLong JNICALL OS_NATIVE(_1GDK_1PIXMAP_1XID)
(JNIEnv *env, jclass that, jintLong arg0)
@@ -7403,6 +7391,18 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1x11_1colormap_1get_1xcolormap)
}
#endif
+#ifndef NO__1gdk_1x11_1display_1get_1xdisplay
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1x11_1display_1get_1xdisplay)
+ (JNIEnv *env, jclass that, jintLong arg0)
+{
+ jintLong rc = 0;
+ OS_NATIVE_ENTER(env, that, _1gdk_1x11_1display_1get_1xdisplay_FUNC);
+ rc = (jintLong)gdk_x11_display_get_xdisplay((GdkDisplay *)arg0);
+ OS_NATIVE_EXIT(env, that, _1gdk_1x11_1display_1get_1xdisplay_FUNC);
+ return rc;
+}
+#endif
+
#ifndef NO__1gdk_1x11_1drawable_1get_1xdisplay
JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1x11_1drawable_1get_1xdisplay)
(JNIEnv *env, jclass that, jintLong arg0)
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 08d483c18c..a4566ed671 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
@@ -135,7 +135,6 @@ char * OS_nativeFunctionNames[] = {
"X_1EVENT_1WINDOW",
"_1Call",
"_1FcConfigAppFontAddFile",
- "_1GDK_1DISPLAY",
"_1GDK_1PIXMAP_1XID",
"_1GDK_1ROOT_1PARENT",
"_1GDK_1TYPE_1COLOR",
@@ -606,6 +605,7 @@ char * OS_nativeFunctionNames[] = {
"_1gdk_1window_1thaw_1updates",
"_1gdk_1x11_1atom_1to_1xatom",
"_1gdk_1x11_1colormap_1get_1xcolormap",
+ "_1gdk_1x11_1display_1get_1xdisplay",
"_1gdk_1x11_1drawable_1get_1xdisplay",
"_1gdk_1x11_1drawable_1get_1xid",
"_1gdk_1x11_1screen_1get_1window_1manager_1name",
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 5da325ed38..2984b14a2e 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
@@ -143,7 +143,6 @@ typedef enum {
X_1EVENT_1WINDOW_FUNC,
_1Call_FUNC,
_1FcConfigAppFontAddFile_FUNC,
- _1GDK_1DISPLAY_FUNC,
_1GDK_1PIXMAP_1XID_FUNC,
_1GDK_1ROOT_1PARENT_FUNC,
_1GDK_1TYPE_1COLOR_FUNC,
@@ -614,6 +613,7 @@ typedef enum {
_1gdk_1window_1thaw_1updates_FUNC,
_1gdk_1x11_1atom_1to_1xatom_FUNC,
_1gdk_1x11_1colormap_1get_1xcolormap_FUNC,
+ _1gdk_1x11_1display_1get_1xdisplay_FUNC,
_1gdk_1x11_1drawable_1get_1xdisplay_FUNC,
_1gdk_1x11_1drawable_1get_1xid_FUNC,
_1gdk_1x11_1screen_1get_1window_1manager_1name_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 77f16a9e83..dc8a57b531 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
@@ -1188,6 +1188,16 @@ public static final int /*long*/ gdk_x11_colormap_get_xcolormap(int /*long*/ col
lock.unlock();
}
}
+/** @param gdkdisplay cast=(GdkDisplay *) */
+public static final native int /*long*/ _gdk_x11_display_get_xdisplay(int /*long*/ gdkdisplay);
+public static final int /*long*/ gdk_x11_display_get_xdisplay (int /*long*/ gdkdisplay) {
+ lock.lock();
+ try {
+ return _gdk_x11_display_get_xdisplay(gdkdisplay);
+ } finally {
+ lock.unlock();
+ }
+}
/** @param drawable cast=(GdkDrawable *) */
public static final native int /*long*/ _gdk_x11_drawable_get_xdisplay(int /*long*/ drawable);
public static final int /*long*/ gdk_x11_drawable_get_xdisplay(int /*long*/ drawable) {
@@ -1460,15 +1470,6 @@ public static final native int /*long*/ pangoLayoutNewProc_CALLBACK(int /*long*/
/** Natives */
public static final native int Call (int /*long*/ func, int /*long*/ arg0, int arg1, int arg2);
public static final native long Call (int /*long*/ func, int /*long*/ arg0, int arg1, long arg2);
-public static final native int /*long*/ _GDK_DISPLAY();
-public static final int /*long*/ GDK_DISPLAY() {
- lock.lock();
- try {
- return _GDK_DISPLAY();
- } finally {
- lock.unlock();
- }
-}
public static final native int /*long*/ _GDK_ROOT_PARENT();
public static final int /*long*/ GDK_ROOT_PARENT() {
lock.lock();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Program/gtk/org/eclipse/swt/program/Program.java b/bundles/org.eclipse.swt/Eclipse SWT Program/gtk/org/eclipse/swt/program/Program.java
index 1c67940b0e..3b734dd574 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Program/gtk/org/eclipse/swt/program/Program.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Program/gtk/org/eclipse/swt/program/Program.java
@@ -74,7 +74,7 @@ static int getDesktop(final Display display) {
int desktop = DESKTOP_UNKNOWN;
/* Get the list of properties on the root window. */
- int /*long*/ xDisplay = OS.GDK_DISPLAY();
+ int /*long*/ xDisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default());
int /*long*/ rootWindow = OS.XDefaultRootWindow(xDisplay);
int[] numProp = new int[1];
int /*long*/ propList = OS.XListProperties(xDisplay, rootWindow, numProp);
@@ -307,7 +307,7 @@ static boolean cde_init(Display display) {
/* Use the character encoding for the default locale */
CDE.XtToolkitInitialize();
int /*long*/ xtContext = CDE.XtCreateApplicationContext ();
- int /*long*/ xDisplay = OS.GDK_DISPLAY();
+ int /*long*/ xDisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default());
byte[] appName = Converter.wcsToMbcs(null, "CDE", true);
byte[] appClass = Converter.wcsToMbcs(null, "CDE", true);
int /*long*/ [] argc = new int /*long*/ [] {0};
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java
index 23f6ec879b..03178173e3 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java
@@ -461,7 +461,7 @@ public void copyArea(Image image, int x, int y) {
int[] w = new int[1], h = new int[1];
OS.gdk_drawable_get_size(data.drawable, w, h);
int width = w[0], height = h[0];
- int /*long*/ xDisplay = OS.GDK_DISPLAY();
+ int /*long*/ xDisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default());
int /*long*/ xDrawable = OS.gdk_x11_drawable_get_xid(data.drawable);
int /*long*/ xVisual = OS.gdk_x11_visual_get_xvisual(OS.gdk_visual_get_system());
int /*long*/ srcSurface = Cairo.cairo_xlib_surface_create(xDisplay, xDrawable, xVisual, width, height);
@@ -1122,7 +1122,7 @@ void drawImageXRender(Image srcImage, int srcX, int srcY, int srcWidth, int srcH
translateX = -x[0];
translateY = -y[0];
}
- int /*long*/ xDisplay = OS.GDK_DISPLAY();
+ int /*long*/ xDisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default());
int /*long*/ maskPict = 0;
if (maskPixmap != 0) {
int attribCount = 0;
@@ -2925,7 +2925,7 @@ void initCairo() {
int /*long*/ cairo = data.cairo;
if (cairo != 0) return;
if (OS.GTK_VERSION < OS.VERSION(2, 17, 0)) {
- int /*long*/ xDisplay = OS.GDK_DISPLAY();
+ int /*long*/ xDisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default());
int /*long*/ xVisual = OS.gdk_x11_visual_get_xvisual(OS.gdk_visual_get_system());
int /*long*/ xDrawable = 0;
int translateX = 0, translateY = 0;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java
index 4624bb4e4e..5c75e0c24f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java
@@ -978,7 +978,7 @@ void createSurface() {
Cairo.cairo_surface_mark_dirty(surface);
OS.g_object_unref(pixbuf);
} else {
- int /*long*/ xDisplay = OS.GDK_DISPLAY();
+ int /*long*/ xDisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default());
int /*long*/ xDrawable = OS.GDK_PIXMAP_XID(pixmap);
int /*long*/ xVisual = OS.gdk_x11_visual_get_xvisual(OS.gdk_visual_get_system());
surface = Cairo.cairo_xlib_surface_create(xDisplay, xDrawable, xVisual, width, height);
@@ -1273,7 +1273,7 @@ void init(int width, int height) {
if (OS.GTK_VERSION >= OS.VERSION(2, 22, 0)) {
surface = OS.gdk_window_create_similar_surface(OS.GDK_ROOT_PARENT(), Cairo.CAIRO_CONTENT_COLOR, width, height);
} else {
- int /*long*/ xDisplay = OS.GDK_DISPLAY();
+ int /*long*/ xDisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default());
int /*long*/ xDrawable = OS.gdk_x11_drawable_get_xid(OS.GDK_ROOT_PARENT());
int /*long*/ xVisual = OS.gdk_x11_visual_get_xvisual(OS.gdk_visual_get_system());
int /*long*/ rootSurface = Cairo.cairo_xlib_surface_create(xDisplay, xDrawable, xVisual, 1, 1);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java
index 29ba3091dd..19189adbe5 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java
@@ -374,7 +374,7 @@ public void drawBackground (GC gc, int x, int y, int width, int height, int offs
y += pt.y + offsetY;
int /*long*/ surface = control.backgroundImage.surface;
if (surface == 0) {
- int /*long*/ xDisplay = OS.GDK_DISPLAY ();
+ int /*long*/ xDisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default());
int /*long*/ xVisual = OS.gdk_x11_visual_get_xvisual (OS.gdk_visual_get_system());
int /*long*/ drawable = control.backgroundImage.pixmap;
int /*long*/ xDrawable = OS.GDK_PIXMAP_XID (drawable);
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 bed6612a0d..ea04d0d442 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
@@ -447,7 +447,7 @@ void printWindow (boolean first, Control control, GC gc, int /*long*/ drawable,
GCData gcData = gc.getGCData();
int /*long*/ cairo = gcData.cairo;
if (cairo != 0) {
- int /*long*/ xDisplay = OS.GDK_DISPLAY();
+ int /*long*/ xDisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default());
int /*long*/ xVisual = OS.gdk_x11_visual_get_xvisual(OS.gdk_visual_get_system());
int /*long*/ xDrawable = OS.GDK_PIXMAP_XID(real_drawable [0]);
int /*long*/ surface = Cairo.cairo_xlib_surface_create(xDisplay, xDrawable, xVisual, width [0], height [0]);
@@ -3895,7 +3895,7 @@ void setCursor (int /*long*/ cursor) {
if (!OS.GDK_WINDOWING_X11 ()) {
OS.gdk_flush ();
} else {
- int /*long*/ xDisplay = OS.GDK_DISPLAY ();
+ int /*long*/ xDisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default());
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 b7edcc9d50..64876961c0 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
@@ -733,7 +733,7 @@ public void beep () {
if (!OS.GDK_WINDOWING_X11 ()) {
OS.gdk_flush ();
} else {
- int /*long*/ xDisplay = OS.GDK_DISPLAY ();
+ int /*long*/ xDisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default());
OS.XFlush (xDisplay);
}
}
@@ -907,7 +907,7 @@ void createDisplay (DeviceData data) {
if (!OS.gtk_init_check (new int /*long*/ [] {0}, null)) {
SWT.error (SWT.ERROR_NO_HANDLES, null, " [gtk_init_check() failed]"); //$NON-NLS-1$
}
- if (OS.GDK_WINDOWING_X11 ()) xDisplay = OS.GDK_DISPLAY ();
+ if (OS.GDK_WINDOWING_X11 ()) xDisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default());
int /*long*/ ptr = OS.gtk_check_version (MAJOR, MINOR, MICRO);
if (ptr != 0) {
int length = OS.strlen (ptr);
@@ -1008,9 +1008,9 @@ void createDisplay (DeviceData data) {
if (OS.GDK_WINDOWING_X11 ()) {
int /*long*/ xWindow = OS.gdk_x11_drawable_get_xid (OS.GTK_WIDGET_WINDOW (shellHandle));
byte[] atomName = Converter.wcsToMbcs (null, "SWT_Window_" + APP_NAME, true); //$NON-NLS-1$
- int /*long*/ atom = OS.XInternAtom (OS.GDK_DISPLAY (), atomName, false);
- OS.XSetSelectionOwner (OS.GDK_DISPLAY (), atom, xWindow, OS.CurrentTime);
- OS.XGetSelectionOwner (OS.GDK_DISPLAY (), atom);
+ int /*long*/ atom = OS.XInternAtom (OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default()), atomName, false);
+ OS.XSetSelectionOwner (OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default()), atom, xWindow, OS.CurrentTime);
+ OS.XGetSelectionOwner (OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default()), atom);
}
signalCallback = new Callback (this, "signalProc", 3); //$NON-NLS-1$
@@ -1318,7 +1318,7 @@ void flushExposes (int /*long*/ window, boolean all) {
if (OS.GDK_WINDOWING_X11 ()) {
this.flushWindow = window;
this.flushAll = all;
- int /*long*/ xDisplay = OS.GDK_DISPLAY ();
+ int /*long*/ xDisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default());
int /*long*/ xEvent = OS.g_malloc (XEvent.sizeof);
OS.XCheckIfEvent (xDisplay, xEvent, checkIfEventProc, 0);
OS.g_free (xEvent);
@@ -3027,7 +3027,7 @@ public boolean post (Event event) {
if (isDisposed ()) error (SWT.ERROR_DEVICE_DISPOSED);
if (event == null) error (SWT.ERROR_NULL_ARGUMENT);
if (!OS.GDK_WINDOWING_X11()) return false;
- int /*long*/ xDisplay = OS.GDK_DISPLAY ();
+ int /*long*/ xDisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default());
int type = event.type;
switch (type) {
case SWT.KeyDown:
@@ -3708,7 +3708,7 @@ public static void setAppVersion (String version) {
public void setCursorLocation (int x, int y) {
checkDevice ();
if (OS.GDK_WINDOWING_X11 ()) {
- int /*long*/ xDisplay = OS.GDK_DISPLAY ();
+ int /*long*/ xDisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default());
int /*long*/ xWindow = OS.XDefaultRootWindow (xDisplay);
OS.XWarpPointer (xDisplay, OS.None, xWindow, 0, 0, 0, 0, x, y);
}
@@ -4220,7 +4220,7 @@ int /*long*/ signalProc (int /*long*/ gobject, int /*long*/ arg1, int /*long*/ u
int [] nitems = new int [1];
int [] bytes_after = new int [1];
int /*long*/ [] data = new int /*long*/ [1];
- OS.XGetWindowProperty (OS.GDK_DISPLAY (), xWindow, atom, 0, -1, true, OS.AnyPropertyType,
+ OS.XGetWindowProperty (OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default()), xWindow, atom, 0, -1, true, OS.AnyPropertyType,
type, format, nitems, bytes_after, data);
if (nitems [0] > 0) {
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 1ace883cd5..9f5985d79c 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
@@ -1691,7 +1691,7 @@ void setCursor (int /*long*/ cursor) {
if (!OS.GDK_WINDOWING_X11 ()) {
OS.gdk_flush ();
} else {
- int /*long*/ xDisplay = OS.GDK_DISPLAY ();
+ int /*long*/ xDisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default());
OS.XFlush (xDisplay);
}
}
@@ -1741,7 +1741,7 @@ public void setEnabled (boolean enabled) {
if (!OS.GDK_WINDOWING_X11 ()) {
OS.gdk_flush ();
} else {
- int /*long*/ xDisplay = OS.GDK_DISPLAY ();
+ int /*long*/ xDisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default());
OS.XFlush (xDisplay);
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TrayItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TrayItem.java
index 44e4b82380..3c465a50e3 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TrayItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TrayItem.java
@@ -174,7 +174,7 @@ void createHandle (int index) {
byte [] trayBuffer = Converter.wcsToMbcs (null, "_NET_SYSTEM_TRAY_S" + monitor, true);
int /*long*/ trayAtom = OS.gdk_atom_intern (trayBuffer, true);
int /*long*/ xTrayAtom = OS.gdk_x11_atom_to_xatom (trayAtom);
- int /*long*/ xDisplay = OS.GDK_DISPLAY ();
+ int /*long*/ xDisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default());
int /*long*/ trayWindow = OS.XGetSelectionOwner (xDisplay, xTrayAtom);
byte [] messageBuffer = Converter.wcsToMbcs (null, "_NET_SYSTEM_TRAY_OPCODE", true);
int /*long*/ messageAtom = OS.gdk_atom_intern (messageBuffer, true);

Back to the top