if (imHandle != 0) { int window = OS.GTK_WIDGET_WINDOW (handle); if (window != 0) { OS.gtk_im_context_set_client_window (imHandle, window); } }
void createScrolledHandle (int parentHandle) {	//TEMPORARY CODE//	boolean isScrolled = (style & (SWT.H_SCROLL | SWT.V_SCROLL)) != 0;	boolean isScrolled = true;	if (isScrolled) {		fixedHandle = OS.gtk_fixed_new ();		if (fixedHandle == 0) error (SWT.ERROR_NO_HANDLES);		OS.gtk_fixed_set_has_window (fixedHandle, true);		int vadj = OS.gtk_adjustment_new (0, 0, 100, 1, 10, 10);		if (vadj == 0) error (SWT.ERROR_NO_HANDLES);		int hadj = OS.gtk_adjustment_new (0, 0, 100, 1, 10, 10);		if (hadj == 0) error (SWT.ERROR_NO_HANDLES);		scrolledHandle = OS.gtk_scrolled_window_new (hadj, vadj);		if (scrolledHandle == 0) SWT.error (SWT.ERROR_NO_HANDLES);	}	handle = OS.gtk_fixed_new ();	if (handle == 0) SWT.error (SWT.ERROR_NO_HANDLES);	OS.gtk_fixed_set_has_window (handle, true);	OS.GTK_WIDGET_SET_FLAGS(handle, OS.GTK_CAN_FOCUS);	if ((state & CANVAS) != 0 && (style & SWT.NO_FOCUS) == 0) {		imHandle = OS.gtk_im_multicontext_new ();		if (imHandle == 0) error (SWT.ERROR_NO_HANDLES);	}	if (isScrolled) {		OS.gtk_container_add (parentHandle, fixedHandle);		OS.gtk_container_add (fixedHandle, scrolledHandle);		/*		* Force the scrolledWindow to have a single child that is		* not scrolled automatically.  Calling gtk_container_add		* seems to add the child correctly but cause a warning.		*/		boolean warnings = display.getWarnings ();		display.setWarnings (false);		OS.gtk_container_add (scrolledHandle, handle);		display.setWarnings (warnings);				OS.gtk_widget_show (fixedHandle);		OS.gtk_widget_show (scrolledHandle);		int hsp = (style & SWT.H_SCROLL) != 0 ? OS.GTK_POLICY_ALWAYS : OS.GTK_POLICY_NEVER;		int vsp = (style & SWT.V_SCROLL) != 0 ? OS.GTK_POLICY_ALWAYS : OS.GTK_POLICY_NEVER;		OS.gtk_scrolled_window_set_policy (scrolledHandle, hsp, vsp);		//CHECK WIDTH IS THERE ALREADY THEN DON'T SET		if (hasBorder ()) {			OS.gtk_scrolled_window_set_shadow_type (scrolledHandle, OS.GTK_SHADOW_ETCHED_IN);		}	} else {		OS.gtk_container_add (parentHandle, handle);			}	OS.gtk_widget_show (handle);		if ((style & SWT.NO_REDRAW_RESIZE) != 0) {		OS.gtk_widget_set_redraw_on_allocate (handle, false);	}}