Working With Windows

The information in this chapter describes how to use windows in the desktop. You can use several types of window manager with the GNOME desktop, for example, Metacity and Sawfish. Many of the functions in Metacity are also available in Sawfish. This chapter describes the functions that are associated with the Metacity window manager.

I.6.1. Windows and Workspaces

You can display many windows at the same time on your desktop. Your windows are displayed in subdivisions of your desktop that are called workspaces. A workspace is a discrete area on the desktop in which you can work. Every workspace on the desktop contains the same desktop background, the same panels, and the same menus. However, you can run different applications, and open different windows in each workspace. You can display only one workspace at a time on your desktop but you can have windows open in other workspaces.

The Workspace Switcher applet displays a visual representation of your windows and workspaces, as show in Figure I.6-1.

Figure I.6-1Workspace Switcher Applet

By default, your desktop contains four workspaces. You can add more workspaces at any time. To add workspaces to your desktop, right-click on the Workspace Switcher applet, then choose Preferences from the applet popup menu. The Workspace Switcher Preferences dialog is displayed. Use the Number of workspaces spin box to specify the number of workspaces you require.

I.6.1.1. Window Manager Behavior

A window manager controls how windows appear and behave on your desktop. The window manager manages where your windows are located, which window has focus, and the style of the frame on the windows. The window frame contains buttons that enable you to perform standard actions such as moving, closing, and resizing windows.

You can configure window manager settings in the Window Behavior preference tool. This manual describes the functions that are associated with the default configuration of the Window Behavior window manager. The default configuration is specified in the Metacity preference tools. This manual also describes the default functions of the Crux theme.

I.6.2. Types of Window

The desktop features the following types of windows:

  • Application windows

    When you start an application, an application window opens. The window manager applies a frame to the application window. By default, the top edge of the application window contains a titlebar with buttons that you can use to work with the window. The buttons in an application window frame enable you to perform actions such as open the Window Menu, or close the window. The Window Menu provides a number of actions that you can perform on the window.

    The following figure shows a typical application window.

  • Dialog windows

    A dialog window is a popup window in which you enter information or commands. The dialog appears within a window frame. The frame of a dialog window contains buttons that enable you to open the Window Menu, or to close the dialog window.

    You can use the top edge of the frame to work with the window. For example, you can use the titlebar to move the dialog around the desktop. The frame also contains buttons that enable you to do the following:

    • Open the Window Menu
    • Close the dialog window

    Typically, you open a dialog window from an application window. When you open a dialog window, the window is usually raised and has focus. Some dialog windows do not allow you to use the application until you close the dialog.

    The following figure shows a typical dialog window.

I.6.2.1. Window Frames

A window frame is a border around a window. The window frame contains a titlebar. The titlebar normally contains buttons that you can use to work with the window.

I.6.2.1.1. Themes

You can apply several themes to your window frames. The theme determines how the frame looks. To choose a theme for all your window frames, choose Applications ▸ Desktop Preferences  ▸ Theme.

The default theme is Crux. This manual describes the functions that are associated with the Crux theme.

I.6.2.1.2. Control Elements

You can use the window frame to perform various actions with the window. In particular, the titlebar contains various active control elements. The following figure shows the titlebar of an application window:

Dialog windows also contain some of the window frame control elements. Table I.6-1 describes the active control elements on window frames, from left to right.

Table I.6-1Window Frame Control Elements
Control Element Description
Window Menu button Click on the button to open the Window Menu.
Titlebar

You can use the titlebar to perform the following actions:

  • To give focus to the window click on the titlebar.
  • To move the window grab the titlebar and drag the window to the new location.
  • To shade the window, double-click on the titlebar. To unshade the window, double-click on the titlebar again.
Minimize button Click on the Minimize button to minimize the window.
Maximize button Click on the Maximize button to maximize the window.
Close Window button Click on the Close Window button to close the window.
Border

The border around the window. Use the border to perform the following actions:

  • To resize the window grab the border and drag the border to the new size.
  • To open the Window Menu, right-click on the border.
