Community
Participate
Working Groups
* window, gdk_window_focus() does not give focus to the
* window. The fix is to use XSetInputFocus() to force
* the focus.
*
* NOTE: Temporary workaround for bug #305696. The code below
* that makes use of XSetInputFocus() seems to be causing the
* loss of focus described in bug #305696. The workaround here
* bypasses the use of XSetInputFocus() for GTK+ 2.17.x and
* later.
*/
int /*long*/ window = OS.GTK_WIDGET_WINDOW (shellHandle);
if ((xFocus || (style & SWT.ON_TOP) != 0) && OS.GDK_WINDOWING_X11 ()) {
if ( OS.GTK_VERSION < OS.VERSION (2, 17, 0) && ((xFocus || (style & SWT.ON_TOP) != 0) && OS.GDK_WINDOWING_X11 ()) ) {
int /*long*/ xDisplay = OS.gdk_x11_drawable_get_xdisplay (window);
int /*long*/ xWindow = OS.gdk_x11_drawable_get_xid (window);
OS.gdk_error_trap_push ();