private void OnWindowStateEvent (object sender, WindowStateEventArgs e) { Console.WriteLine ("state event: type=" + e.Event.Type + "; new_window_state=" + e.Event.NewWindowState); if (e.Event.Type != Gdk.EventType.WindowState) return; switch (e.Event.NewWindowState) { case Gdk.WindowState.Maximized: MaximizeMenu.Active = true; FullscreenMenu.Active = false; break; case Gdk.WindowState.Fullscreen: FullscreenMenu.Active = true; MaximizeMenu.Active = false; break; case (Gdk.WindowState.Fullscreen | Gdk.WindowState.Maximized): MaximizeMenu.Active = true; FullscreenMenu.Active = true; break; case (Gdk.WindowState) 0: FullscreenMenu.Active = false; MaximizeMenu.Active = false; break; default: // ignore break; } }
protected void OnWindowStateEvent(object sender, WindowStateEventArgs e) { if (e.Event.ChangedMask == WindowState.Iconified && e.Event.NewWindowState == WindowState.Iconified) this.Visible = false; }
void OnWindowStateEvent(object o, WindowStateEventArgs args) { if ((args.Event.ChangedMask & Gdk.WindowState. Fullscreen) == 0) return; if ((args.Event.NewWindowState & Gdk.WindowState. Fullscreen) != 0) { appsBar.Hide (); } else { appsBar.Show (); } }
// End up here if we iconify with the window manager private static void on_mainWindow_window_state_event(object o, WindowStateEventArgs args) { //Console.WriteLine ("state event: type=" + args.Event.Type + // "; new_window_state=" + args.Event.NewWindowState); if (args.Event.NewWindowState == Gdk.WindowState.Iconified) { iconified = true; gfax.MainWindow.SkipTaskbarHint = true; } else { gfax.MainWindow.SkipTaskbarHint = false; iconified = false; } }
protected virtual void OnWindowStateEvent(object o, WindowStateEventArgs args) { if ((args.Event.ChangedMask & Gdk.WindowState. Fullscreen) == 0) return; if ((args.Event.NewWindowState & Gdk.WindowState. Fullscreen) != 0) { replace_viewitem (fullscreenMenuItem, unfullscreenMenuItem); } else { replace_viewitem (unfullscreenMenuItem, fullscreenMenuItem); } }
private void OnWindowStateEvent(object sender, WindowStateEventArgs args) { WindowState state = args.Event.NewWindowState; bool maximized = (state & WindowState.Maximized) != 0; UISchema.Maximized.Value = maximized; }