# Window Behavior

&Mike.McBride;
&Jost.Schenck;
&tde-authors;
&tde-release-version;
Reviewed: &tde-release-date;
2010
Mike McBride
Jost Schenck
&tde-copyright-date;
&tde-team;
TDE
KControl
system settings
window behavior
focus
actions
moving

## Window Behavior

In the upper part of this control module you can see several tabs: Focus, Titlebar Actions, Window Actions, Moving, Advanced, and Translucency.

In the Focus panel you can configure how windows gain or lose focus, &ie; become active or inactive.

Using Titlebar Actions and Window Actions you can configure how titlebars and windows react to mouse clicks.

Moving allows you to configure how windows move and place themselves when started.

The Advanced options cover some specialized options involving moving windows between desktops and window shading.

The Translucency options support window manager desktop effects through the kompmgr compositing manager.

Please note the configuration options in this module will not take effect when you do not use &tde;'s native window manager, &twin;. When you use a different window manager, please refer to the respective documentation for customizing window behavior.

### Focus

The focus of the desktop refers to the window which the user is currently working on. The window with focus is often referred to as the active window.

Focus does not necessarily mean the window is the one at the front — this is referred to as raised, and although this is configured here as well, focus and raising of windows are configured independently.

#### Focus Policy

There are four methods &tde; can use to determine the current focus:

Click to Focus

  A window becomes active when you click into it.

Focus Follows Mouse

  Moving the mouse pointer actively over a normal window activates it. New windows such as the mini command line invoked with &Alt;F2 will receive the focus, without you having to point the mouse at them explicitly.

  In other window managers, this is sometimes known as Sloppy focus follows mouse.

