org.gnome.gtk

## Interface Widget.UnmapEvent

- Enclosing class:
    Widget

      public static interface Widget.UnmapEvent

  The signal emitted when a Window becomes invisible. This happens in a variety of scenarios, notably when the Window is minimized, when you change workspaces, and as a Window is being destroyed.

  In combination with `Widget.VisibilityNotifyEvent`, this can be used to detect whether a Window is actually currently presented to the top of the stack and visible to the user:

       private boolean up = false;
       ...
       final Window w;
       final Button b;
       ...
       w.connect(new Widget.VisibilityNotifyEvent() {
           public boolean onVisibilityNotifyEvent(Widget source, EventVisibility event) {
               if (event.getState() == VisibilityState.UNOBSCURED) {
                   up = true;
               } else {
                   up = false;
               }
               return false;
           }
       });

       w.connect(new Widget.UnmapEvent() {
           public boolean onUnmapEvent(Widget source, Event event) {
               up = false;
               return false;
           }
       });

  thus allowing you to do something like:

       b.connect(new Button.Clicked() {
           public void onClicked(Button source) {
               if (up) {
                   w.hide();
                   up = false;
               } else {
                   w.present();
                   up = true;
               }
           }
       });

  to intelligently toggle the visibility of the Window.

  Note that you don't need `Widget.MapEvent` here because the the `Widget.VisibilityNotifyEvent` will be tripped if you come back to the workspace the Window is already on.

  Since:
    4.0.5
  Author:
    Andrew Cowie, Ryan Lortie

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `onUnmapEvent(Widget source, Event event)` Although this is an event-signal, this merely reports information coming from the underlying X11 windowing system.

- - ### Method Detail

    - #### onUnmapEvent

          boolean onUnmapEvent(Widget source,
                             Event event)

      Although this is an event-signal, this merely reports information coming from the underlying X11 windowing system. It's information you can monitor, but don't try to block this signal. Return `false`!