Esempio n. 1
0
 public ScreenItem(Viewport viewport)
 {
     Viewport = viewport;
 }
Esempio n. 2
0
		static void UpdateViewports ()
		{
			layouts = new Dictionary<Workspace, Viewport [,]> ();

			int currentViewport = 1;
			foreach (Wnck.Workspace workspace in Wnck.Screen.Default.Workspaces)
				if (workspace.IsVirtual) {
					int viewportWidth = workspace.Screen.Width;
					int viewportHeight = workspace.Screen.Height;
					
					int rows = workspace.Height / viewportHeight;
					int columns = workspace.Width / viewportWidth;
					
					layouts [workspace] = new Viewport [rows, columns];
					
					for (int i = 0; i < rows; i++)
						for (int j = 0; j < columns; j++) {
							Gdk.Rectangle area = new Gdk.Rectangle (j * viewportWidth, i * viewportHeight,
							                                        viewportWidth, viewportHeight);
							layouts [workspace] [i, j] = new Viewport (area, workspace);
							currentViewport++;
						}
				} else {
					layouts [workspace] = new Viewport [1,1];
					Viewport viewport = new Viewport (new Gdk.Rectangle (0, 0, workspace.Width, workspace.Height),
					                                  workspace);
					layouts [workspace] [0,0] = viewport;
					currentViewport++;
				}
		}