Chapter 5.4 Window Management
=============================

Window are the area which contains the graphical user interface that we interact with programs. In Lubuntu these windows can typically be opened, closed, resized and minimized. Underneath Lubuntu uses Openbox as default a window manager. 

Using the mouse
---------------
In the top-right corner of windows a few commands allow you basic controls of the window. Starting from left to right

-   Iconify :guilabel:`-` hides/minimizes the window making it only appear on the task bar of the Panel. It can be recalled by clicking on the application on the task bar, or cycling through open windows with :kbd:`ALT + Tab`. Another way to Iconify is to middle click on the tittlebar. 
-   Maximize reshapes the window to fix the entire screen.
-   Close :guilabel:`x` attempts to close the window unless a dialog asks for to save or the program is not responding.

.. image:: window_corner.png

The window can be moved by by clicking on the title-bar and dragging the mouse or from the menu on the titlebar select :menuselection:`Move`. Windows can be minimized by middle clicking on the titlebar with the mouse. You can resize the window by grabbing the border (sides or corners which should be highlighted in blue) and dragging or from the menu on the titlebar select :menuselection:`Resize`. 

Right clicking on the title bar or left clicking on the icon in the top-left of the window brings the window management menu. Here you can:

-   Using :menuselection:`Send to desktop`, send the window to a virtual desktop of your choice or All Desktop
-   Using :menuselection:`Layer` option allows you to set  whether this windows the layer to :menuselection:`Always on top`, :menuselection:`Normal`, or :menuselection:`Always on bottom` 
-   If you want to move something Always on bottom or Always on top you can move it back to :menuselection:`Normal`. 
-   The earlier mentioned :menuselection:`Iconify`, :menuselection:`Maximize`, and :menuselection:`Close`  options are also available here.
-   :menuselection:`Roll up/down` rolls the window into the title-bar.
-   :menuselection:`Un/Decorate` hides them title-bar.

.. image:: wm_menu.png

Useful keyboard shortcuts
-------------------------
-   Closing a window :kbd:`Alt + F4`
-   Switching through windows :kbd:`Hold Alt + hit Tab`
-   To switch between tabs in the reverse direction :kbd:`Hold Alt + Shift+Tab`
-   Show desktop with :kbd:`Control + Alt + D`. 
-   To open the normally on the left hand top corner press :kbd:`Alt+Space`.
-   To make a window fullscreen press :kbd:`F11` and then press :kbd:`F11` again to make it not fullscreen. 

Virtual Desktop Switching
-------------------------
To switch to the next virtual desktop press :kbd:`Control +Alt + Right arrow`. To shift to the previous virtual desktop press :kbd:`Control+ Alt + Left Arrow`. To Do this with a combination of mouse wheel and keyboard :kbd:`Alt+ Mousewheel`.

Moving windows between monitors
-------------------------------
If you have extended multiple monitor setup with multiple windows you can move a window to the monitor by dragging the window through the titlebar past the edge of the monitor towards the monitor you want to move it to. Also you can say make a video take up one monitor and making the video fullscreen takes one whole monitor while you can do anything else you want with your second monitor.