Window contents

The area inside the window frame. Use the window contents to perform the following actions:

  • To move a window, press-and-hold Alt, click in the window contents, then drag the window to the new location.
  • To resize a window, press-and-hold Alt, then middle-click near the corner you want to resize. To resize the window, drag from the corner on which you middle-clicked.
  • To open the Window Menu, press-and-hold Alt, then right-click in the window contents.

I.6.3. Menus and Applets for Working With Windows and Workspaces

This section describes the menus and applets that you can use to work with windows and workspaces.

I.6.3.1. Window Menu

The Window Menu is a menu of commands that you can use to perform actions on your windows. To open the Window Menu perform one of the following actions:

  • Click on the Window Menu button on the window that you want to work with.
  • Press Alt+spacebar.
  • Press-and-hold Alt, then right-click on any part of the window that you want to work with.

Table I.6-2 describes the commands and submenus in the Window Menu.

Table I.6-2Window Menu Commands and Submenus
Menu Item Function
Close Closes the window.
Minimize Minimizes the window.
Maximize or Unmaximize Maximizes the window. If the window is already maximized, choose Unmaximize to restore the window to its previous size.
Shade or Unshade Shades the window. If the window is already shaded, choose Unshade to restore the window to its previous size.
Move Enables you to use the arrow keys to move the window.
Resize Enables you to use the arrow keys to resize the window.
Put on All Workspaces or Only on This Workspace Puts the window on all of your workspaces. If the window is already on all of your workspaces, choose Only on This Workspace to put on the current workspace only.
Move to workspace_name or Only on workspace_name Moves the window to the workspace that you choose. If the window is on all of your workspaces, choose Only on workspace_name to put the window on the workspace that you want.

I.6.3.2. Window List Applet

Window List displays a button for each window that is open. You can use the Window List to perform the following tasks:

  • To minimize a window

    Click on the button that represents the window.

  • To restore a minimized window

    Click on the button that represents the window.

  • To give focus to a window

    Click on the button that represents the window.

When you open a window, Window List displays a button that represents the window. The window list buttons show which windows are open. You can view which windows are open even if some windows are minimized, or other windows overlap a window. Window List can display buttons for the windows in your current workspace, or in all workspaces. To select this option, you must change the preferences of Window List.

You can also right-click on a window list button to open the Window Menu for the window that the button represents. When you open the Window Menu from Window List, the Window Menu does not contain the workspace commands. For more information on the Window Menu commands, see Section I.6.3.1 ― Window Menu.

Figure I.6-2 shows Window List when the following windows are open:

  • gedit
  • Dictionary
  • GHex
  • GNOME Terminal
Figure I.6-2Window List Applet

The buttons in the applet show the status of your windows. Table I.6-3 explains the information that the window list buttons provide about the window. The examples in Table I.6-3 refer to Figure I.6-2.

Table I.6-3Window Status Information on Window List Buttons
State Indicates Example
Button is pressed in. The window has focus. gedit
Square brackets around window title. The window is minimized. Dictionary
Button is not pressed in, no square brackets around title. The window is displayed on the desktop, and is not minimized. ghex
Numeral on button, in parentheses. The button represents a group of buttons. Gnome-terminal (3)

I.6.3.2.1. Grouping Buttons

If the space on a panel is limited, Window List can group the buttons that represent windows in the same class under one window list button. The GNOME Terminal button in Figure I.6-2 is an example of a button that represents a group of buttons. The following figure shows an example of Window List with a button group open:

To open a list of the windows in a group, click on the window list button that represents the group. You can click on the items in the list to give focus to windows, minimize windows, and restore windows.

To open the Window Menu for a window in a button group, right-click on the window list button that represents the group. A list of the windows in the group is displayed. To open the Window Menu for a window in the group, click on the item in the list. When you open the Window Menu from the Window List , the Window Menu does not contain the workspace commands. For more information on the Window Menu commands, see Section I.6.3.1 ― Window Menu.

