X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=docs%2Fhacking-howto.html;h=83267518e551588479ec3ec69f388cd7b4d1b9fc;hb=33e2f35c88b59de01d3ece1f4460e781aa99d11a;hp=afdca82a59e584601ef97d97dcea3e34dadf55f1;hpb=a51955422cfef50d617cd856bddec422cb8c3493;p=i3%2Fi3.github.io diff --git a/docs/hacking-howto.html b/docs/hacking-howto.html index afdca82..8326751 100644 --- a/docs/hacking-howto.html +++ b/docs/hacking-howto.html @@ -2,15 +2,15 @@ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> - + - + i3: Hacking i3: How To @@ -30,8 +30,8 @@ window.onload = function(){asciidoc.footnotes(); asciidoc.toc(2);} @@ -191,19 +192,12 @@ picture, either browse all header files or use doxygen if you prefer that).

-src/cfgparse.l +src/config_parser.c

-Contains the lexer for i3’s configuration file, written for flex(1). -

-
-
-src/cfgparse.y -
-
-

-Contains the parser for i3’s configuration file, written for bison(1). +Contains a custom configuration parser. See src/command_parser.c for rationale + on why we use a custom parser.

@@ -216,19 +210,13 @@ clicks initiate resizing and thus are relatively complex).

-src/cmdparse.l -
-
-

-Contains the lexer for i3 commands, written for flex(1). -

-
-
-src/cmdparse.y +src/command_parser.c

-Contains the parser for i3 commands, written for bison(1). +Contains a hand-written parser to parse commands (commands are what +you bind on keys and what you can send to i3 using the IPC interface, like +move left or workspace 4).

@@ -304,7 +292,7 @@ src/log.c

-Handles the setting of loglevels, contains the logging functions. +Contains the logging functions.

@@ -379,6 +367,15 @@ Contains the functions to resize containers.

+src/restore_layout.c +
+
+

+Everything for restored containers that is not pure state parsing (which can be +found in load_layout.c). +

+
+
src/sighandler.c
@@ -682,7 +679,7 @@ The override_redirect must not be set. Windows with override_redirect shall

-

Afterwards, i3 gets the intial geometry and reparents the window (see +

Afterwards, i3 gets the initial geometry and reparents the window (see reparent_window()) if it wasn’t already managed.

Reparenting means that for each window which is reparented, a new window, slightly larger than the original one, is created. The original window is then @@ -703,7 +700,7 @@ target workspace is not visible, the window will not be mapped.

9. What happens when an application is started?

-

i3 does not care for applications. All it notices is when new windows are +

i3 does not care about applications. All it notices is when new windows are mapped (see src/handlers.c, handle_map_request()). The window is then reparented (see section "Manage windows").

After reparenting the window, render_tree() is called which renders the @@ -875,7 +872,7 @@ position/size is different: They are placed next to each other on a single line

14.3.4. Dock area layout

-

This is a special case. Users cannot chose the dock area layout, but it will be +

This is a special case. Users cannot choose the dock area layout, but it will be set for the dock area containers. In the dockarea layout (at the moment!), windows will be placed above each other.

@@ -1485,30 +1482,33 @@ Forgetting to call floating_fix_coordinates(con, old_rect, new_rect) af

20. Using git / sending patches

+
+

20.1. Introduction

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 possible for some some reason, or don’t fit -into the concept), please use git to create a patchfile.

-

First of all, update your working copy to the latest version of the master -branch:

-
-
-
git pull
-
-

Afterwards, make the necessary changes for your bugfix/feature. Then, review -the changes using git diff (you might want to enable colors in the diff using -git config diff.color auto). When you are definitely done, use git commit --a to commit all changes you’ve made.

-

Then, use the following command to generate a patchfile which we can directly -apply to the branch, preserving your commit message and name:

-
-
-
git format-patch origin
-
-

Just send us the generated file via email.

+http://web.archive.org/web/20121024222556/http://www.spheredev.org/wiki/Git_for_the_lazy +or, for more documentation, see http://git-scm.com/documentation

+

Please talk to us before working on new features to see whether they will be +accepted. There are a few things which we don’t want to see in i3, e.g. a +command which will focus windows in an alt+tab like way.

+

When working on bugfixes, please make sure you mention that you are working on +it in the corresponding bugreport at https://github.com/i3/i3/issues In case +there is no bugreport yet, please create one.

+

After you are done, please submit your work for review at https://github.com/i3/i3

+

Do not send emails to the mailing list or any author directly, and don’t submit +them in the bugtracker, since all reviews should be done in public at +http://cr.i3wm.org/. In order to make your review go as fast as possible, you +could have a look at previous reviews and see what the common mistakes are.

+
+
+

20.2. Which branch to use?

+

Work on i3 generally happens in two branches: “master” and “next”. Since +“master” is what people get when they check out the git repository, its +contents are always stable. That is, it contains the source code of the latest +release, plus any bugfixes that were applied since that release.

+

New features are only found in the “next” branch. Therefore, if you are working +on a new feature, use the “next” branch. If you are working on a bugfix, use +the “next” branch, too, but make sure your code also works on “master”.

+