]> git.sur5r.net Git - i3/i3.github.io/blobdiff - docs/hacking-howto.html
add the 4.8 release
[i3/i3.github.io] / docs / hacking-howto.html
index ad5900eed09c34c0906a8f228213ac0515747f6e..755c732dfa984acabec8eae5a1bdc2e20cd8f846 100644 (file)
@@ -4,13 +4,13 @@
 <head>\r
 <link rel="icon" type="image/png" href="/favicon.png">\r
 <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />\r
-<meta name="generator" content="AsciiDoc 8.6.7" />\r
+<meta name="generator" content="AsciiDoc 8.6.9" />\r
 <title>i3: Hacking i3: How To</title>\r
 <link rel="stylesheet" href="/css/style.css" type="text/css" />\r
 <link rel="stylesheet" href="/css/xhtml11.css" type="text/css" />\r
 <script type="text/javascript">\r
 /*<![CDATA[*/\r
-window.onload = function(){asciidoc.footnotes(); asciidoc.toc(2);}\r
+document.addEventListener("DOMContentLoaded", function(){asciidoc.footnotes(); asciidoc.toc(2);}, false);\r
 /*]]>*/\r
 </script>\r
 <script type="text/javascript" src="/js/asciidoc-xhtml11.js"></script>\r
@@ -78,7 +78,8 @@ When new windows are created, manage them
 </li>\r
 <li>\r
 <p>\r
-Handle the client’s <tt>_WM_STATE</tt> property, but only the <tt>_WM_STATE_FULLSCREEN</tt>\r
+Handle the client’s <tt>_WM_STATE</tt> property, but only <tt>_WM_STATE_FULLSCREEN</tt> and\r
+  <tt>_NET_WM_STATE_DEMANDS_ATTENTION</tt>\r
 </p>\r
 </li>\r
 <li>\r
@@ -133,7 +134,7 @@ moving/resizing windows while you usually want to get some work done. After
 all, most users sooner or later tend to lay out their windows in a way which\r
 corresponds to tiling or stacking mode in i3. Therefore, why not let i3 do this\r
 for you? Certainly, it’s faster than you could ever do it.</p></div>\r
-<div class="paragraph"><p>The problem with most tiling window managers is that they are too unflexible.\r
+<div class="paragraph"><p>The problem with most tiling window managers is that they are too inflexible.\r
 In my opinion, a window manager is just another tool, and similar to vim which\r
 can edit all kinds of text files (like source code, HTML, …) and is not limited\r
 to a specific file type, a window manager should not limit itself to a certain\r
@@ -191,19 +192,12 @@ picture, either browse all header files or use doxygen if you prefer that).
 </p>\r
 </dd>\r
 <dt class="hdlist1">\r
-src/cfgparse.l\r
+src/config_parser.c\r
 </dt>\r
 <dd>\r
 <p>\r
-Contains the lexer for i3’s configuration file, written for <tt>flex(1)</tt>.\r
-</p>\r
-</dd>\r
-<dt class="hdlist1">\r
-src/cfgparse.y\r
-</dt>\r
-<dd>\r
-<p>\r
-Contains the parser for i3’s configuration file, written for <tt>bison(1)</tt>.\r
+Contains a custom configuration parser. See src/command_parser.c for rationale\r
+ on why we use a custom parser.\r
 </p>\r
 </dd>\r
 <dt class="hdlist1">\r
@@ -216,19 +210,13 @@ clicks initiate resizing and thus are relatively complex).
 </p>\r
 </dd>\r
 <dt class="hdlist1">\r
-src/cmdparse.l\r
-</dt>\r
-<dd>\r
-<p>\r
-Contains the lexer for i3 commands, written for <tt>flex(1)</tt>.\r
-</p>\r
-</dd>\r
-<dt class="hdlist1">\r
-src/cmdparse.y\r
+src/command_parser.c\r
 </dt>\r
 <dd>\r
 <p>\r
-Contains the parser for i3 commands, written for <tt>bison(1)</tt>.\r
+Contains a hand-written parser to parse commands (commands are what\r
+you bind on keys and what you can send to i3 using the IPC interface, like\r
+<em>move left</em> or <em>workspace 4</em>).\r
 </p>\r
 </dd>\r
 <dt class="hdlist1">\r
@@ -379,6 +367,15 @@ Contains the functions to resize containers.
 </p>\r
 </dd>\r
 <dt class="hdlist1">\r
