From: Jan Djärv Date: Thu, 7 Feb 2008 14:08:07 +0000 (+0000) Subject: (Fx_create_frame): Do not override the explicitly set parent X-Git-Tag: emacs-pretest-23.0.90~8108 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2532f20ce7c6d57c386143e38479433780009665;p=emacs.git (Fx_create_frame): Do not override the explicitly set parent window ID of a frame. (x_window): Reparent frame if embedded. (Fx_create_frame): Don't set border width if embedded. --- diff --git a/src/xfns.c b/src/xfns.c index e94641bcbe9..ae1dea5cccc 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -2720,6 +2720,10 @@ x_window (f, window_prompting, minibuffer_only) XtManageChild (pane_widget); XtRealizeWidget (shell_widget); + if (FRAME_X_EMBEDDED_P (f)) + XReparentWindow (FRAME_X_DISPLAY (f), XtWindow (shell_widget), + f->output_data.x->parent_desc, 0, 0); + FRAME_X_WINDOW (f) = XtWindow (frame_widget); validate_x_resource_name (); @@ -3459,8 +3463,10 @@ else xlwmenu_default_font = FRAME_FONT (f); #endif - x_default_parameter (f, parms, Qborder_width, make_number (2), - "borderWidth", "BorderWidth", RES_TYPE_NUMBER); + /* Frame contents get displaced if an embedded X window has a border. */ + if (! FRAME_X_EMBEDDED_P (f)) + x_default_parameter (f, parms, Qborder_width, make_number (2), + "borderWidth", "BorderWidth", RES_TYPE_NUMBER); /* This defaults to 1 in order to match xterm. We recognize either internalBorderWidth or internalBorder (which is what xterm calls @@ -3531,8 +3537,6 @@ else x_default_parameter (f, parms, Qfullscreen, Qnil, "fullscreen", "Fullscreen", RES_TYPE_SYMBOL); - f->output_data.x->parent_desc = FRAME_X_DISPLAY_INFO (f)->root_window; - /* Compute the size of the X window. */ window_prompting = x_figure_window_size (f, parms, 1);