]> git.sur5r.net Git - i3/i3/log
i3/i3
11 years agoMerge branch 'master' into next
Michael Stapelberg [Wed, 5 Sep 2012 15:09:43 +0000 (17:09 +0200)]
Merge branch 'master' into next

11 years agoMerge branch 'fix-nagbar-exit'
Michael Stapelberg [Wed, 5 Sep 2012 15:09:40 +0000 (17:09 +0200)]
Merge branch 'fix-nagbar-exit'

11 years agoBugfix: Use _exit() instead of exit to avoid calling atexit functions (Thanks f8l)
Michael Stapelberg [Wed, 5 Sep 2012 15:09:23 +0000 (17:09 +0200)]
Bugfix: Use _exit() instead of exit to avoid calling atexit functions (Thanks f8l)

Basically, this is the same fix as commit 914ca6cf :-/. Once again, we
called exit() instead of _exit(), but this time it lead to a kill(0,
SIGTERM), effectively killing all processes in the i3 process group,
including i3 itself. The cause for the kill(0) is that nagbar_pid is set
to 0 by fork(), signaling we’re in the child process. The cleanup
handler only checks for nagbar_pid being -1 as a special value, however.

11 years agocon_set_layout: always use the parent container, handle workspaces properly
Michael Stapelberg [Tue, 4 Sep 2012 22:22:38 +0000 (00:22 +0200)]
con_set_layout: always use the parent container, handle workspaces properly

Previously, in case 'layout stacked' (for example) had been called
interactively, con_set_layout would be called with focused->parent,
while with for_window, it’d be called on the actual matching container.

This difference in behavior was the cause for the inability to use
'for_window [class="XTerm"] layout tabbed', which now works \o/, but
more on that below.

The change also allows us to handle the case of the user selecting a
CT_WORKSPACE container properly, that is, by using the special case and
creating a new split container on the workspace which gets all the
contents, but a new layout.

Now, before you are enthusiastic about the change and try to use
for_window magic in your config file, keep in mind: The 'layout' command
acts on the parent split container. That is, when using a line such as
this one:

    for_window [class="XTerm"] layout tabbed

…and opening an XTerm when on a workspace with one single other window,
the whole workspace will be set tabbed (just as previously when you
opened an XTerm and sent 'layout tabbed' manually).

Therefore, to open XTerm in its own tabbed split container, you need to
split before:

    for_window [class="XTerm"] split v, layout tabbed

The comma here is important! It says that the second command should not
be treated as an entirely unrelated command, but it should also relate
the matching window (while it does work with a ';', that is prone to
race-conditions and should be avoided).

fixes #358

11 years agoMerge branch 'master' into next
Michael Stapelberg [Tue, 4 Sep 2012 20:49:16 +0000 (22:49 +0200)]
Merge branch 'master' into next

11 years agoMerge branch 'fix-1px-flickering'
Michael Stapelberg [Tue, 4 Sep 2012 20:49:12 +0000 (22:49 +0200)]
Merge branch 'fix-1px-flickering'

11 years agoBugfix: fix flickering with 1pixel border tabbed layouts (Thanks julien)
Michael Stapelberg [Tue, 4 Sep 2012 20:47:12 +0000 (22:47 +0200)]
Bugfix: fix flickering with 1pixel border tabbed layouts (Thanks julien)

When you have a tabbed container which has had more than one container
but currently has precisely one container, there was a bit of flickering
when switching workspaces occasionally. This commit fixes it by properly
setting the height of the deco_rect (and thus the X11 window) to not
make the old window contents show up for a minimum period of time.

fixes #777

11 years agotests: introduce is_num_children test
Michael Stapelberg [Tue, 4 Sep 2012 20:24:13 +0000 (22:24 +0200)]
tests: introduce is_num_children test

This makes it clearer what the tests are actually doing and kills quite
a bit of useless repetitions

11 years agoMerge branch 'master' into next
Michael Stapelberg [Tue, 4 Sep 2012 18:21:31 +0000 (20:21 +0200)]
Merge branch 'master' into next

11 years agoMerge branch 'fix-fullscreen-confreq'
Michael Stapelberg [Tue, 4 Sep 2012 18:21:22 +0000 (20:21 +0200)]
Merge branch 'fix-fullscreen-confreq'

