intercept window event such as Minimize - Motif

This is a discussion on intercept window event such as Minimize - Motif ; How do I intercept the Minimize event from the window manager? I am creating Motif applications and Qt applications. I have a Qt window and a Motif main window. When the main window is minimized I want the Qt window ...

+ Reply to Thread
Results 1 to 7 of 7

Thread: intercept window event such as Minimize

  1. intercept window event such as Minimize

    How do I intercept the Minimize event from the window manager? I am
    creating Motif applications and Qt applications. I have a Qt window and
    a Motif main window. When the main window is minimized I want the Qt
    window to be minimized as well. So, if I can intercept the Minimize
    event on the motif window I can then minimize my Qt window.


  2. Re: intercept window event such as Minimize

    nancyhowes@gmail.com wrote:
    > How do I intercept the Minimize event from the window manager? I am
    > creating Motif applications and Qt applications. I have a Qt window and
    > a Motif main window. When the main window is minimized I want the Qt
    > window to be minimized as well. So, if I can intercept the Minimize
    > event on the motif window I can then minimize my Qt window.


    Set the transient-for hint on the Qt window. The WM should then minimize it
    when its "owner" is minimized.

    http://tronche.com/gui/x/xlib/ICC/cl...ntForHint.html

  3. Re: intercept window event such as Minimize

    Russell Shaw wrote:
    > nancyhowes@gmail.com wrote:
    >
    >> How do I intercept the Minimize event from the window manager? I am
    >> creating Motif applications and Qt applications. I have a Qt window and
    >> a Motif main window. When the main window is minimized I want the Qt
    >> window to be minimized as well. So, if I can intercept the Minimize
    >> event on the motif window I can then minimize my Qt window.

    >
    >
    > Set the transient-for hint on the Qt window. The WM should then minimize it
    > when its "owner" is minimized.
    >
    > http://tronche.com/gui/x/xlib/ICC/cl...ntForHint.html
    >

    ISTR this works but that there is a catch: both shell widgets have to be
    realized at the time you set the hint.

    --
    Michel Bardiaux
    R&D Director
    T +32 [0] 2 790 29 41
    F +32 [0] 2 790 29 02
    E mailto:mbardiaux@mediaxim.be

    Mediaxim NV/SA
    Vorstlaan 191 Boulevard du Souverain
    Brussel 1160 Bruxelles
    http://www.mediaxim.com/

  4. Re: intercept window event such as Minimize

    The problem with this ( I just implemented it), is that the Qt window
    cant be minimized independent of the main window. They are now tightly
    coupled.
    Any ideas how to allow the Qt window to be minimized, independent of
    the
    main window?


  5. Re: intercept window event such as Minimize


    wrote in message
    news:1138153790.515967.111910@f14g2000cwb.googlegr oups.com...
    > How do I intercept the Minimize event from the window manager? I am
    > creating Motif applications and Qt applications. I have a Qt window and
    > a Motif main window. When the main window is minimized I want the Qt
    > window to be minimized as well. So, if I can intercept the Minimize
    > event on the motif window I can then minimize my Qt window.
    >


    In addition to the suggestion by Mr. Shaw, you can register a
    StructureNotify event handler on the Motif top level shell, and in that
    handler look for UnmapNotify events.

    --
    Fred L. Kleinschmidt
    Boeing Associate Technical Fellow
    Technical Architect, Software Reuse Project



  6. Re: intercept window event such as Minimize

    Thanks Fred. That did the trick.


  7. Re: intercept window event such as Minimize

    Nancy wrote:
    > The problem with this ( I just implemented it), is that the Qt window
    > cant be minimized independent of the main window. They are now tightly
    > coupled.
    > Any ideas how to allow the Qt window to be minimized, independent of
    > the
    > main window?
    >

    Please stop replying without any quoting of what you're replying to. You
    write *... with this...* but there is no way for us to know what *this*
    means!

    HaND,
    --
    Michel Bardiaux
    R&D Director
    T +32 [0] 2 790 29 41
    F +32 [0] 2 790 29 02
    E mailto:mbardiaux@mediaxim.be

    Mediaxim NV/SA
    Vorstlaan 191 Boulevard du Souverain
    Brussel 1160 Bruxelles
    http://www.mediaxim.com/

+ Reply to Thread