Beispiel #1
0
        void SetTemporaryWindowGeometry(Wnck.Window window, Gdk.Rectangle area)
        {
            Gdk.Rectangle oldGeo = window.EasyGeometry ();

            oldGeo.X += parent.ViewportX;
            oldGeo.Y += parent.ViewportY;

            if (!window_states.ContainsKey (window))
                window_states [window] = new WindowState (oldGeo, window.State);

            if (window.IsMaximized)
                window.Unmaximize ();

            window.SetWorkaroundGeometry (WindowGravity.Current, MoveResizeMask, area.X, area.Y, area.Width, area.Height);
        }
Beispiel #2
0
        public void MoveWindowInto(Wnck.Window window)
        {
            if (parent.IsVirtual) {
                Rectangle geo = window.EasyGeometry ();

                geo.X += window.Workspace.ViewportX;
                geo.Y += window.Workspace.ViewportY;

                int x = area.X + (geo.X % area.Width);
                int y = area.Y + (geo.Y % area.Height);

                x -= window.Workspace.ViewportX;
                y -= window.Workspace.ViewportY;

                window.SetWorkaroundGeometry (WindowGravity.Current, MoveMask, x, y, 0, 0);
            } else {
                window.MoveToWorkspace (parent);
            }
        }
Beispiel #3
0
        void RestoreTemporaryWindowGeometry(Wnck.Window window)
        {
            if (!window_states.ContainsKey (window))
                return;

            WindowState state = window_states [window];
            window.SetWorkaroundGeometry (WindowGravity.Current, MoveResizeMask, state.Area.X - parent.ViewportX,
                                          state.Area.Y - parent.ViewportY, state.Area.Width, state.Area.Height);

            window_states.Remove (window);
        }
Beispiel #4
0
		void RestoreTemporaryWindowGeometry (Wnck.Window window, Dictionary<Wnck.Window, WindowState> state)
		{
			if (!state.ContainsKey (window))
				return;
			
			WindowState currentState = state [window];
			window.SetWorkaroundGeometry (WindowGravity.Current, MoveResizeMask,
											currentState.Area.X - parent.ViewportX, currentState.Area.Y - parent.ViewportY,
											currentState.Area.Width, currentState.Area.Height);
		}