11 years agoBugfix: Don’t allow ConfigureRequests while in fullscreen (Thanks Piotr)
Michael Stapelberg [Tue, 4 Sep 2012 18:21:07 +0000 (20:21 +0200)]
Bugfix: Don’t allow ConfigureRequests while in fullscreen (Thanks Piotr)

This fixes a compatibility issue with gnome-terminal and xfce’s
terminal, where fullscreening would lead to moving the window and not
displaying the contents properly.

fixes #788

11 years agox: grab server and process pending events before managing existing windows
Michael Stapelberg [Mon, 3 Sep 2012 20:33:35 +0000 (22:33 +0200)]
x: grab server and process pending events before managing existing windows

fixes #782

11 years agoremove xcb-proto from DEPENDS, it’s only a build-time dep of libxcb (Thanks okraits)
Michael Stapelberg [Tue, 4 Sep 2012 14:53:06 +0000 (16:53 +0200)]
remove xcb-proto from DEPENDS, it’s only a build-time dep of libxcb (Thanks okraits)

11 years agofix compilation with older xcb-util with -DXCB_COMPAT (Thanks okraits)
Michael Stapelberg [Mon, 3 Sep 2012 12:55:27 +0000 (14:55 +0200)]
fix compilation with older xcb-util with -DXCB_COMPAT (Thanks okraits)

11 years agobugfix: memleak: use i3STRING_FREE() instead of FREE()
Michael Stapelberg [Sun, 2 Sep 2012 22:41:51 +0000 (00:41 +0200)]
bugfix: memleak: use i3STRING_FREE() instead of FREE()

11 years agoBugfix: memleak: because we use i3string_from_utf8(), we need to free buffer()
Michael Stapelberg [Sun, 2 Sep 2012 22:41:15 +0000 (00:41 +0200)]
Bugfix: memleak: because we use i3string_from_utf8(), we need to free buffer()

Previously, buffer was directly used and thus not freed, but
i3string_from_utf8() makes a copy.

11 years agotestcases: add ExtUtils::PkgConfig as explicit dependency
Michael Stapelberg [Thu, 30 Aug 2012 22:17:06 +0000 (00:17 +0200)]
testcases: add ExtUtils::PkgConfig as explicit dependency

This used to be a transitive dependency through X11::XCB, but the latter
dropped it in version 0.04.

11 years agoMake the initial mention of 'split h/v' a little easier to understand.
Cian [Thu, 30 Aug 2012 20:12:22 +0000 (21:12 +0100)]
Make the initial mention of 'split h/v' a little easier to understand.

11 years agoaccept slashes in RandR output names (+test) (Thanks dbp)
Michael Stapelberg [Tue, 28 Aug 2012 11:26:12 +0000 (13:26 +0200)]
accept slashes in RandR output names (+test) (Thanks dbp)

fixes #785

11 years agoi3-input: Fix text drawing offset
Quentin Glidic [Tue, 28 Aug 2012 09:44:09 +0000 (11:44 +0200)]
i3-input: Fix text drawing offset

11 years agoi3-input: Do not use a non-loaded font
Quentin Glidic [Sat, 25 Aug 2012 21:44:13 +0000 (23:44 +0200)]
i3-input: Do not use a non-loaded font

We must call load_font before any font-related calls like
predict_text_width

11 years agomanpage: update force-xinerama nvidia hint
Michael Stapelberg [Mon, 27 Aug 2012 13:25:22 +0000 (15:25 +0200)]
manpage: update force-xinerama nvidia hint

11 years agomanpage: describe keybindings to open a terminal/dmenu (Thanks Joost)
Michael Stapelberg [Mon, 27 Aug 2012 13:22:19 +0000 (15:22 +0200)]
manpage: describe keybindings to open a terminal/dmenu (Thanks Joost)

11 years agomanpage: improve locale setup in example .xsession (Thanks Harald König)
Michael Stapelberg [Mon, 27 Aug 2012 13:07:18 +0000 (15:07 +0200)]
manpage: improve locale setup in example .xsession (Thanks Harald König)

Harald mentioned he was surprised about the locales we recommend in the
.xsession example, so I’ve re-investigated.

