protected override bool OnWindowStateEvent(Gdk.EventWindowState evt)
 {
     if ((evt.ChangedMask & (Gdk.WindowState.Maximized | Gdk.WindowState.Fullscreen)) != 0)
     {
         HasResizeGrip = (evt.NewWindowState & (Gdk.WindowState.Maximized | Gdk.WindowState.Fullscreen)) == 0;
     }
     return(false);
 }
Esempio n. 2
0
        protected override bool OnWindowStateEvent(Gdk.EventWindowState evnt)
        {
            ToggleAction fullscreen_action = (ToggleAction)ServiceManager.Get <InterfaceActionService> ().ViewActions["FullScreenAction"];

            fullscreen_action.Active = (evnt.NewWindowState & Gdk.WindowState.Fullscreen) != 0;

            if ((evnt.NewWindowState & Gdk.WindowState.Withdrawn) == 0)
            {
                window_controller.Save();
            }

            return(base.OnWindowStateEvent(evnt));
        }
Esempio n. 3
0
        /// <summary>
        /// check if we are maximized or not ... used if we want to restore the window
        /// </summary>
        /// <param name='evnt'>
        /// If set to <c>true</c> evnt.
        /// </param>
        protected override bool OnWindowStateEvent(Gdk.EventWindowState evnt)
        {
            if (evnt.NewWindowState == Gdk.WindowState.Maximized)
            {
                Maximized = true;
            }

            if ((int)evnt.NewWindowState == 128)
            {
                Maximized = false;
            }
            return(base.OnWindowStateEvent(evnt));
        }
Esempio n. 4
0
        protected override bool OnWindowStateEvent(Gdk.EventWindowState evnt)
        {
            var action_service = ServiceManager.Get <InterfaceActionService> ();

            if (action_service != null)
            {
                ((ToggleAction)action_service.ViewActions["FullScreenAction"]).Active = (evnt.NewWindowState & Gdk.WindowState.Fullscreen) != 0;
            }

            if ((evnt.NewWindowState & Gdk.WindowState.Withdrawn) == 0)
            {
                window_controller.Save();
            }

            return(base.OnWindowStateEvent(evnt));
        }
Esempio n. 5
0
        protected override bool OnWindowStateEvent(Gdk.EventWindowState evnt)
        {
            // HACK around Gtk window restore brokenness on win7:
            // When restoring a maximized window, it gets restored to the nonmaximized state
            if (MonoDevelop.Core.Platform.IsWindows)
            {
                if (wasRestoredToMaximized && evnt.NewWindowState == 0)
                {
                    wasRestoredToMaximized = wasMinimizedFromMaximized = false;
                    Maximize();
                    return(true);
                }

                wasRestoredToMaximized    = (wasMinimizedFromMaximized && evnt.NewWindowState == Gdk.WindowState.Maximized);
                wasMinimizedFromMaximized = (evnt.NewWindowState == (Gdk.WindowState.Iconified | Gdk.WindowState.Maximized));
            }

            return(base.OnWindowStateEvent(evnt));
        }
Esempio n. 6
0
        protected override bool OnWindowStateEvent(Gdk.EventWindowState evnt)
        {
            Setup(evnt.NewWindowState);

            return(base.OnWindowStateEvent(evnt));
        }