Focus Under Mouse

  The window that happens to be under the mouse pointer becomes active. When the mouse is not over a window (for instance, it's on the desktop) the last window that was under the mouse has focus. New windows such as the mini command line invoked with &Alt;F2 will not receive the focus, you must move the mouse over them to type.

Focus Strictly Under Mouse

  Similar to Focus Under Mouse, but even more strict with its interpretation. Only the window under the mouse pointer is active. When the mouse pointer is not over a window, no window has focus. New windows such as the mini command line invoked with &Alt;F2 will not receive the focus, you must move the mouse over them to type.

  Note that Focus Under Mouse and Focus Strictly Under Mouse prevent certain features from working properly, such as the &Alt;&Tab; windows switching dialog.

After deciding the focus policy, there are window raising options.

When enabling Auto raise, &tde; can bring a window to the front when the mouse is over that window for a specified period. When Delay focus is enabled, there will be a delay after which the window the mouse pointer is over will become active (receive focus). This is very useful with the Focus Follows Mouse option. You can determine the delay for both options by using the spin box controls.

Setting the delay too short will cause a rapid fire changing of windows, which can be quite distracting. Most people will like a delay of 100-300 milliseconds. This is responsive, but it will let you slide over the corners of a window on your way to your destination without bringing that window to the front.

When you do not use Auto raise, ensure the Click raises active window option is enabled. You will not be happy with both Auto raise and Click raises active window disabled, the net effect is that windows are not raised at all.

#### Focus stealing prevention level

This option specifies how much TWin will try to prevent unwanted focus stealing caused by unexpected activation of new windows.

This feature does not work with the Focus Under Mouse or Focus Strictly Under Mouse focus policies.

None

  Prevention is turned off and new windows always become activated.

Low

  Prevention is enabled; when some window does not have support for the underlying mechanism and TWin cannot reliably decide whether to activate the window or not, it will be activated. This setting may have both worse and better results than the medium level, depending on the applications.

Medium

  Prevention is enabled.

High

  New windows get activated only when no window is currently active or when they belong to the currently active application. This setting is probably not really usable when not using mouse focus policy.

Extreme

  All windows must be explicitly activated by the user.

Windows that are prevented from stealing focus are marked as demanding attention, which by default means their taskbar entry will be highlighted. This can be changed in the Notifications control module.

#### Navigation

In the Navigation frame you can configure the way switching between applications or desktops using &Alt;&Tab; or &Ctrl;&Tab;.

Show window list while switching windows. This option determines the method used when switching applications using &Alt; &Tab;. Pressing and holding &Alt; while repeatedly pressing and releasing the &Tab; key, can take place in &tde; mode or in &CDE; mode. In &tde; mode you will see a window box in the middle of the screen showing the currently selected application while still holding the &Alt; key. In &CDE; mode there is no window box and the focus immediately goes to each new application when selected by pressing the &Tab; key.

Traverse windows on all desktops. With this option enabled, switching windows with &Alt;&Tab; will show all applications on all desktops and take you to the appropriate desktop for the application you select. When disabled, only windows on your current desktop are selectable with &Alt;&Tab; and you must use &Ctrl;&Tab; or other methods to switch to other desktops.

Desktop navigation wraps around. With this option, you cycling through to the last desktop, pressing &Tab; again will select the first desktop.

Popup desktop name on desktop switch. Many people name their virtual desktops according to their purpose or some other naming scheme. You might find this method convenient to select the desired desktop to tell that you have switched to the right one.

### Titlebar Actions

In this panel you can configure what happens to windows when a mouse button is clicked on their titlebars.

#### Titlebar double-click

In this drop down box you can select either Shade, several variations of Maximize or Lower.

Selecting Maximize causes &tde; to maximize the window whenever you double click on the titlebar. You can further choose to maximize windows only horizontally or only vertically.

Shade, on the other hand, causes the window to be reduced to simply the titlebar. Double clicking on the titlebar again, restores the window to its normal size.

#### Titlebar wheel event

This feature functions much the same as Titlebar double-click except the mouse scroll wheel causes the events.

You can have windows automatically unshade when you simply place the mouse over their shaded titlebar. Just check the Enable hover check box in the Advanced tab of this module. This is a great way to reclaim desktop space when you are cutting and pasting between a lot of windows, for example.

#### Titlebar & Frame

This section allows you to determine what happens when you single click on the titlebar or frame of a window. Notice that you can have different actions associated with the same click depending on whether the window is active or not.

For each combination of mouse buttons, modifiers, Active and Inactive, you can select the most appropriate choice. The actions are as follows:

Activate

  Make this window active.

Lower

  Will move this window to the bottom of the display. This will get the window out of the way.

Nothing

  Just like it says. Nothing happens.

Operations Menu

  Will bring up a small submenu, where you can choose window related commands (&ie; Maximize, Minimize, Close, &etc;).

Raise

  Will bring the window to the top of the display. All other windows which overlap with this one, will be hidden below it.

Toggle Raise & Lower

  This will raise windows which are not on top, and lower windows which are already on top.

#### Maximize Button

This section allows you to determine the behavior of the three mouse buttons onto the maximize button. You have the choice between vertical only, horizontal only or both directions.

### Window Actions

#### Inactive Inner Window

This part of the module, allows you to configure what happens when you click on an inactive window, with any of the three mouse buttons.

Your choices are as follows:

Activate, Raise & Pass Click

  This makes the clicked window active, raises it to the top of the display, and passes a mouse click to the application within the window.

Activate & Pass Click

  This makes the clicked window active and passes a mouse click to the application within the window.

Activate

  This simply makes the clicked window active. The mouse click is not passed on to the application within the window.

Activate & Raise

  This makes the clicked window active and raises the window to the top of the display. The mouse click is not passed on to the application within the window.

#### Inner Window, Titlebar & Frame

This bottom section, allows you to configure additional actions, when a modifier key (by default &Alt;) is pressed, and a mouse click is made on a window.

Once again, you can select different actions for Left, Middle and Right button clicks and the Mouse wheel.

Your choices are:

Lower

  Will move this window to the bottom of the display. This will get the window out of the way.

Move

  Allows you to drag the selected window around the desktop.

Nothing

  Just like it says. Nothing happens.

Raise

  Will bring the window to the top of the display. All other windows which overlap with this one, will be hidden below it.

Resize

  Allows you to change the size of the selected window.

Toggle Raise & Lower

  This will raise windows which are not on top, and lower windows which are already on top.

### Moving

#### Windows

The options here determine how windows appear on screen when you are moving them. Most of these options mean a price in performance, so when you want to streamline your desktop, you should turn them off. However, when you have a fast computer, they may make your day a little more pleasant, so leave them on.

Display content in moving windows

  Enable this option when you want a window's content to be fully shown while moving it, instead of just showing a window skeleton. The result may not be satisfying on slow computers without graphic acceleration.

Display content in resizing windows

  Enable this option when you want a window's content to be shown while resizing it, instead of just showing a window skeleton. The result, again, may not be satisfying on slower computers.

Display window geometry when moving or resizing

  Enable this option when you want a popup tooltip to tell you the size in pixels of a window as you resize it.

Animate minimize and restore

  When enabled, this feature provides animation when windows are minimized or restored. The effect is the window "shrinks" while minimizing to the panel and "grows" when restoring.

Allow moving and resizing of maximizing windows

  When enabled, this feature activates the titlebar and border of maximized windows to allow moving or resizing maximized windows.

Placement

  This feature determines where new windows are placed on the desktop.

  - Smart will try to achieve a minimum overlap of all windows. Generally, placement begins at the upper left and continues to the right, then begins again at the left but lower, something like the rasterization of CRT tubes in TVs.

  - Maximizing will try to maximize every window to fill the whole screen. It might be useful to selectively affect placement of some windows using the window-specific settings.

  - Cascade will cascade the windows.

  - Random will use a random position.

  - Centered will place the window centered.

  - Zero-Cornered will place the window in the top-left corner

#### Snap Zones

The rest of this page allows you to configure the Snap Zones. These are like a magnetic field along the side of the desktop and each window, which will make windows snap alongside when moved near.

Border snap zone:

  Here you can set the snap zone for screen borders. Moving a window within the configured distance will make it snap to the edge of the desktop.

Window snap zone:

  Here you can set the snap zone for windows. As with screen borders, moving a window near to another will make it snap to the edge as when the windows were magnetized.

Snap windows only when overlapping

  When checked, windows will not snap together when they are only near each other, they must be overlapping, by the configured amount or less.

### Advanced

In the Advanced panel you can do more advanced fine tuning to the window behavior.

#### Shading

Animate

  When this option is enabled, shading, or rolling up a window until just the title bar is shown, will be animated.

Enable hover

  When this option is enabled, a shaded window will un-shade automatically when the mouse pointer has been over the titlebar for the configured delay. Use the slider widget to configure the delay.

#### Active Desktop Borders

Disabled

  When this option is enabled, moving the mouse pointer to a screen border will change your desktop. This is useful when you want to drag windows from one desktop to another.

Only when moving windows

  Moving your mouse pointer against the side of the screen will switch to a new desktop only while moving a window.

Always enabled

  Moving your mouse pointer against the side of the screen will always switch to a new desktop.

Hide utility windows for inactive applications. When enabled, utility windows (tool windows, torn-off menus) of inactive applications will be hidden and will be shown only when the application becomes active. Note that applications have to mark the windows with the proper window type for this feature to work.

### Translucency

The options available in this module are explained in the &kompmgr; Handbook.