Here is the test program I have used:

    #include <stdio.h>
    #include <locale.h>

    int main() {
        /* SUSv2 setlocale(3) says:
         * Internationalised programs must call setlocale() to initiate
         * a specific language operation. This can be done by calling
         * setlocale() as follows: */
        setlocale(LC_ALL, "");

        printf("LC_NUMERIC is %s\n", setlocale(LC_NUMERIC, NULL));
    }

Then, I have unset LANG and LC_*:

    midna /tmp $ env | grep LANG
    midna /tmp $ env | grep LC
    midna /tmp $

Now, observe that LC_ALL overwrites all specific LC variables:

    midna /tmp $ LC_ALL=de_DE.UTF-8 LC_NUMERIC=en_DK.UTF-8 ./localetest
    LC_NUMERIC is de_DE.UTF-8

However, LANG does not:

    midna /tmp $ LANG=de_DE.UTF-8 ./localetest
    LC_NUMERIC is de_DE.UTF-8
    midna /tmp $ LANG=de_DE.UTF-8 LC_NUMERIC=en_DK.UTF-8 ./localetest
    LC_NUMERIC is en_DK.UTF-8

This is consistent with what perldoc perllocale says:
http://perldoc.perl.org/perllocale.html#ENVIRONMENT

11 years agodocs/testsuite: mention why using a separate language is great
Michael Stapelberg [Thu, 23 Aug 2012 18:27:08 +0000 (20:27 +0200)]
docs/testsuite: mention why using a separate language is great

11 years agoUse (void) instead of () for functions without args
eeemsi [Thu, 23 Aug 2012 10:55:28 +0000 (12:55 +0200)]
Use (void) instead of () for functions without args

11 years agoRemove dead code in cmd_workspace_number
Sebastian Ullrich [Wed, 22 Aug 2012 15:49:23 +0000 (17:49 +0200)]
Remove dead code in cmd_workspace_number

If a ws doesn't exist, maybe_back_and_forth
will never return true for it.

11 years agotestcase for the previous commit
Michael Stapelberg [Wed, 22 Aug 2012 15:57:58 +0000 (17:57 +0200)]
testcase for the previous commit

11 years agoFix 'back and forth' in 'workspace number' for named ws
Sebastian Ullrich [Wed, 22 Aug 2012 15:49:22 +0000 (17:49 +0200)]
Fix 'back and forth' in 'workspace number' for named ws

11 years agotestsuite: add hint about missing DUMMY Xorg module
Michael Stapelberg [Wed, 22 Aug 2012 15:22:20 +0000 (17:22 +0200)]
testsuite: add hint about missing DUMMY Xorg module

11 years agotestcase for the previous commit
Michael Stapelberg [Wed, 22 Aug 2012 15:16:18 +0000 (17:16 +0200)]
testcase for the previous commit

11 years agoCreate ws in "move workspace number n" if not existing
Sebastian Ullrich [Mon, 20 Aug 2012 10:36:10 +0000 (12:36 +0200)]
Create ws in "move workspace number n" if not existing

fixes #729

11 years agoMerge branch 'master' into next
Michael Stapelberg [Wed, 22 Aug 2012 14:02:02 +0000 (16:02 +0200)]
Merge branch 'master' into next

11 years agoMerge branch 'floating-resize-height'
Michael Stapelberg [Wed, 22 Aug 2012 14:01:57 +0000 (16:01 +0200)]
Merge branch 'floating-resize-height'

11 years agofix resizing floating windows by height
Joel Stemmer [Sat, 18 Aug 2012 13:25:00 +0000 (15:25 +0200)]
fix resizing floating windows by height

When resizing floating windows, changing the height was not correctly
handled. This commit fixes that and adds testcases for shrinking and
growing the width and height of floating windows.

11 years agocomplete-run: check whether Xdummy dies, add a flag to keep the Xdummy output
Michael Stapelberg [Sat, 18 Aug 2012 14:27:00 +0000 (16:27 +0200)]
complete-run: check whether Xdummy dies, add a flag to keep the Xdummy output

11 years agoupdate DEPENDS, prepare RELEASE-NOTES for 4.3
Michael Stapelberg [Sat, 18 Aug 2012 13:33:36 +0000 (15:33 +0200)]
update DEPENDS, prepare RELEASE-NOTES for 4.3

