I have an appication in which I have a callback which iconifies and
then resizes the window. When I maximize the window and click the
button the icon becomes insensitive.
Only after I switch the workspace does the window gets displayed with a
resize.

This is the callback which I have wrote:

void button_cb(Widget w,void *client_data,void *call_data) {
Display* dpy=XtDisplay(toplevel1);
Window win= XtWindow(toplevel1);
XIconifyWindow(dpy,win,0);
XtMakeResizeRequest(toplevel1,300,400,NULL,NULL);

}
Where do I go wrong.

Please help me in this regard. As Its getting difficult to solve this
problem.

Thanks,
Bharathi