c - XDeleteProperty returning BadRequest error -


i'm coding x11 clipboard client, , i'm getting hard time incr. basicly, problem when call xdeleteproperty on start incr transfer, got badrequest error code

here's snippet :

if (type == ctx->incr_atom)     {         ctx->pendingincr.status = incr_request_new;          if(xgetwindowproperty(ctx->display, ctx->window,                       ctx->property_atom, 0, remaining, false, anypropertytype,                       &type, &format_property, &length, &remaining, &data) == success)         {             fprintf(stderr, "getting window property : %lu bytes fetched\n", length);         }         else         {             fprintf(stderr, "failed getting window property\n");         }          error = xdeleteproperty(ctx->display, ctx->window, ctx->property_atom);          if(error == success)         {             fprintf(stderr, "entering incr protocol!\n");         }         else         {             fprintf(stderr, "failed deleting window property : error code %d\n", error);         }          xflush(ctx->display);         return 1;     } 

i found out looking @ xlib source code, unless return code 1 badrequest exception, return of xdeleteproperty 1... know !


Comments