11 years agoBugfix: don’t change tabbed/stacked cons to splitv/splith layout (Thanks Merovius)
Michael Stapelberg [Thu, 16 Aug 2012 23:53:45 +0000 (01:53 +0200)]
Bugfix: don’t change tabbed/stacked cons to splitv/splith layout (Thanks Merovius)

To automagically do the right thing when rotating monitors with regards
to splith/splitv layout (depending on width/height of the monitor), we
change the orientation of existing workspaces and the first child.

If that first child happens to be a stacked/tabbed con, we cannot change
the layout unconditionally (previously, the orientation was not in the
layout, so we never noticed this problem).

fixes #768

11 years agodebian: make 'i3' recommend dunst
Michael Stapelberg [Mon, 13 Aug 2012 11:44:54 +0000 (13:44 +0200)]
debian: make 'i3' recommend dunst

11 years agodebian/control: format build-depends nicely, add pango/cairo
Michael Stapelberg [Mon, 13 Aug 2012 11:44:36 +0000 (13:44 +0200)]
debian/control: format build-depends nicely, add pango/cairo

11 years agopango: divide by PANGO_SCALE to get a "normal" font size
Michael Stapelberg [Mon, 13 Aug 2012 11:39:58 +0000 (13:39 +0200)]
pango: divide by PANGO_SCALE to get a "normal" font size

11 years agoi3 --moreversion: use readlink /proc/$pid/exe instead of realpath(argv[0])
Michael Stapelberg [Mon, 13 Aug 2012 11:38:04 +0000 (13:38 +0200)]
i3 --moreversion: use readlink /proc/$pid/exe instead of realpath(argv[0])

The latter is actually wrong. For example, when running i3
--moreversion, it will print $(pwd)/i3 instead of $(which i3). In my
previous tests, this coincidentally was the same.

11 years agodefault config: include a short explanation about xft fonts
Michael Stapelberg [Mon, 13 Aug 2012 11:34:30 +0000 (13:34 +0200)]
default config: include a short explanation about xft fonts

11 years agologging: make libi3 use verboselog()/errorlog(), provide it in each caller
Michael Stapelberg [Mon, 13 Aug 2012 11:27:00 +0000 (13:27 +0200)]
logging: make libi3 use verboselog()/errorlog(), provide it in each caller

While this is a bit ugly, it makes the log messages end up where they
are supposed to: in the shmlog/stdout in case of i3 and on stdout in
case of utilities such as i3-input

11 years agouserguide: Update Fonts section for Pango support
Quentin Glidic [Sun, 12 Aug 2012 10:37:39 +0000 (12:37 +0200)]
userguide: Update Fonts section for Pango support

11 years agolibi3/font: Log the used font
Quentin Glidic [Sun, 12 Aug 2012 10:20:51 +0000 (12:20 +0200)]
libi3/font: Log the used font

11 years agolibi3: Introduce LOG
Quentin Glidic [Sun, 12 Aug 2012 10:20:15 +0000 (12:20 +0200)]
libi3: Introduce LOG

11 years agolibi3: Implement Pango rendering
Fernando Tarlá Cardoso Lemos [Sun, 5 Aug 2012 19:36:49 +0000 (21:36 +0200)]
libi3: Implement Pango rendering

11 years agocommon.mk: Check for Pango
Quentin Glidic [Sun, 5 Aug 2012 18:54:30 +0000 (20:54 +0200)]
common.mk: Check for Pango

11 years agolibi3: Rework font to support multiple backends
Fernando Tarlá Cardoso Lemos [Mon, 14 Nov 2011 23:39:03 +0000 (21:39 -0200)]
libi3: Rework font to support multiple backends

11 years agoi3bar: Rename xcb_screen to root_screen for consistency
Fernando Tarlá Cardoso Lemos [Mon, 14 Nov 2011 23:39:03 +0000 (21:39 -0200)]
i3bar: Rename xcb_screen to root_screen for consistency

11 years agolibi3: Introduce get_visualtype
Fernando Tarlá Cardoso Lemos [Mon, 14 Nov 2011 23:39:03 +0000 (21:39 -0200)]
libi3: Introduce get_visualtype

11 years agolibi3: Rework predict_text_width
Quentin Glidic [Tue, 7 Aug 2012 20:30:37 +0000 (22:30 +0200)]
libi3: Rework predict_text_width

