]> git.sur5r.net Git - i3/i3/blobdiff - docs/hacking-howto
Bugfix: Repeatedly try to find screens if none are available (Thanks mxf)
[i3/i3] / docs / hacking-howto
index ad8b9ab4ecc7bae8bbe0038853696d72be9929b5..22649c38b9faea189263494dc1bf11d4a7af0c84 100644 (file)
@@ -107,23 +107,41 @@ Contains forward definitions for all public functions, aswell as doxygen-compati
 comments (so if you want to get a bit more of the big picture, either browse all
 header files or use doxygen if you prefer that).
 
+src/client.c::
+Contains all functions which are specific to a certain client (make it
+fullscreen, see if its class/name matches a pattern, kill it, …).
+
 src/commands.c::
-Parsing commands
+Parsing commands and actually execute them (focussing, moving, …).
 
 src/config.c::
-Parses the configuration file
+Parses the configuration file.
 
 src/debug.c::
-Contains debugging functions to print unhandled X events
+Contains debugging functions to print unhandled X events.
+
+src/floating.c::
+Contains functions for floating mode (mostly resizing/dragging).
 
 src/handlers.c::
-Contains all handlers for all kind of X events
+Contains all handlers for all kind of X events (new window title, new hints,
+unmapping, key presses, button presses, …).
 
 src/layout.c::
-Renders your layout (screens, workspaces, containers)
+Renders your layout (screens, workspaces, containers).
 
 src/mainx.c::
-Initializes the window manager
+Initializes the window manager.
+
+src/manage.c::
+Looks at existing or new windows and decides whether to manage them. If so, it
+reparents the window and inserts it into our data structures.
+
+src/resize.c::
+Contains the functions to resize columns/rows in the table.
+
+src/resize.c::
+Contains the functions to resize columns/rows in the table.
 
 src/table.c::
 Manages the most important internal data structure, the design table.
@@ -210,7 +228,7 @@ chosen for those:
  * ``conn'' is the xcb_connection_t
  * ``event'' is the event of the particular type
  * ``container'' names a container
- * ``client'' names a client, for example when using a `CIRCLEQ_FOREACH`
+ * ``client'' names a client, for example when using a +CIRCLEQ_FOREACH+
 
 == Startup (src/mainx.c, main())
 
@@ -358,9 +376,26 @@ when rendering.
 
 === Resizing containers
 
-By clicking and dragging the border of a container, you can resize it freely.
+By clicking and dragging the border of a container, you can resize the whole column
+(respectively row) which this container is in. This is necessary to keep the table
+layout working and consistent.
+
+Currently, only vertical resizing is implemented.
+
+The resizing works similarly to the resizing of floating windows or movement of floating
+windows:
 
-TODO
+* A new, invisible window with the size of the root window is created (+grabwin+)
+* Another window, 2px width and as high as your screen (or vice versa for horizontal
+  resizing) is created. Its background color is the border color and it is only
+  there to signalize the user how big the container will be (it creates the impression
+  of dragging the border out of the container).
+* The +drag_pointer+ function of +src/floating.c+ is called to grab the pointer and
+  enter an own event loop which will pass all events (expose events) but motion notify
+  events. This function then calls the specified callback (+resize_callback+) which
+  does some boundary checking and moves the helper window. As soon as the mouse
+  button is released, this loop will be terminated.
+* The new width_factor for each involved column (respectively row) will be calculated.
 
 == User commands / commandmode (src/commands.c)
 
@@ -393,7 +428,8 @@ direction to move a window respectively or snap.
 
 == Using git / sending patches
 
-For a short introduction into using git, see TODO.
+For a short introduction into using git, see http://www.spheredev.org/wiki/Git_for_the_lazy
+or, for more documentation, see http://git-scm.com/documentation
 
 When you want to send a patch because you fixed a bug or implemented a cool feature (please
 talk to us before working on features to see whether they are maybe already implemented, not