NAME

XReparentWindow - reparent windows

SYNTAX

int XReparentWindow(Display *_d_i_s_p_l_a_y, Window _w, Window _p_a_r_e_n_t, int _x, int _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 windows. 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:

· The new parent window is not on the same screen as
the old parent window.
· The new parent window is the specified window or an inferior of the
specified window.
· The new parent is
_I_n_p_u_t_O_n_l_y, and the window is not.
· 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