predict_text_width now takes an i3String as argument

11 years agolibi3: Rework draw_text
Quentin Glidic [Tue, 7 Aug 2012 18:28:39 +0000 (20:28 +0200)]
libi3: Rework draw_text

We now have two versions of draw_text
draw_text: Now takes an i3String
draw_text_ascii: Designed for static strings in plain ASCII

11 years agoi3-input: Store and use xcb_char2b_t directly
Quentin Glidic [Wed, 8 Aug 2012 13:08:05 +0000 (15:08 +0200)]
i3-input: Store and use xcb_char2b_t directly

11 years agoi3-input: Port prompt to i3String
Quentin Glidic [Tue, 7 Aug 2012 20:10:30 +0000 (22:10 +0200)]
i3-input: Port prompt to i3String

11 years agoi3/sighandler: Pre-compute i3Strings for text
Quentin Glidic [Tue, 7 Aug 2012 20:30:37 +0000 (22:30 +0200)]
i3/sighandler: Pre-compute i3Strings for text

11 years agoi3/window: Port window names to i3String
Quentin Glidic [Tue, 7 Aug 2012 19:23:06 +0000 (21:23 +0200)]
i3/window: Port window names to i3String

11 years agoi3/log.h: Prepare for libi3.h inclusion
Quentin Glidic [Fri, 10 Aug 2012 13:39:50 +0000 (15:39 +0200)]
i3/log.h: Prepare for libi3.h inclusion

11 years agoi3-nagbar: Port to i3String
Quentin Glidic [Tue, 7 Aug 2012 17:58:55 +0000 (19:58 +0200)]
i3-nagbar: Port to i3String

11 years agoi3bar: Port to i3String
Quentin Glidic [Tue, 7 Aug 2012 17:46:23 +0000 (19:46 +0200)]
i3bar: Port to i3String

11 years agoi3bar/util.h: Prepare for libi3.h inclusion
Quentin Glidic [Fri, 10 Aug 2012 13:39:50 +0000 (15:39 +0200)]
i3bar/util.h: Prepare for libi3.h inclusion

11 years agolibi3: Implement i3String
Fernando Tarlá Cardoso Lemos [Sun, 5 Aug 2012 21:01:50 +0000 (23:01 +0200)]
libi3: Implement i3String

New type designed to handle UCS-2/UTF-8 conversion nicely

11 years agoMakefile: Always link libi3 first
Quentin Glidic [Sat, 11 Aug 2012 22:59:19 +0000 (00:59 +0200)]
Makefile: Always link libi3 first

11 years agoimplement error messages when moving to another ws fails (Thanks eeemsi)
Michael Stapelberg [Sun, 12 Aug 2012 23:57:39 +0000 (01:57 +0200)]
implement error messages when moving to another ws fails (Thanks eeemsi)

fixes #769

11 years agoremove obsolete branch reference "(tree)" from starting line
Michael Stapelberg [Sun, 12 Aug 2012 23:57:23 +0000 (01:57 +0200)]
remove obsolete branch reference "(tree)" from starting line

11 years agoshm-logging: implement i3-dump-log -f (follow)
Michael Stapelberg [Sun, 12 Aug 2012 22:57:57 +0000 (00:57 +0200)]
shm-logging: implement i3-dump-log -f (follow)

This changes the SHM log format, it doesn’t use 0-bytes to separate
entries anymore. Instead of using lots of printf() calls in i3-dump-log,
we now do precisely one big write().

So, to be clear: i3-dump-log and i3 both need to be upgraded.
Mismatching versions will lead to garbage output (no crashes of i3, just
garbage output).

The -f flag uses an inter-process pthread_cond_t in the shared memory
header to broadcast the arrival of new messages to all i3-dump-log
processes. This internally uses futexes and thus doesn’t even mean a
kernel call in most cases. inter-process pthread_cond_ts require NPTL
(the Native Posix Thread Library, introduce in Linux 2.6).

11 years agoi3bar: update manpage for the i3bar-protocol
Michael Stapelberg [Sun, 12 Aug 2012 17:25:48 +0000 (19:25 +0200)]
i3bar: update manpage for the i3bar-protocol

fixes #739

