Commit Graph

20 Commits (d75c5a18d79f52e5b81a0487e149dab74e76227b)

Author SHA1 Message Date
Michael Stapelberg 9200094203 format **/*.c with clang-format-3.5
This has multiple effects:

1) The i3 codebase is now consistently formatted. clang-format uncovered
   plenty of places where inconsistent code made it into our code base.

2) When writing code, you don’t need to think or worry about our coding
   style. Write it in yours, then run clang-format-3.5

3) When submitting patches, we don’t need to argue about coding style.

The basic idea is that we don’t want to care about _how_ we write the
code, but _what_ it does :). The coding style that we use is defined in
the .clang-format config file and is based on the google style, but
adapted in such a way that the number of modifications to the i3 code
base is minimal.
2014-06-15 19:07:02 +02:00
Petr Písař 2cc51841a5 Reset SIGIPE handler before executing a command
This commit:

commit fb6d117c42
Author: Axel Wagner <mail@merovius.de>
Date:   Thu Dec 30 21:09:32 2010 +0100

    Port sighandler to tree-branch

blocks SIGPIPE. Unfortunatelly blocked signal set is preserved accross
execve()s, so any program executed by i3 inherited blocked SIGPIPE signal.
This leads to courious effects when pipe writer does not terminate after
exiting pipe reader.

Simple reproducer is to spawn a new xterm by a key shortcut and then run this
command there:

$ perl -e 'print $SIG{PIPE}, qq{\n}'
IGNORE

fixes #1237
2014-04-26 12:09:45 +02:00
Baptiste Daroussin f691a55923 Use _PATH_BSHELL to ensure using a bourne shell
[Michael]
This commit should fix problems with people using a non-bourne shell as
login shell, e.g. fish or rc. AFAICT, $SHELL should only be used for
interactive shells, but we just want a bourne shell, not an interactive
shell.
2013-11-09 10:11:32 +01:00
Deiz cae6fb627f Improve startup sequence termination conditions
If a window with _NET_STARTUP_ID set is moved to another workspace, it
will delete any associated startup sequence immediately. This will also
occur if a window has a leader with _NET_STARTUP_ID set, if the leader
has no container (never been mapped).

A startup sequence may also be deleted if it's matched by
startup_workspace_for_window() and its 30-second timeout has elapsed.
2012-10-04 17:48:51 +02:00
Michael Stapelberg 34391ae885 fix format string warnings 2012-09-05 22:26:59 +02:00
Michael Stapelberg 32d4dbf70f startup-notifications: keep sequence around for 30s after completion
This changes the fact that Firefox would not be launched on the correct
workspace because it marked the startup sequence as completed *before*
actually mapping all of its windows.

To test this, go to workspace 3 and run this command in a terminal:
    i3-msg 'exec iceweasel; workspace 4'
That will make i3 start iceweasel (and create a proper startup
notification context for it), then immediately switch to workspace 4
(before iceweasel could possibly start).

The iceweasel window(s) should appear on workspace 3.
2012-09-05 21:02:52 +02:00
Michael Stapelberg 884627ef20 use I3__FILE__ for DLOG, leave __FILE__ as is
See also commit 0e752070ac, which broke
source code listings in gdb unless you cd into i3/src. This should give
us best of both :-).
2012-08-12 12:19:47 +02:00
Michael Stapelberg 0e752070ac explicitly set filenames to $(basename __FILE__)
This makes the debug log a bit more readable, especially since commit
48f1e383ca
2012-08-07 09:55:52 +02:00
Michael Stapelberg 318d4fdeef make in-place restarts use socket activation, too (for faster/less flaky tests) 2012-01-21 23:03:09 +00:00
Michael Stapelberg 332dbfe9c1 Enable (unlimited) core dumps when running i3 development versions
Also prints out useful stuff:

    CORE DUMPS: You are running a development version of i3, so coredumps were
    automatically enabled (ulimit -c unlimited).
    CORE DUMPS: Your current working directory is "/home/michael/i3".
    CORE DUMPS: Your core_pattern is: /tmp/%e.core.%p
    i3 (tree) version 4.0.2-479-g26ab2ac (2011-11-08, branch "next") starting

This does not affect child processes of i3.

The intention of this change is to make debugging easier – it’s one less thing
users of the development version have to worry about when trying to help with
debugging.
2011-11-08 22:49:25 +00:00
Michael Stapelberg bbfbd28dfa Add a --no-startup-id flag for exec (command), exec (config), exec_always (config) 2011-10-25 22:18:17 +01:00
Michael Stapelberg 42d355f2b7 normalize modelines/headers across src/*.c 2011-10-22 23:40:02 +01:00
Michael Stapelberg 914ca6cfe7 Bugfix: Use _exit in forking to avoid calling the libev cleanup handler (Thanks xeen) 2011-10-15 16:56:47 +01:00
Michael Stapelberg 5f52c78aa0 Change the root window cursor to 'watch' during startups 2011-10-10 15:54:18 +01:00
Michael Stapelberg 2ad4fbb34a startup: delete the startup sequence upon completion, make the timeout complete it 2011-10-10 15:54:18 +01:00
Michael Stapelberg 997a539a8a Implement timeouts for startup notifications 2011-10-10 15:54:17 +01:00
Michael Stapelberg 6ac098a45e support _NET_STARTUP_ID on the client leader window
(necessary for GIMP, geeqie, …)
2011-10-10 15:54:17 +01:00
Michael Stapelberg 4204b8e2b0 Get the _NET_STARTUP_ID in manage_window, get the corresponding workspace 2011-10-10 15:54:17 +01:00
Michael Stapelberg 499d89bdb0 Keep track of startup notifications in a TAILQ, save workspace 2011-10-10 15:54:17 +01:00
Michael Stapelberg f4f4d782bb implement a startup monitor, move code to src/startup.c 2011-10-10 15:54:17 +01:00