Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 305696
Collapse All | Expand All

(-)Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java (-1 / +7 lines)
Lines 534-542 Link Here
534
	* window, gdk_window_focus() does not give focus to the
534
	* window, gdk_window_focus() does not give focus to the
535
	* window.  The fix is to use XSetInputFocus() to force
535
	* window.  The fix is to use XSetInputFocus() to force
536
	* the focus.
536
	* the focus.
537
	* 
538
	* NOTE: Temporary workaround for bug #305696. The code below
539
	* that makes use of XSetInputFocus() seems to be causing the
540
	* loss of focus described in bug #305696. The workaround here
541
	* bypasses the use of XSetInputFocus() for GTK+ 2.17.x and
542
	* later.
537
	*/
543
	*/
538
	int /*long*/ window = OS.GTK_WIDGET_WINDOW (shellHandle);
544
	int /*long*/ window = OS.GTK_WIDGET_WINDOW (shellHandle);
539
	if ((xFocus || (style & SWT.ON_TOP) != 0) && OS.GDK_WINDOWING_X11 ()) {
545
	if ( OS.GTK_VERSION < OS.VERSION (2, 17, 0) && ((xFocus || (style & SWT.ON_TOP) != 0) && OS.GDK_WINDOWING_X11 ()) ) {
540
		int /*long*/ xDisplay = OS.gdk_x11_drawable_get_xdisplay (window);
546
		int /*long*/ xDisplay = OS.gdk_x11_drawable_get_xdisplay (window);
541
		int /*long*/ xWindow = OS.gdk_x11_drawable_get_xid (window);
547
		int /*long*/ xWindow = OS.gdk_x11_drawable_get_xid (window);
542
		OS.gdk_error_trap_push ();
548
		OS.gdk_error_trap_push ();

Return to bug 305696