11 years agoi3bar-protocol: add example (illustration-only!) shell script, clarify {"version...
Michael Stapelberg [Sun, 12 Aug 2012 16:47:24 +0000 (18:47 +0200)]
i3bar-protocol: add example (illustration-only!) shell script, clarify {"version":1} header

11 years agoi3bar: be less strict about the {"version":1} JSON header
Michael Stapelberg [Sun, 12 Aug 2012 16:40:15 +0000 (18:40 +0200)]
i3bar: be less strict about the {"version":1} JSON header

11 years agouse errx() instead of err() for custom error message
Michael Stapelberg [Sun, 12 Aug 2012 16:34:03 +0000 (18:34 +0200)]
use errx() instead of err() for custom error message

11 years agoBugfix: only honor _NET_ACTIVE_WINDOW for visible windows (+test) (Thanks Tucos)
Michael Stapelberg [Sun, 12 Aug 2012 14:08:31 +0000 (16:08 +0200)]
Bugfix: only honor _NET_ACTIVE_WINDOW for visible windows (+test) (Thanks Tucos)

fixes #774

11 years agoImplement i3 --moreversion
Michael Stapelberg [Sun, 12 Aug 2012 13:10:13 +0000 (15:10 +0200)]
Implement i3 --moreversion

From the code:

    Connects to i3 to find out the currently running version. Useful since it
    might be different from the version compiled into this binary (maybe the
    user didn’t correctly install i3 or forgot te restart it).

Here is an example output:

    $ ./i3 --moreversion
    Binary i3 version:  4.2-202-gb8e782c (2012-08-12, branch "next") © 2009-2012 Michael Stapelberg and contributors
    Running i3 version: 4.2-202-gb8e782c (2012-08-12, branch "next") (pid 14804)

    The i3 binary you just called: /home/michael/i3/i3
    RUNNING BINARY DIFFERENT FROM BINARY ON DISK!
    The i3 binary you are running: /home/michael/i3/i3

    $ i3 restart
    2012-08-12 15:05:28 - Additional arguments passed. Sending them as a command to i3.
    IPC: received EOF instead of reply

    $ ./i3 --moreversion
    Binary i3 version:  4.2-202-gb8e782c (2012-08-12, branch "next") © 2009-2012 Michael Stapelberg and contributors
    Running i3 version: 4.2-202-gb8e782c (2012-08-12, branch "next") (pid 14804)

    The i3 binary you just called: /home/michael/i3/i3
    The i3 binary you are running: /home/michael/i3/i3

11 years agoroot_atom_contents: handle CARDINAL atoms such as I3_PID
Michael Stapelberg [Sun, 12 Aug 2012 12:10:48 +0000 (14:10 +0200)]
root_atom_contents: handle CARDINAL atoms such as I3_PID

11 years agoset I3_PID atom on the root window
Michael Stapelberg [Sun, 12 Aug 2012 11:51:47 +0000 (13:51 +0200)]
set I3_PID atom on the root window

11 years agocomplete-run: handle bailouts
Michael Stapelberg [Sun, 12 Aug 2012 11:46:54 +0000 (13:46 +0200)]
complete-run: handle bailouts

11 years agouse I3__FILE__ for DLOG, leave __FILE__ as is
Michael Stapelberg [Sun, 12 Aug 2012 10:18:43 +0000 (12:18 +0200)]
use I3__FILE__ for DLOG, leave __FILE__ as is

See also commit 0e752070ac2bed02d0858bbc450ddcee36e3b9b5, which broke
source code listings in gdb unless you cd into i3/src. This should give
us best of both :-).

11 years agoadd testcase for previous bugfix (floating window size)
Michael Stapelberg [Sat, 11 Aug 2012 22:36:44 +0000 (00:36 +0200)]
add testcase for previous bugfix (floating window size)

11 years agoBugfix: Properly resize transient floating windows with a decoration
Philipp Middendorf [Thu, 9 Aug 2012 10:32:35 +0000 (12:32 +0200)]
Bugfix: Properly resize transient floating windows with a decoration

fixes #770

11 years agotestworker: handle EAGAIN
Michael Stapelberg [Sat, 11 Aug 2012 22:22:17 +0000 (00:22 +0200)]
testworker: handle EAGAIN

