]> git.sur5r.net Git - i3/i3/blob - include/manage.h
Merge i3bar into next
[i3/i3] / include / manage.h
1 /*
2  * vim:ts=8:expandtab
3  *
4  * i3 - an improved dynamic tiling window manager
5  *
6  * © 2009 Michael Stapelberg and contributors
7  *
8  * See file LICENSE for license information.
9  *
10  */
11
12 #include "data.h"
13
14 #ifndef _MANAGE_H
15 #define _MANAGE_H
16
17 /**
18  * Go through all existing windows (if the window manager is restarted) and
19  * manage them
20  *
21  */
22 void manage_existing_windows(xcb_window_t root);
23
24 /**
25  * Restores the geometry of each window by reparenting it to the root window
26  * at the position of its frame.
27  *
28  * This is to be called *only* before exiting/restarting i3 because of evil
29  * side-effects which are to be expected when continuing to run i3.
30  *
31  */
32 void restore_geometry();
33
34 /**
35  * Do some sanity checks and then reparent the window.
36  *
37  */
38 void manage_window(xcb_window_t window,
39                    xcb_get_window_attributes_cookie_t cookie,
40                    bool needs_to_be_mapped);
41
42 #if 0
43 /**
44  * reparent_window() gets called when a new window was opened and becomes a
45  * child of the root window, or it gets called by us when we manage the
46  * already existing windows at startup.
47  *
48  * Essentially, this is the point where we take over control.
49  *
50  */
51 void reparent_window(xcb_connection_t *conn, xcb_window_t child,
52                      xcb_visualid_t visual, xcb_window_t root, uint8_t depth,
53                      int16_t x, int16_t y, uint16_t width, uint16_t height,
54                      uint32_t border_width);
55
56 #endif
57 #endif