NAME

XConfigureWindow, XMoveWindow, XResizeWindow, XMoveResizeWindow, XSetWindowBorderWidth, XWindowChanges - configure windows and window changes structure

SYNTAX

int XConfigureWindow(Display *_d_i_s_p_l_a_y, Window _w, unsigned _v_a_l_u_e___m_a_s_k); int XMoveWindow(Display *_d_i_s_p_l_a_y, Window _w, int _x, _y); int XResizeWindow(Display *_d_i_s_p_l_a_y, Window _w, unsigned _w_i_d_t_h, unsigned _h_e_i_g_h_t); int XMoveResizeWindow(Display *_d_i_s_p_l_a_y, Window _w, int _x, int _y, unsigned _w_i_d_t_h, unsigned _h_e_i_g_h_t); int XSetWindowBorderWidth(Display *_d_i_s_p_l_a_y, Window _w, unsigned _w_i_d_t_h);

ARGUMENTS

_d_i_s_p_l_a_y Specifies the connection to the X server.
_v_a_l_u_e___m_a_s_k Specifies which values are to be set using information in
the values structure. This mask is the bitwise inclusive OR of the valid configure window values bits.
_v_a_l_u_e_s Specifies the
_X_W_i_n_d_o_w_C_h_a_n_g_e_s structure.
_w Specifies the window to be reconfigured, moved, or resized..
_w_i_d_t_h Specifies the width of the window border.
_w_i_d_t_h
_h_e_i_g_h_t Specify the width and height, which are the interior dimensions of the window.
of the window's border or the window itself if it has no border or define the new position of the window relative to its parent
_x
_y Specify the x and y coordinates, which define the new location of the top-left pixel.

DESCRIPTION

The _X_C_o_n_f_i_g_u_r_e_W_i_n_d_o_w function uses the values specified in the _X_W_i_n_d_o_w_C_h_a_n_g_e_s structure to reconfigure a window's size, position, border, and stacking order. Values not specified are taken from the existing geometry of the window.

If a sibling is specified without a stack_mode or if the window is not actually a sibling, a _B_a_d_M_a_t_c_h error results. Note that the computations for _B_o_t_t_o_m_I_f, _T_o_p_I_f, and _O_p_p_o_s_i_t_e are performed with respect to the window's final geometry (as controlled by the other arguments passed to _X_C_o_n_f_i_g_u_r_e_W_i_n_d_o_w), not its initial geometry. Any backing store contents of the window, its inferiors, and other newly visible windows are either discarded or changed to reflect the current screen contents (depending on the implementation).

_X_C_o_n_f_i_g_u_r_e_W_i_n_d_o_w can generate _B_a_d_M_a_t_c_h, _B_a_d_V_a_l_u_e, and _B_a_d_W_i_n_d_o_w errors.

The _X_M_o_v_e_W_i_n_d_o_w function moves the specified window to the specified x and y coordinates, but it does not change the window's size, raise the window, or change the mapping state of the window. Moving a mapped window may or may not lose the window's contents depending on if the window is obscured by nonchildren and if no backing store exists. If the contents of the window are lost, the X server generates _E_x_p_o_s_e events. Moving a mapped window generates _E_x_p_o_s_e events on any formerly obscured windows.

If the override-redirect flag of the window is _F_a_l_s_e and some other client has selected _S_u_b_s_t_r_u_c_t_u_r_e_R_e_d_i_r_e_c_t_M_a_s_k on the parent, the X server generates a _C_o_n_f_i_g_u_r_e_R_e_q_u_e_s_t event, and no further processing is performed. Otherwise, the window is moved.

_X_M_o_v_e_W_i_n_d_o_w can generate a _B_a_d_W_i_n_d_o_w error.

The _X_R_e_s_i_z_e_W_i_n_d_o_w function changes the inside dimensions of the specified window, not including its borders. This function does not change the window's upper-left coordinate or the origin and does not restack the window. Changing the size of a mapped window may lose its contents and generate _E_x_p_o_s_e events. If a mapped window is made smaller, changing its size generates _E_x_p_o_s_e events on windows that the mapped window formerly obscured.

If the override-redirect flag of the window is _F_a_l_s_e and some other client has selected _S_u_b_s_t_r_u_c_t_u_r_e_R_e_d_i_r_e_c_t_M_a_s_k on the parent, the X server generates a _C_o_n_f_i_g_u_r_e_R_e_q_u_e_s_t event, and no further processing is performed. If either width or height is zero, a _B_a_d_V_a_l_u_e error results.