I.6.3.3. Workspace Switcher Applet

Workspace Switcher displays a visual representation of your workspaces, as shown in Figure I.6-3. Figure I.6-3 shows the applet when the GNOME session contains four workspaces. Your workspaces appear as buttons on the applet. The background of the button in the applet that represents the current workspace is highlighted. The current workspace in Figure I.6-3 is the workspace at the left of the applet. To switch to another workspace, click on the workspace in the applet.

Figure I.6-3Workspace Switcher Applet

Workspace Switcher also displays the application windows and dialogs that are open in your workspaces.

The applet displays the workspaces in order from left to right across the rows of the applet. In Figure I.6-3, the applet is set up to display the workspaces in one row. You can specify the number of rows in which your workspaces are displayed in Workspace Switcher . You can also change the default behavior of the applet to display the names of your workspaces in the applet.

I.6.3.4. Using the Menu Panel to Work With Windows

From the Menu Panel, you can view a list of all windows that are currently open. You can also choose a window to give focus to. To view the window list, click on the icon at the extreme right of the Menu Panel. The following figure shows an example of the window list that is displayed from the Menu Panel:

When the focus changes, the icon that you click on to display the window list changes. The icon represents the window that currently has focus. To give focus to a window, choose that window from the window list.

The window list lists the windows in all workspaces. The windows in all workspaces other than the current workspace, are listed under a separator line.

You cannot move the icon at the extreme right of the Menu Panel.

I.6.4. Manipulating Windows

This section describes how to manipulate windows.

I.6.4.1. To Give Focus to a Window

A window that has focus can receive input from the mouse and the keyboard. Only one window can have focus at a time. The window that has focus has a different appearance than other windows.

You can use the following elements to give focus to a window:

Element Action
Mouse Click on the window, if the window is visible.
Shortcut key Switch between the windows that are open with a shortcut key. To give focus to a window, release the keys. The default shortcut key to switch between windows is Alt+Tab.
Window List Click on the button that represents the window in Window List .
Workspace Switcher Click on the window that you want to give focus to in the Workspace Switcher display. If you click on a window in another workspace, Workspace Switcher switches to the new workspace, and gives focus to the window.
Menu Panel Click on the icon at the extreme right of the Menu Panel. A list of your open windows is displayed. Choose the window from the list.

I.6.4.2. To Minimize a Window

To minimize a window perform one of the following actions:

  • Click on the Minimize button on the window frame.
  • Open the Window Menu, then choose Minimize.
  • If the window has focus, click on the button that represents the window in Window List. If the window does not have focus, click twice on the button that represents the window.
  • Right-click on the button that represents the window in Window List, then choose Minimize from the popup menu.

I.6.4.3. To Maximize a Window

When you maximize a window, the window expands as much as possible. To maximize a window perform one of the following actions:

  • To maximize the window, click on the Maximize button on the window frame. Alternatively, open the Window Menu, then choose Maximize.
  • Right-click on the button that represents the window in Window List, then choose Maximize from the Window Menu.

I.6.4.4. To Restore a Window

To restore a maximized window perform one of the following actions:

  • Click on the Maximize button on the window frame.
  • Open the Window Menu. Choose Unmaximize.
  • Right-click on the button that represents the window in Window List to open the Window Menu. Choose Unmaximize.

To restore a minimized window, click on the button that represents the window in Window List.

I.6.4.5. To Close a Window

To close a window perform one of the following actions:

  • Click on the Close Window button on the window frame.
  • Open the Window Menu. Choose Close.
  • Right-click on the button that represents the window in Window List, then choose Close from the Window Menu.

If you have unsaved data in the window, you are prompted to save your data.

I.6.4.6. To Resize a Window

