Example #1
0
        /**
           * @see <a href="XIconifyWindow.html">XIconifyWindow</a>
           * @see <a href="icccm.html#4.1.4">ICCCM Section 4.1.4</a>
           * @see #send_event(bool, int, Event)
           */
        public void iconify()
        {
            Atom wm_change_state = (Atom) Atom.intern (display, "WM_CHANGE_STATE");

            ClientMessage evt = new ClientMessage (display);
            evt.set_format (32);
            evt.set_window (this);
            evt.set_type (wm_change_state);
            evt.set_wm_data (WMHints.ICONIC);
            send_event (false, Event.SUBSTRUCTURE_REDIRECT_MASK
              | Event.SUBSTRUCTURE_NOTIFY_MASK, evt);
        }
Example #2
0
        public void delete()
        {
            if (!(wm_protocol ("WM_DELETE_WINDOW"))) return;

            ClientMessage evt = new ClientMessage (display);
            Atom wm_protocols = (Atom) Atom.intern (display, "WM_PROTOCOLS");
            Atom wm_delete_window = (Atom) Atom.intern (display,
              "WM_DELETE_WINDOW");

            evt.set_format (32);
            evt.set_window (this);
            evt.set_type (wm_protocols);
            evt.set_wm_data (wm_delete_window.id);
            evt.set_wm_time (Display.CURRENT_TIME);
            send_event (false, Event.NO_EVENT_MASK, evt);
        }