Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Williams2018-01-23 20:47:56 +0000
committerEric Williams2018-01-26 20:07:46 +0000
commit931aef681a2316e9fe2a414072464b0126f40ff8 (patch)
tree7fafa2114f88e840cd9c68cca4c597cca48eeee4 /bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java
parentbe67e7a453048309b3d338b0f6f24c60f69e6f1a (diff)
downloadeclipse.platform.swt-931aef681a2316e9fe2a414072464b0126f40ff8.tar.gz
eclipse.platform.swt-931aef681a2316e9fe2a414072464b0126f40ff8.tar.xz
eclipse.platform.swt-931aef681a2316e9fe2a414072464b0126f40ff8.zip
Bug 530059: [Wayland] Show In menu appears in the wrong place
Events used to spawn menus can contain inaccurate window information on Wayland. If we are running on Wayland, set the event window to be that of the mouse pointer location. Tested on GTK3.22 using the Wayland backend. X11 is unaffected by this fix. No AllNonBrowser JUnit tests fail. Change-Id: I6410694a88faacc672144d9f57e6c61032ea33cf Signed-off-by: Eric Williams <ericwill@redhat.com>
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java32
1 files changed, 32 insertions, 0 deletions
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 11043ae4d4..959aa999a8 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
@@ -4239,6 +4239,20 @@ public static final int gdk_event_get_time(long /*int*/ event) {
}
}
/**
+ * @method flags=dynamic
+ * @param event cast=(GdkEvent *)
+ */
+public static final native int _gdk_event_get_event_type(long /*int*/ event);
+/** [GTK3.10+] */
+public static final int gdk_event_get_event_type(long /*int*/ event) {
+ lock.lock();
+ try {
+ return _gdk_event_get_event_type(event);
+ } finally {
+ lock.unlock();
+ }
+}
+/**
* @param func cast=(GdkEventFunc)
* @param data cast=(gpointer)
* @param notify cast=(GDestroyNotify)
@@ -5238,6 +5252,18 @@ public static final void gdk_seat_ungrab(long /*int*/ seat) {
lock.unlock();
}
}
+/**
+ * @method flags=dynamic
+ */
+public static final native long /*int*/ _gdk_seat_get_pointer(long /*int*/ seat);
+public static final long /*int*/ gdk_seat_get_pointer(long /*int*/ seat) {
+ lock.lock();
+ try {
+ return _gdk_seat_get_pointer(seat);
+ } finally {
+ lock.unlock();
+ }
+}
/** @param program_class cast=(const char *) */
public static final native void _gdk_set_program_class(byte[] program_class);
public static final void gdk_set_program_class(byte[] program_class) {
@@ -15292,6 +15318,12 @@ public static final native void memmove(long /*int*/ dest, GdkEventButton src, l
* @param src cast=(const void *),flags=no_out
* @param size cast=(size_t)
*/
+public static final native void memmove(long /*int*/ dest, GdkEventKey src, long /*int*/ size);
+/**
+ * @param dest cast=(void *)
+ * @param src cast=(const void *),flags=no_out
+ * @param size cast=(size_t)
+ */
public static final native void memmove(long /*int*/ dest, GdkEventExpose src, long /*int*/ size);
/**
* @param dest cast=(void *)

Back to the top