To resize a window perform one of the following actions:

  • To resize a window vertically and horizontally point to a corner of the window. The mouse pointer changes to indicate that you can resize the window. Grab the corner and drag the window to the new size.

  • To resize a window vertically or horizontally, right-click on the button that represents the window in Window List. Choose Move from the Window Menu. Use the arrow keys to resize the window.

  • To resize a window horizontally point to one of the vertical edges of the window. The mouse pointer changes to indicate that you can resize the window. Grab the edge and drag the window to the new size.

  • To resize a window vertically point to the bottom edge of the window. The mouse pointer changes to indicate that you can resize the window. Grab the edge and drag the window to the new size.

  • To resize a window, press-and-hold Alt, then middle-click near the corner you want to resize. The mouse pointer changes to indicate that you can resize from the corner. To resize the window, drag from the corner on which you middle-clicked.

You cannot resize some dialog windows. Also, some application windows have a minimum size below which you cannot reduce the window.

I.6.4.7. To Move a Window

To move a window perform one of the following actions:

  • Grab the titlebar of the window and drag the window to the new location.
  • Press-and-hold Alt then drag the window to the new location.
  • Open the Window Menu, then choose Move. Use the arrow keys to move the window to the new location.
  • Right-click on the button that represents the window in Window List, then choose Move from the Window Menu. Use the arrow keys to move the window to the new location.

I.6.4.8. To Shade a Window

You can shade and unshade windows as follows:

Shade Reduce the window so that only the titlebar is visible.
Unshade Switch a window from a shaded state so that the full window is displayed.

To shade a window perform one of the following actions:

  • Double-click on the titlebar of the window. To unshade the window, double-click on the titlebar again.
  • Open the Window Menu. Choose Shade. To unshade the window, choose Unshade.
  • Right-click on the button that represents the window in Window List, then choose Shade from the Window Menu. To unshade the window, choose Unshade.

I.6.4.9. To Put a Window on All Workspaces

To put a window in all workspaces, open the Window Menu. Choose Put on All Workspaces. To set the window to appear only in the current workspace, choose Only on This Workspace.

I.6.4.10. To Move a Window to Another Workspace

You can move a window to another workspace in either of the following ways:

  • Use Workpsace Switcher

    In the Workpsace Switcher display, drag the window to the workspace you require.

  • Use the Window Menu

    Open the Window Menu. To move the window to the next workspace choose Move to workspace_name.

I.6.5. Manipulating Workspaces

This section describes how to manipulate workspaces.

I.6.5.1. To Switch Between Workspaces

You can switch between workspaces in any of the following ways:

  • Use Workspace Switcher

    Click on the workspace that you want to switch to in Workspace Switcher.

  • Use a shortcut key

    The default shortcut keys to switch between the workspaces are as follows:

    Shortcut Key Function
    Ctrl+Alt+right arrow Selects the workspace to the right.
    Ctrl+Alt+left arrow Selects the workspace to the left.

I.6.5.2. To Add Workspaces

To add workspaces to your desktop, right-click on Workspace Switcher, then choose Preferences from the applet popup menu. The Workspace Switcher Preferences dialog is displayed. Use the Number of workspaces spin box to specify the number of workspaces you require. Workspace Switcher adds new workspaces at the end of the workspace list.

I.6.5.3. To Name Workspaces

The default names of your workspaces are Workspace 1, Workspace 2, Workspace 3, and so on. You can assign names to your workspaces in the Workspaces desktop preference tool.

To assign names to your workspaces, right-click on Workspace Switcher, then choose Preferences from the applet popup menu. The Workspace Switcher Preferences dialog is displayed. Use the Workspaces list box to specify the names of your workspaces. Select a workspace, then type the new name for the workspace.

I.6.5.4. To Delete Workspaces

When you delete a workspace the windows in the workspace are moved to another workspace, and the empty workspace is deleted.

To delete workspaces from your desktop, right-click on Workspace Switcher, then choose Preferences from the applet popup menu. The Workspace Switcher Preferences dialog is displayed. Use the Number of workspaces spin box to specify the number of workspaces you require. Workspace Switcher deletes workspaces from the end of the workspace list.