i3
Defines | Functions
src/manage.c File Reference
#include "all.h"
Include dependency graph for manage.c:

Go to the source code of this file.

Defines

#define FREE_GEOMETRY()
#define GET_PROPERTY(atom, len)   xcb_get_property(conn, false, window, atom, XCB_GET_PROPERTY_TYPE_ANY, 0, len)

Functions

void manage_existing_windows (xcb_window_t root)
 Go through all existing windows (if the window manager is restarted) and manage them.
void restore_geometry ()
 Restores the geometry of each window by reparenting it to the root window at the position of its frame.
void manage_window (xcb_window_t window, xcb_get_window_attributes_cookie_t cookie, bool needs_to_be_mapped)
 Do some sanity checks and then reparent the window.

Define Documentation

#define FREE_GEOMETRY ( )
Value:
do { \
    if ((geom = xcb_get_geometry_reply(conn, geomc, 0)) != NULL) \
        free(geom); \
} while (0)

Referenced by manage_window().

#define GET_PROPERTY (   atom,
  len 
)    xcb_get_property(conn, false, window, atom, XCB_GET_PROPERTY_TYPE_ANY, 0, len)

Referenced by manage_window().


Function Documentation

void manage_existing_windows ( xcb_window_t  root)

Go through all existing windows (if the window manager is restarted) and manage them.

Definition at line 18 of file manage.c.

References conn, manage_window(), and smalloc().

Referenced by main().

Here is the call graph for this function:

void manage_window ( xcb_window_t  window,
xcb_get_window_attributes_cookie_t  cookie,
bool  needs_to_be_mapped 
)
void restore_geometry ( )

Restores the geometry of each window by reparenting it to the root window at the position of its frame.

This is to be called *only* before exiting/restarting i3 because of evil side-effects which are to be expected when continuing to run i3.

Definition at line 52 of file manage.c.

References all_cons, Con::border_width, conn, DLOG, Rect::height, Window::id, Con::rect, root, TAILQ_FOREACH, Rect::width, Con::window, Con::window_rect, Rect::x, xcb_set_window_rect(), and Rect::y.

Referenced by i3_restart().

Here is the call graph for this function: