Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Pun2017-04-28 08:27:48 +0000
committerAlexander Kurtakov2018-01-05 09:07:48 +0000
commitd674cf3686c90551f3006ba4e55f1fd66f77658c (patch)
tree3c471d216e70f3a5c38e319b450dd39018ab3c03
parent4141423bffef24cca9c4330756dc348a735e6c49 (diff)
downloadeclipse.platform.swt-d674cf3686c90551f3006ba4e55f1fd66f77658c.tar.gz
eclipse.platform.swt-d674cf3686c90551f3006ba4e55f1fd66f77658c.tar.xz
eclipse.platform.swt-d674cf3686c90551f3006ba4e55f1fd66f77658c.zip
Bug 515773 - [wayland] Text widget not able to grab focus with
SWT.ON_TOP shell Use new gtk_grab feature in order to handle keyboard focus on SWT.ON_TOP shells. This can be tested with the supplied snippet for this bug. Commit also fixes problem with Javadocs stealing focus without releasing it before hiding. Fix applies only for people running GTK 3.20+ due to functions introduced in this version. Change-Id: I42f070600dbdbffd29b4cbfff297e058598e88aa Signed-off-by: Ian Pun <ipun@redhat.com>
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c98
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java75
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java53
6 files changed, 237 insertions, 5 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 03c784d99e..183605d6c3 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
@@ -4634,6 +4634,26 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1display_1get_1default)
}
#endif
+#ifndef NO__1gdk_1display_1get_1default_1seat
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1display_1get_1default_1seat)
+ (JNIEnv *env, jclass that, jintLong arg0)
+{
+ jintLong rc = 0;
+ OS_NATIVE_ENTER(env, that, _1gdk_1display_1get_1default_1seat_FUNC);
+/*
+ rc = (jintLong)gdk_display_get_default_seat(arg0);
+*/
+ {
+ OS_LOAD_FUNCTION(fp, gdk_display_get_default_seat)
+ if (fp) {
+ rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong))fp)(arg0);
+ }
+ }
+ OS_NATIVE_EXIT(env, that, _1gdk_1display_1get_1default_1seat_FUNC);
+ return rc;
+}
+#endif
+
#ifndef NO__1gdk_1display_1get_1device_1manager
JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1display_1get_1device_1manager)
(JNIEnv *env, jclass that, jintLong arg0)
@@ -5016,6 +5036,26 @@ fail:
}
#endif
+#ifndef NO__1gdk_1event_1get_1seat
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1event_1get_1seat)
+ (JNIEnv *env, jclass that, jintLong arg0)
+{
+ jintLong rc = 0;
+ OS_NATIVE_ENTER(env, that, _1gdk_1event_1get_1seat_FUNC);
+/*
+ rc = (jintLong)gdk_event_get_seat(arg0);
+*/
+ {
+ OS_LOAD_FUNCTION(fp, gdk_event_get_seat)
+ if (fp) {
+ rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong))fp)(arg0);
+ }
+ }
+ OS_NATIVE_EXIT(env, that, _1gdk_1event_1get_1seat_FUNC);
+ return rc;
+}
+#endif
+
#ifndef NO__1gdk_1event_1get_1state
JNIEXPORT jboolean JNICALL OS_NATIVE(_1gdk_1event_1get_1state)
(JNIEnv *env, jclass that, jintLong arg0, jintArray arg1)
@@ -6217,6 +6257,44 @@ JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1screen_1width_1mm)
}
#endif
+#ifndef NO__1gdk_1seat_1grab
+JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1seat_1grab)
+ (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jboolean arg3, jintLong arg4, jintLong arg5, jintLong arg6, jintLong arg7)
+{
+ jint rc = 0;
+ OS_NATIVE_ENTER(env, that, _1gdk_1seat_1grab_FUNC);
+/*
+ rc = (jint)gdk_seat_grab(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
+*/
+ {
+ OS_LOAD_FUNCTION(fp, gdk_seat_grab)
+ if (fp) {
+ rc = (jint)((jint (CALLING_CONVENTION*)(jintLong, jintLong, jint, jboolean, jintLong, jintLong, jintLong, jintLong))fp)(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
+ }
+ }
+ OS_NATIVE_EXIT(env, that, _1gdk_1seat_1grab_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO__1gdk_1seat_1ungrab
+JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1seat_1ungrab)
+ (JNIEnv *env, jclass that, jintLong arg0)
+{
+ OS_NATIVE_ENTER(env, that, _1gdk_1seat_1ungrab_FUNC);
+/*
+ gdk_seat_ungrab(arg0);
+*/
+ {
+ OS_LOAD_FUNCTION(fp, gdk_seat_ungrab)
+ if (fp) {
+ ((void (CALLING_CONVENTION*)(jintLong))fp)(arg0);
+ }
+ }
+ OS_NATIVE_EXIT(env, that, _1gdk_1seat_1ungrab_FUNC);
+}
+#endif
+
#ifndef NO__1gdk_1selection_1owner_1get
JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1selection_1owner_1get)
(JNIEnv *env, jclass that, jintLong arg0)
@@ -10263,6 +10341,16 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1get_1event_1widget)
}
#endif
+#ifndef NO__1gtk_1grab_1add
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1grab_1add)
+ (JNIEnv *env, jclass that, jintLong arg0)
+{
+ OS_NATIVE_ENTER(env, that, _1gtk_1grab_1add_FUNC);
+ gtk_grab_add((GtkWidget *)arg0);
+ OS_NATIVE_EXIT(env, that, _1gtk_1grab_1add_FUNC);
+}
+#endif
+
#ifndef NO__1gtk_1grab_1get_1current
JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1grab_1get_1current)
(JNIEnv *env, jclass that)
@@ -10275,6 +10363,16 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1grab_1get_1current)
}
#endif
+#ifndef NO__1gtk_1grab_1remove
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1grab_1remove)
+ (JNIEnv *env, jclass that, jintLong arg0)
+{
+ OS_NATIVE_ENTER(env, that, _1gtk_1grab_1remove_FUNC);
+ gtk_grab_remove((GtkWidget *)arg0);
+ OS_NATIVE_EXIT(env, that, _1gtk_1grab_1remove_FUNC);
+}
+#endif
+
#ifndef NO__1gtk_1hbox_1new
JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1hbox_1new)
(JNIEnv *env, jclass that, jboolean arg0, jint arg1)
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h
index a1b5fde6de..0d64bae45e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h
@@ -122,6 +122,7 @@
#define gdk_display_get_device_manager_LIB LIB_GDK
#define gdk_device_get_associated_device_LIB LIB_GDK
#define gdk_display_get_default_LIB LIB_GDK
+#define gdk_display_get_default_seat_LIB LIB_GDK
#define gdk_display_supports_cursor_color_LIB LIB_GDK
#define gdk_drag_context_get_actions_LIB LIB_GDK
#define gdk_drag_context_get_dest_window_LIB LIB_GDK
@@ -288,11 +289,14 @@
#define gtk_style_context_get_LIB LIB_GTK
#define gtk_style_context_invalidate_LIB LIB_GTK
#define gdk_screen_get_monitor_workarea_LIB LIB_GDK
+#define gdk_seat_grab_LIB LIB_GDK
+#define gdk_seat_ungrab_LIB LIB_GDK
#define gdk_window_set_background_pattern_LIB LIB_GTK
#define gtk_widget_input_shape_combine_region_LIB LIB_GTK
#define gtk_entry_set_placeholder_text_LIB LIB_GTK
#define gtk_entry_get_icon_area_LIB LIB_GTK
#define gdk_event_get_scroll_deltas_LIB LIB_GTK
+#define gdk_event_get_seat_LIB LIB_GDK
#define gtk_cell_renderer_get_preferred_height_for_width_LIB LIB_GTK
#define gtk_css_provider_load_from_data_LIB LIB_GTK
#define gtk_css_provider_new_LIB LIB_GTK
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 6b99799051..209d6b4c39 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
@@ -431,6 +431,7 @@ char * OS_nativeFunctionNames[] = {
"_1gdk_1device_1ungrab",
"_1gdk_1device_1warp",
"_1gdk_1display_1get_1default",
+ "_1gdk_1display_1get_1default_1seat",
"_1gdk_1display_1get_1device_1manager",
"_1gdk_1display_1supports_1cursor_1color",
"_1gdk_1display_1warp_1pointer",
@@ -453,6 +454,7 @@ char * OS_nativeFunctionNames[] = {
"_1gdk_1event_1get",
"_1gdk_1event_1get_1coords",
"_1gdk_1event_1get_1scroll_1deltas",
+ "_1gdk_1event_1get_1seat",
"_1gdk_1event_1get_1state",
"_1gdk_1event_1get_1time",
"_1gdk_1event_1handler_1set",
@@ -528,6 +530,8 @@ char * OS_nativeFunctionNames[] = {
"_1gdk_1screen_1height",
"_1gdk_1screen_1width",
"_1gdk_1screen_1width_1mm",
+ "_1gdk_1seat_1grab",
+ "_1gdk_1seat_1ungrab",
"_1gdk_1selection_1owner_1get",
"_1gdk_1selection_1owner_1set",
"_1gdk_1set_1program_1class",
@@ -812,7 +816,9 @@ char * OS_nativeFunctionNames[] = {
"_1gtk_1get_1current_1event_1state",
"_1gtk_1get_1default_1language",
"_1gtk_1get_1event_1widget",
+ "_1gtk_1grab_1add",
"_1gtk_1grab_1get_1current",
+ "_1gtk_1grab_1remove",
"_1gtk_1hbox_1new",
"_1gtk_1hscale_1new",
"_1gtk_1hscrollbar_1new",
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 516add7d07..7b36883b7f 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
@@ -441,6 +441,7 @@ typedef enum {
_1gdk_1device_1ungrab_FUNC,
_1gdk_1device_1warp_FUNC,
_1gdk_1display_1get_1default_FUNC,
+ _1gdk_1display_1get_1default_1seat_FUNC,
_1gdk_1display_1get_1device_1manager_FUNC,
_1gdk_1display_1supports_1cursor_1color_FUNC,
_1gdk_1display_1warp_1pointer_FUNC,
@@ -463,6 +464,7 @@ typedef enum {
_1gdk_1event_1get_FUNC,
_1gdk_1event_1get_1coords_FUNC,
_1gdk_1event_1get_1scroll_1deltas_FUNC,
+ _1gdk_1event_1get_1seat_FUNC,
_1gdk_1event_1get_1state_FUNC,
_1gdk_1event_1get_1time_FUNC,
_1gdk_1event_1handler_1set_FUNC,
@@ -538,6 +540,8 @@ typedef enum {
_1gdk_1screen_1height_FUNC,
_1gdk_1screen_1width_FUNC,
_1gdk_1screen_1width_1mm_FUNC,
+ _1gdk_1seat_1grab_FUNC,
+ _1gdk_1seat_1ungrab_FUNC,
_1gdk_1selection_1owner_1get_FUNC,
_1gdk_1selection_1owner_1set_FUNC,
_1gdk_1set_1program_1class_FUNC,
@@ -822,7 +826,9 @@ typedef enum {
_1gtk_1get_1current_1event_1state_FUNC,
_1gtk_1get_1default_1language_FUNC,
_1gtk_1get_1event_1widget_FUNC,
+ _1gtk_1grab_1add_FUNC,
_1gtk_1grab_1get_1current_FUNC,
+ _1gtk_1grab_1remove_FUNC,
_1gtk_1hbox_1new_FUNC,
_1gtk_1hscale_1new_FUNC,
_1gtk_1hscrollbar_1new_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 cd9494026f..09c5a4a856 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
@@ -3865,6 +3865,20 @@ public static final long /*int*/ gdk_display_get_default() {
lock.unlock();
}
}
+
+/**
+ * @method flags=dynamic
+ */
+public static final native long /*int*/ _gdk_display_get_default_seat(long /*int*/ display);
+public static final long /*int*/ gdk_display_get_default_seat(long /*int*/ display) {
+ lock.lock();
+ try {
+ return _gdk_display_get_default_seat(display);
+ } finally {
+ lock.unlock();
+ }
+}
+
/**
* @method flags=dynamic
* @param window cast=(GdkWindow *)
@@ -4179,6 +4193,19 @@ public static final boolean gdk_event_get_scroll_deltas(long /*int*/ event, doub
lock.unlock();
}
}
+
+/**
+ * @method flags=dynamic
+ */
+public static final native long /*int*/ _gdk_event_get_seat(long /*int*/ event);
+public static final long /*int*/ gdk_event_get_seat(long /*int*/ event) {
+ lock.lock();
+ try {
+ return _gdk_event_get_seat(event);
+ } finally {
+ lock.unlock();
+ }
+}
/** @param event cast=(GdkEvent *) */
public static final native int _gdk_event_get_time(long /*int*/ event);
public static final int gdk_event_get_time(long /*int*/ event) {
@@ -5165,7 +5192,30 @@ public static final int gdk_screen_get_monitor_width_mm(long /*int*/ screen, int
lock.unlock();
}
}
-
+/**
+ * @method flags=dynamic
+ */
+public static final native int _gdk_seat_grab(long /*int*/ seat, long /*int*/ window, int capabilities, boolean owner_events, long /*int*/ cursor, long /*int*/ event, long /*int*/ func, long /*int*/ func_data);
+public static final int gdk_seat_grab(long /*int*/ seat, long /*int*/ window, int capabilities, boolean owner_events, long /*int*/ cursor, long /*int*/ event, long /*int*/ func, long /*int*/ func_data) {
+ lock.lock();
+ try {
+ return _gdk_seat_grab(seat, window, capabilities, owner_events, cursor, event, func, func_data);
+ } finally {
+ lock.unlock();
+ }
+}
+/**
+ * @method flags=dynamic
+ */
+public static final native void _gdk_seat_ungrab(long /*int*/ seat);
+public static final void gdk_seat_ungrab(long /*int*/ seat) {
+ lock.lock();
+ try {
+ _gdk_seat_ungrab(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) {
@@ -8329,6 +8379,18 @@ public static final long /*int*/ gtk_get_event_widget(long /*int*/ event) {
lock.unlock();
}
}
+
+/** @param widget cast=(GtkWidget *) */
+public static final native void _gtk_grab_add(long /*int*/ widget);
+public static final void gtk_grab_add(long /*int*/ widget) {
+ lock.lock();
+ try {
+ _gtk_grab_add(widget);
+ } finally {
+ lock.unlock();
+ }
+}
+
public static final native long /*int*/ _gtk_grab_get_current();
public static final long /*int*/ gtk_grab_get_current() {
lock.lock();
@@ -8338,6 +8400,17 @@ public static final long /*int*/ gtk_grab_get_current() {
lock.unlock();
}
}
+/** @param widget cast=(GtkWidget *) */
+public static final native void _gtk_grab_remove(long /*int*/ widget);
+public static final void gtk_grab_remove(long /*int*/ widget) {
+ lock.lock();
+ try {
+ _gtk_grab_remove(widget);
+ } finally {
+ lock.unlock();
+ }
+}
+
/**
* @method flags=dynamic
* @param homogeneous cast=(gboolean)
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 8788256055..435ae1093e 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
@@ -568,7 +568,7 @@ void bringToTop (boolean force) {
* Feature in GTK. When the shell is an override redirect
* window, gdk_window_focus() does not give focus to the
* window. The fix is to use XSetInputFocus() to force
- * the focus.
+ * the focus, or gtk_grab_add() for Wayland.
*/
long /*int*/ window = gtk_widget_get_window (shellHandle);
if ((xFocus || (style & SWT.ON_TOP) != 0)) {
@@ -585,8 +585,17 @@ void bringToTop (boolean force) {
OS.XSetInputFocus (xDisplay, xWindow, OS.RevertToParent, OS.CurrentTime);
OS.gdk_error_trap_pop ();
} else {
-// TODO find the proper fix as this doesn't seem to have effect
-// OS.gtk_window_present(window);
+ if (OS.GTK_VERSION >= OS.VERSION(3, 20, 0)) {
+ if(OS.gtk_widget_get_visible(shellHandle)) {
+ OS.gtk_widget_hide(shellHandle);
+ }
+ Callback gdkSeatGrabCallback = new Callback(this, "GdkSeatGrabPrepareFunc", 3); //$NON-NLS-1$
+ long /*int*/ gdkSeatGrabPrepareFunc = gdkSeatGrabCallback.getAddress();
+ if (gdkSeatGrabPrepareFunc == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
+ OS.gtk_grab_add(shellHandle);
+ long /*int*/ seat = OS.gdk_display_get_default_seat(OS.gdk_window_get_display(window));
+ OS.gdk_seat_grab(seat, window, 1, true, 0, 0, gdkSeatGrabPrepareFunc, shellHandle);
+ }
}
} else {
/*
@@ -1261,7 +1270,7 @@ public Shell [] getShells () {
long /*int*/ gtk_button_press_event (long /*int*/ widget, long /*int*/ event) {
if (widget == shellHandle) {
if (isCustomResize ()) {
- if ((style & SWT.ON_TOP) != 0 && (style & SWT.NO_FOCUS) == 0) {
+ if (OS.isX11() && (style & SWT.ON_TOP) != 0 && (style & SWT.NO_FOCUS) == 0) {
forceActive ();
}
GdkEventButton gdkEvent = new GdkEventButton ();
@@ -1279,6 +1288,17 @@ long /*int*/ gtk_button_press_event (long /*int*/ widget, long /*int*/ event) {
display.resizeBoundsHeight = allocation.height;
}
}
+ /**
+ * Feature in GTK: This handles ungrabbing the keyboard focus from a SWT.ON_TOP window
+ * if it has editable fields and is running Wayland. Refer to bug 515773.
+ */
+ if (!OS.isX11() && OS.GTK_VERSION >= OS.VERSION(3, 20, 0)) {
+ if ((style & SWT.ON_TOP) != 0 && (style & SWT.NO_FOCUS) == 0) {
+ OS.gtk_grab_remove(shellHandle);
+ OS.gdk_seat_ungrab(OS.gdk_event_get_seat(event));
+ OS.gtk_widget_hide(shellHandle);
+ }
+ }
return 0;
}
return super.gtk_button_press_event (widget, event);
@@ -2405,6 +2425,10 @@ public void setVisible (boolean visible) {
* unminimized or shown on the desktop.
*/
mapped = false;
+ /**
+ * Feature in GTK: This handles grabbing the keyboard focus from a SWT.ON_TOP window
+ * if it has editable fields and is running Wayland. Refer to bug 515773.
+ */
OS.gtk_widget_show (shellHandle);
if (enableWindow != 0) OS.gdk_window_raise (enableWindow);
if (isDisposed ()) return;
@@ -2470,6 +2494,15 @@ public void setVisible (boolean visible) {
}
} else {
fixActiveShell ();
+ // Feature in Wayland: If the shell item is ON_TOP, remove its grab before hiding it, otherwise focus is locked to
+ // the hidden widget and can never be returned.
+ if (!OS.isX11() && OS.GTK_VERSION >= OS.VERSION(3, 20, 0)) {
+ if ((style & SWT.ON_TOP) != 0 && (style & SWT.NO_FOCUS) == 0) {
+ OS.gtk_grab_remove(shellHandle);
+ OS.gdk_seat_ungrab(OS.gdk_display_get_default_seat(
+ OS.gdk_window_get_display(OS.gtk_widget_get_window(shellHandle))));
+ }
+ }
OS.gtk_widget_hide (shellHandle);
sendEvent (SWT.Hide);
}
@@ -2696,6 +2729,13 @@ public void dispose () {
*/
if (isDisposed()) return;
fixActiveShell ();
+ if (!OS.isX11() && OS.GTK_VERSION >= OS.VERSION(3, 20, 0)) {
+ if ((style & SWT.ON_TOP) != 0 && (style & SWT.NO_FOCUS) == 0) {
+ OS.gtk_grab_remove(shellHandle);
+ OS.gdk_seat_ungrab(OS.gdk_display_get_default_seat(
+ OS.gdk_window_get_display(OS.gtk_widget_get_window(shellHandle))));
+ }
+ }
OS.gtk_widget_hide (shellHandle);
super.dispose ();
}
@@ -2832,4 +2872,9 @@ Point getWindowOrigin () {
}
return super.getWindowOrigin( );
}
+
+long /*int*/ GdkSeatGrabPrepareFunc (long /*int*/ seat, long /*int*/ window, long /*int*/ data) {
+ OS.gtk_widget_show(data);
+ return 0;
+}
}

Back to the top