Find the answer to your Linux question:
Results 1 to 4 of 4
for some reason when i call XMoveResizeWindow thousands of times i get a maximum number of clients reached error. any idea why this is happening? For some reason my window ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2006
    Posts
    13

    x maximum number of clients reached error?


    for some reason when i call XMoveResizeWindow thousands of times i get a maximum number of clients reached error.

    any idea why this is happening?

    For some reason my window manager wont move a window unless i tell it to about 800 times. any other ideas on how i can trick it into moving a window?
    Im writing a plugin for compiz(a window manager)

    Thanks

  2. #2
    Linux Guru Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,252
    While I don't know about this exact problem, needing to call the function 800 times makes me believe that perhaps the Window Manager needs a correction. Check the bug tracker and report this. Maybe one of Compiz's devs can help you out.

  3. #3
    Just Joined!
    Join Date
    Jun 2006
    Posts
    13
    ok i found out whats going on. its not moveresize that is maxing out my clients its this function:

    can anyone tell me how to make it so i can call this as many times as i want without maxing out my clients?



    void getListOfWindows(Window windowList[])
    {
    Atom actual_type;
    int actual_format;
    unsigned long nitems, bytes_after;
    unsigned char *prop;
    XGetWindowProperty(display, DefaultRootWindow(display),
    XInternAtom(display, "_NET_CLIENT_LIST", TRUE),
    0L, 100000, FALSE, AnyPropertyType, &actual_type,
    &actual_format, &nitems, &bytes_after, &prop);
    Window* list;
    list = (Window*) prop;
    int windowListCount = 0;
    unsigned int i;
    for (i = 0; i < nitems; i++)
    {

    Atom windowType = None;
    Atom actual_type;
    int actual_format;
    unsigned long nitems, bytes_after;
    unsigned char *prop_return = NULL;

    Display* display = XOpenDisplay(0);
    if(Success == XGetWindowProperty(display, list[i],
    XInternAtom(display, "_NET_WM_WINDOW_TYPE", False),
    0L, sizeof(Atom),
    False, AnyPropertyType, &actual_type,
    &actual_format, &nitems, &bytes_after,
    &prop_return) && prop_return)
    {
    windowType = *(Atom *)prop_return;
    XFree(prop_return);
    }
    //**************
    char* window_name_return;
    XFetchName(display, list[i], &window_name_return);

    if(windowType == XInternAtom(display, "_NET_WM_WINDOW_TYPE_NORMAL", FALSE))
    {

    if(window_name_return[0] != 'c')
    {

    windowList[windowListCount] = list[i];
    windowListCount++;


    }
    }
    }
    }

  4. #4
    Just Joined!
    Join Date
    Jun 2006
    Posts
    13
    ah i found it: XOpenDisplay...
    never mind guys

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •