public virtual bool focus(int id)
        {
            // check if that window is focusable
            XWindow window = getWindow(id);

            if (window == null)
            {
                throw new System.Exception("Tried to focus(" + id
                                           + ") a null window.");
            }

            if (!XUtils.isSet(window.flags,
                              XStandOutFlags.FLAG_WINDOW_FOCUSABLE_DISABLE))
            {
                // remove focus from previously focused window
                if (sFocusedWindow != null)
                {
                    unfocus(sFocusedWindow);
                }

                return(window.onFocus(true));
            }

            return(false);
        }
 public virtual bool unfocus(XWindow window)
 {
     if (window == null)
     {
         throw new System.Exception(
                   "Tried to unfocus a null window.");
     }
     return(window.onFocus(false));
 }
 public virtual bool unfocus(XWindow window)
 {
     if (window == null)
     {
         throw new System.Exception(
                 "Tried to unfocus a null window.");
     }
     return window.onFocus(false);
 }