XSETFRAME (bufp->frame_or_window, frame);
}
+ if (!frame->output_data.x->focus_state)
+ {
#ifdef HAVE_X_I18N
- if (FRAME_XIC (frame))
- XUnsetICFocus (FRAME_XIC (frame));
+ if (FRAME_XIC (frame))
+ XUnsetICFocus (FRAME_XIC (frame));
#ifdef USE_GTK
- if (x_gtk_use_native_input)
- {
- gtk_im_context_focus_out (FRAME_X_OUTPUT (frame)->im_context);
- gtk_im_context_set_client_window (FRAME_X_OUTPUT (frame)->im_context, NULL);
- }
+ if (x_gtk_use_native_input)
+ {
+ gtk_im_context_focus_out (FRAME_X_OUTPUT (frame)->im_context);
+ gtk_im_context_set_client_window (FRAME_X_OUTPUT (frame)->im_context, NULL);
+ }
#endif
#endif
+ }
+
if (frame->pointer_invisible)
XTtoggle_invisible_pointer (frame, false);
}