


XReparentWindow(3X11)					XReparentWindow(3X11)
X11R5									X11R5



NAME
  XReparentWindow - reparent windows

SYNTAX
  XReparentWindow(_d_i_s_p_l_a_y, _w, _p_a_r_e_n_t, _x, _y)
	Display	*_d_i_s_p_l_a_y;
	Window _w;
	Window _p_a_r_e_n_t;
	int _x, _y;

ARGUMENTS

  _d_i_s_p_l_a_y   Specifies the connection to	the X server.

  _p_a_r_e_n_t    Specifies the parent window.

  _w	    Specifies the window.

  _x
  _y	    Specify the	x and y	coordinatesof the position in the new parent
	    window.

DESCRIPTION
  If the specified window is mapped, _X_R_e_p_a_r_e_n_t_W_i_n_d_o_w automatically performs
  an _U_n_m_a_p_W_i_n_d_o_w request on it,	removes	it from	its current position in	the
  hierarchy, and inserts it as the child of the	specified parent.  The window
  is placed in the stacking order on top with respect to sibling windows.

  After	reparenting the	specified window, _X_R_e_p_a_r_e_n_t_W_i_n_d_o_w causes the X server
  to generate a	_R_e_p_a_r_e_n_t_N_o_t_i_f_y event.  The override_redirect member returned
  in this event	is set to the window's corresponding attribute.	 Window
  manager clients usually should ignore	this window if this member is set to
  _T_r_u_e.	 Finally, if the specified window was originally mapped, the X server
  automatically	performs a _M_a_p_W_i_n_d_o_w request on	it.

  The X	server performs	normal exposure	processing on formerly obscured	win-
  dows.	 The X server might not	generate _E_x_p_o_s_e	events for regions from	the
  initial _U_n_m_a_p_W_i_n_d_o_w request that are immediately obscured by the final
  _M_a_p_W_i_n_d_o_w request.  A	_B_a_d_M_a_t_c_h error results if:

  oo++    The new parent window is	not on the same	screen as the old parent win-
       dow.

  oo++    The new parent window is	the specified window or	an inferior of the
       specified window.

  oo++    The new parent is _I_n_p_u_t_O_n_l_y and the window is not.

  oo++    The specified window has	a _P_a_r_e_n_t_R_e_l_a_t_i_v_e background, and the new
       parent window is	not the	same depth as the specified window.


  _X_R_e_p_a_r_e_n_t_W_i_n_d_o_w can generate _B_a_d_M_a_t_c_h	and _B_a_d_W_i_n_d_o_w errors.

DIAGNOSTICS

  _B_a_d_W_i_n_d_o_w A value for	a Window argument does not name	a defined Window.

SEE ALSO
  XChangeSaveSet(3X11)
  _X_l_i_b - _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e































































