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

int xdo_window_setclass ( const xdo_t xdo,
Window  wid,
const char *  name,
const char *  class 
)

Change the window's classname and or class.

Parameters:
name The new class name. If NULL, no change. The new class. If NULL, no change.

Definition at line 264 of file xdo.c.

References xdo::xdpy.

                                                                                            {
  int ret = 0;
  XClassHint *hint = XAllocClassHint();
  XGetClassHint(xdo->xdpy, wid, hint);
  if (name != NULL)
    hint->res_name = (char*)name;

  if(class != NULL)
    hint->res_class = (char*)class;

  ret = XSetClassHint(xdo->xdpy, wid, hint);
  XFree(hint);
  return _is_success("XSetClassHint", ret == 0);
}


Generated by  Doxygen 1.6.0   Back to index