Maximize/Iconify/Resize doesnt work, this makes the icon insensitive - Motif

This is a discussion on Maximize/Iconify/Resize doesnt work, this makes the icon insensitive - Motif ; 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 ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Maximize/Iconify/Resize doesnt work, this makes the icon insensitive

  1. Maximize/Iconify/Resize doesnt work, this makes the icon insensitive

    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 doesnt not happen when the window is in normal state and the
    button is pressed.

    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 is the problem.

    Thanks,
    Bharathi


  2. Re: Maximize/Iconify/Resize doesnt work, this makes the icon insensitive

    On 5 Nov 2006 21:02:37 -0800, "Bharathi" wrote:

    > 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 doesnt not happen when the window is in normal state and the
    >button is pressed.
    >
    >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 is the problem.


    The problem is that you're fighting the Window Manager; he's the one
    in charge of resizing and moving all shell windows, and doesnt like
    applications horning in on his territory :-)

    To resize the window, you will have to *negotiate* with the WM. IMHO
    the easiest way is to tweak the resources of the shell window. See eg
    man TopLevelShell and its superclasses. Of course this requires a WM
    that honors Motif hints, such as MWM or KDE3.

    >
    >Thanks,
    >Bharathi


+ Reply to Thread