Hopefully this fixes the case where a testworker would die and leave the
whole testsuite run hanging in the air, never completing.

11 years agocomplete-run: enable autoflush (useful for debugging)
Michael Stapelberg [Sat, 11 Aug 2012 22:20:52 +0000 (00:20 +0200)]
complete-run: enable autoflush (useful for debugging)

I used the following command to find hanging workers:

    sort latest/complete-run.log|cut -f 2 -d ' '|uniq -c|grep -v '^[ \t]*2'

11 years agotypo: s/transiert/transient/
Michael Stapelberg [Sat, 11 Aug 2012 20:53:40 +0000 (22:53 +0200)]
typo: s/transiert/transient/

11 years agoclean up zero-byte logfile on immediate exit
Julius Plenz [Fri, 10 Aug 2012 23:50:37 +0000 (01:50 +0200)]
clean up zero-byte logfile on immediate exit

Otherwise, a zero-byte log file stays behind after every call to `i3
--get-socketpath`. Also, replace "return" calls with more explicit "exit"
calls.

Before:

$ ls -ld /tmp/i3* | wc -l; \
  repeat 10 i3 --get-socketpath >/dev/null; \
  ls -ld /tmp/i3* | wc -l
1
11

Now:

$ ls -ld /tmp/i3* | wc -l; \
  repeat 10 i3 --get-socketpath >/dev/null; \
  ls -ld /tmp/i3* | wc -l
1
1

Signed-off-by: Julius Plenz <julius@plenz.com>
11 years agoBugfix: bump copyright in asciidoc-git.conf
Valentin Haenel [Fri, 10 Aug 2012 21:00:07 +0000 (23:00 +0200)]
Bugfix: bump copyright in asciidoc-git.conf

11 years agoscratchpad: fix moving scratchpad window
Michael Stapelberg [Wed, 8 Aug 2012 14:22:03 +0000 (16:22 +0200)]
scratchpad: fix moving scratchpad window

From the source:

    When starting i3 initially (and after each change to the connected
    outputs), this function fixes the resolution of the __i3
    pseudo-output. When that resolution is not set to a function which
    shares a common divisor with every active output’s resolution,
    floating point calculation errors will lead to the scratchpad window
    moving when shown repeatedly.

fixes #632

11 years agoupdate .gitignore (Thanks SardemFF7)
Michael Stapelberg [Tue, 7 Aug 2012 08:03:37 +0000 (10:03 +0200)]
update .gitignore (Thanks SardemFF7)

11 years agomakefile: remove the old loglevels.tmp and loglevels.h on 'make clean'
Michael Stapelberg [Tue, 7 Aug 2012 08:03:10 +0000 (10:03 +0200)]
makefile: remove the old loglevels.tmp and loglevels.h on 'make clean'

11 years agoexplicitly set filenames to $(basename __FILE__)
Michael Stapelberg [Tue, 7 Aug 2012 07:55:52 +0000 (09:55 +0200)]
explicitly set filenames to $(basename __FILE__)

This makes the debug log a bit more readable, especially since commit
48f1e383ca2322ffbfbc66cd7c0325b97f8d36a9

11 years agoSupport _NET_ACTIVE_WINDOW ClientMessages
Michael Stapelberg [Tue, 7 Aug 2012 07:50:47 +0000 (09:50 +0200)]
Support _NET_ACTIVE_WINDOW ClientMessages

Since we advertise _NET_ACTIVE_WINDOW support (but only set the
corresponding atom currently), it makes sense to also support the
ClientMessage. Apps such as Gajim use it to set focus to the roster
window when clicking on the tray icon for example.

fixes #767

11 years agohandlers.c: don’t call x_push_changes(croot), tree_render() already does
Michael Stapelberg [Tue, 7 Aug 2012 07:50:25 +0000 (09:50 +0200)]
handlers.c: don’t call x_push_changes(croot), tree_render() already does

11 years agoBugfix: Attach con to nc before calling con_border_style_rect()
Michael Stapelberg [Mon, 6 Aug 2012 23:13:37 +0000 (01:13 +0200)]
Bugfix: Attach con to nc before calling con_border_style_rect()

