Logo Search packages:      
Sourcecode: xdotool version File versions  Download package

int xdo_window_setsize ( const xdo_t xdo,
Window  wid,
int  w,
int  h,
int  flags 
)

Change the window size.

Parameters:
wid the window to resize
w the new desired width
h the new desired height
flags if 0, use pixels for units. If SIZE_USEHINTS, then the units will be relative to the window size hints.

Definition at line 238 of file xdo.c.

References SIZE_USEHINTS, and xdo::xdpy.

                                                                                          {
  XWindowChanges wc;
  int ret = 0;
  int cw_flags = 0;

  if (flags & SIZE_USEHINTS) {
    xdo_window_translate_with_sizehint(xdo, window, width, height,
                                       &wc.width, &wc.height);
  } else {
    wc.width = width;
    wc.height = height;
  }

  if (width > 0) {
    cw_flags |= CWWidth;
  }

  if (height > 0) {
    cw_flags |= CWHeight;
  }

  ret = XConfigureWindow(xdo->xdpy, window, cw_flags, &wc);
  XFlush(xdo->xdpy);
  return _is_success("XConfigureWindow", ret == 0);
}


Generated by  Doxygen 1.6.0   Back to index