_X_R_e_s_i_z_e_W_i_n_d_o_w can generate _B_a_d_V_a_l_u_e and _B_a_d_W_i_n_d_o_w errors.

The _X_M_o_v_e_R_e_s_i_z_e_W_i_n_d_o_w function changes the size and location of the specified window without raising it. Moving and resizing a mapped window may generate an _E_x_p_o_s_e event on the window. Depending on the new size and location parameters, moving and resizing a window may generate _E_x_p_o_s_e events on windows that the window formerly obscured.

If the override-redirect flag of the window is _F_a_l_s_e and some other client has selected _S_u_b_s_t_r_u_c_t_u_r_e_R_e_d_i_r_e_c_t_M_a_s_k on the parent, the X server generates a _C_o_n_f_i_g_u_r_e_R_e_q_u_e_s_t event, and no further processing is performed. Otherwise, the window size and location are changed.

_X_M_o_v_e_R_e_s_i_z_e_W_i_n_d_o_w can generate _B_a_d_V_a_l_u_e and _B_a_d_W_i_n_d_o_w errors.

The _X_S_e_t_W_i_n_d_o_w_B_o_r_d_e_r_W_i_d_t_h function sets the specified window's border width to the specified width.

_X_S_e_t_W_i_n_d_o_w_B_o_r_d_e_r_W_i_d_t_h can generate a _B_a_d_W_i_n_d_o_w error.

STRUCTURES

The _X_W_i_n_d_o_w_C_h_a_n_g_e_s structure contains:

/* Configure window value mask bits */

lw(.5i) lw(2.5i) lw(.8i).
T{
#define
T}      T{
_C_W_X
T}      T{
(1<<0)
T}
T{
#define
T}      T{
_C_W_Y
T}      T{
(1<<1)
T}
T{
#define
T}      T{
_C_W_W_i_d_t_h
T}      T{
(1<<2)
T}
T{
#define
T}      T{
_C_W_H_e_i_g_h_t
T}      T{
(1<<3)
T}
T{
#define
T}      T{
_C_W_B_o_r_d_e_r_W_i_d_t_h
T}      T{
(1<<4)
T}
T{
#define
T}      T{
_C_W_S_i_b_l_i_n_g
T}      T{
(1<<5)
T}
T{
#define
T}      T{
_C_W_S_t_a_c_k_M_o_d_e
T}      T{
(1<<6)
T}

/* Values */

typedef struct { int x, y; int width, height; int border_width; Window sibling; int stack_mode; } XWindowChanges;

The x and y members are used to set the window's x and y coordinates, which are relative to the parent's origin and indicate the position of the upper-left outer corner of the window. The width and height members are used to set the inside size of the window, not including the border, and must be nonzero, or a _B_a_d_V_a_l_u_e error results. Attempts to configure a root window have no effect.

The border_width member is used to set the width of the border in pixels. Note that setting just the border width leaves the outer-left corner of the window in a fixed position but moves the absolute position of the window's origin. If you attempt to set the border-width attribute of an _I_n_p_u_t_O_n_l_y window nonzero, a _B_a_d_M_a_t_c_h error results.

The sibling member is used to set the sibling window for stacking operations. The stack_mode member is used to set how the window is to be restacked and can be set to _A_b_o_v_e, _B_e_l_o_w, _T_o_p_I_f, _B_o_t_t_o_m_I_f, or _O_p_p_o_s_i_t_e.

DIAGNOSTICS

_B_a_d_M_a_t_c_h
An _I_n_p_u_t_O_n_l_y window is used as a Drawable.
_B_a_d_M_a_t_c_h
Some argument or pair of arguments has the correct type and range but fails to match in some other way required by the request.
_B_a_d_V_a_l_u_e
Some numeric value falls outside the range of values accepted by the request. Unless a specific range is specified for an argument, the full range defined by the argument's type is accepted. Any argument defined as a set of alternatives can generate this error.
_B_a_d_W_i_n_d_o_w
A value for a Window argument does not name a defined Window.

SEE ALSO

XChangeWindowAttributes(3X11), XCreateWindow(3X11), XDestroyWindow(3X11), XMapWindow(3X11), XRaiseWindow(3X11), XUnmapWindow(3X11)
_X_l_i_b _- _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e