+src/restore_layout.c\r
+</dt>\r
+<dd>\r
+<p>\r
+Everything for restored containers that is not pure state parsing (which can be\r
+found in load_layout.c).\r
+</p>\r
+</dd>\r
+<dt class="hdlist1">\r
 src/sighandler.c\r
 </dt>\r
 <dd>\r
@@ -682,7 +679,7 @@ The override_redirect must not be set. Windows with override_redirect shall
 </p>\r
 </li>\r
 </ul></div>\r
-<div class="paragraph"><p>Afterwards, i3 gets the intial geometry and reparents the window (see\r
+<div class="paragraph"><p>Afterwards, i3 gets the initial geometry and reparents the window (see\r
 <tt>reparent_window()</tt>) if it wasn’t already managed.</p></div>\r
 <div class="paragraph"><p>Reparenting means that for each window which is reparented, a new window,\r
 slightly larger than the original one, is created. The original window is then\r
@@ -703,7 +700,7 @@ target workspace is not visible, the window will not be mapped.</p></div>
 <div class="sect1">\r
 <h2 id="_what_happens_when_an_application_is_started">9. What happens when an application is started?</h2>\r
 <div class="sectionbody">\r
-<div class="paragraph"><p>i3 does not care for applications. All it notices is when new windows are\r
+<div class="paragraph"><p>i3 does not care about applications. All it notices is when new windows are\r
 mapped (see <tt>src/handlers.c</tt>, <tt>handle_map_request()</tt>). The window is then\r
 reparented (see section "Manage windows").</p></div>\r
 <div class="paragraph"><p>After reparenting the window, <tt>render_tree()</tt> is called which renders the\r
@@ -875,7 +872,7 @@ position/size is different: They are placed next to each other on a single line
 </div>\r
 <div class="sect3">\r
 <h4 id="_dock_area_layout">14.3.4. Dock area layout</h4>\r
-<div class="paragraph"><p>This is a special case. Users cannot chose the dock area layout, but it will be\r
+<div class="paragraph"><p>This is a special case. Users cannot choose the dock area layout, but it will be\r
 set for the dock area containers. In the dockarea layout (at the moment!),\r
 windows will be placed above each other.</p></div>\r
 </div>\r
@@ -1485,9 +1482,11 @@ Forgetting to call <tt>floating_fix_coordinates(con, old_rect, new_rect)</tt> af
 <div class="sect1">\r
 <h2 id="_using_git_sending_patches">20. Using git / sending patches</h2>\r
 <div class="sectionbody">\r
+<div class="sect2">\r
+<h3 id="_introduction">20.1. Introduction</h3>\r
 <div class="paragraph"><p>For a short introduction into using git, see\r
-<a href="http://www.spheredev.org/wiki/Git_for_the_lazy">http://www.spheredev.org/wiki/Git_for_the_lazy</a> or, for more documentation, see\r
-<a href="http://git-scm.com/documentation">http://git-scm.com/documentation</a></p></div>\r
+<a href="http://web.archive.org/web/20121024222556/http://www.spheredev.org/wiki/Git_for_the_lazy">http://web.archive.org/web/20121024222556/http://www.spheredev.org/wiki/Git_for_the_lazy</a>\r
+or, for more documentation, see <a href="http://git-scm.com/documentation">http://git-scm.com/documentation</a></p></div>\r
 <div class="paragraph"><p>Please talk to us before working on new features to see whether they will be\r
 accepted. There are a few things which we don’t want to see in i3, e.g. a\r
 command which will focus windows in an alt+tab like way.</p></div>\r
@@ -1500,6 +1499,17 @@ them in the bugtracker, since all reviews should be done in public at
 <a href="http://cr.i3wm.org/">http://cr.i3wm.org/</a>. In order to make your review go as fast as possible, you\r
 could have a look at previous reviews and see what the common mistakes are.</p></div>\r
 </div>\r
+<div class="sect2">\r
+<h3 id="_which_branch_to_use">20.2. Which branch to use?</h3>\r
+<div class="paragraph"><p>Work on i3 generally happens in two branches: “master” and “next”. Since\r
+“master” is what people get when they check out the git repository, its\r
+contents are always stable. That is, it contains the source code of the latest\r
+release, plus any bugfixes that were applied since that release.</p></div>\r
+<div class="paragraph"><p>New features are only found in the “next” branch. Therefore, if you are working\r
+on a new feature, use the “next” branch. If you are working on a bugfix, use\r
+the “next” branch, too, but make sure your code also works on “master”.</p></div>\r
+</div>\r
+</div>\r
 </div>\r
 <div class="sect1">\r
 <h2 id="_thought_experiments">21. Thought experiments</h2>\r