11 years agoBugfix: Add deco_height only when in "normal" border mode.
Philipp Middendorf [Mon, 6 Aug 2012 16:39:38 +0000 (18:39 +0200)]
Bugfix: Add deco_height only when in "normal" border mode.

Also, use con_border_style_rect instead of hard-coded values to
determine the border size.

11 years agoBugfix for previous commit: Don’t crash with dock windows
Michael Stapelberg [Mon, 6 Aug 2012 01:11:11 +0000 (03:11 +0200)]
Bugfix for previous commit: Don’t crash with dock windows

11 years agoMake horizontal edge-borders hidable too
Axel Wagner [Sun, 5 Aug 2012 19:41:36 +0000 (21:41 +0200)]
Make horizontal edge-borders hidable too

11 years agoProperly report errors in 'focus parent' (Thanks eeemsi)
Michael Stapelberg [Sun, 5 Aug 2012 18:56:33 +0000 (20:56 +0200)]
Properly report errors in 'focus parent' (Thanks eeemsi)

Also, make X11 errors debug log level only. They are harmless usually.

fixes #762

11 years agocorrectly store last_split_layout when we are dealing with a workspace-level layout...
Michael Stapelberg [Sun, 5 Aug 2012 18:52:42 +0000 (20:52 +0200)]
correctly store last_split_layout when we are dealing with a workspace-level layout change (Thanks aksr)

fixes #763

11 years agocreate hide_edge_borders option
Iakov Davydov [Sun, 22 Jul 2012 09:57:07 +0000 (13:57 +0400)]
create hide_edge_borders option

11 years agomakefile: canonicalize path when compiling
Michael Stapelberg [Sun, 5 Aug 2012 15:00:24 +0000 (17:00 +0200)]
makefile: canonicalize path when compiling

Compilers store the path with which they were called in the debug
symbols. Therefore, this will make backtraces show something like
../i3-4.2/src/main.c instead of src/main.c.

See also http://stackoverflow.com/questions/6473561/

11 years agopre-compile all.h, saves quite some build time
Michael Stapelberg [Sun, 5 Aug 2012 14:35:54 +0000 (16:35 +0200)]
pre-compile all.h, saves quite some build time

before:

$ time CC=clang make -j16
CC=clang make -j16  6,04s user 0,86s system 468% cpu 1,471 total
CC=clang make -j16  6,05s user 0,87s system 468% cpu 1,477 total
CC=clang make -j16  6,15s user 0,86s system 464% cpu 1,510 total
CC=clang make -j16  6,05s user 0,93s system 467% cpu 1,493 total
CC=clang make -j16  6,10s user 0,84s system 461% cpu 1,507 total

$ time CC=gcc make -j16
CC=gcc make -j16  9,91s user 1,43s system 508% cpu 2,231 total
CC=gcc make -j16  10,02s user 1,37s system 500% cpu 2,275 total
CC=gcc make -j16  9,80s user 1,60s system 507% cpu 2,245 total
CC=gcc make -j16  10,02s user 1,44s system 506% cpu 2,264 total
CC=gcc make -j16  9,99s user 1,45s system 505% cpu 2,261 total

after:

$ time CC=clang make -j16
CC=clang make -j16  3,41s user 0,83s system 375% cpu 1,131 total
CC=clang make -j16  3,29s user 0,90s system 373% cpu 1,122 total
CC=clang make -j16  3,35s user 0,77s system 369% cpu 1,116 total
CC=clang make -j16  3,36s user 0,78s system 374% cpu 1,105 total
CC=clang make -j16  3,46s user 0,75s system 373% cpu 1,126 total

$ time CC=gcc make -j16
CC=gcc make -j16  10,74s user 1,44s system 494% cpu 2,462 total
CC=gcc make -j16  10,68s user 1,54s system 497% cpu 2,453 total
CC=gcc make -j16  10,60s user 1,60s system 488% cpu 2,499 total
CC=gcc make -j16  10,63s user 1,51s system 485% cpu 2,502 total
CC=gcc make -j16  10,70s user 1,51s system 497% cpu 2,453 total

Therefore, we enable pre-compiled headers only when CC=clang.

11 years agofix a few warnings/places where the clang static analyzer complains
Michael Stapelberg [Sun, 5 Aug 2012 14:34:38 +0000 (16:34 +0200)]
fix a few warnings/places where the clang static analyzer complains