Commit Graph

3962 Commits

Author SHA1 Message Date
Michael Stapelberg
f44d4ce4b3 re-indent src/config.c 2012-09-06 15:55:38 +02:00
Michael Stapelberg
ea842f9686 update release-notes 2012-09-06 09:48:10 +02:00
Michael Stapelberg
1e3e6997f4 rendering: ceil() instead of truncating for tabbed deco_rect width (Thanks szalik)
In tabbed mode, the available width (say 1280) is divided by the amount
of child containers (say 3). Before this commit, we just truncated the
result and would end up with 426 + 426 + 426 = 1278 pixels that we
render to. Now we render a bit too much, but that’ll at least not give
us graphics corruption on any side :).

fixes #791
2012-09-05 23:54:56 +02:00
Michael Stapelberg
34391ae885 fix format string warnings 2012-09-05 22:26:59 +02:00
Michael Stapelberg
d644dbff64 bugfix: forgot to mark split containers as split = true (+test) (Thanks szalik)
When the workspace layout (formerly orientation) was forced to change
due to a move command, the split container we created was not marked as
split = true, which caused tree_flatten() to errnously kill the contents
of it and thus one window ended up unmanaged.

Also, the logic in tree_flatten() was inverted due to commit de94f6da.

fixes #790
2012-09-05 22:26:52 +02:00
Michael Stapelberg
a598544b5a userguide: point out explicitly how to use startup-notifications 2012-09-05 21:10:26 +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
8d2799c251 Merge branch 'master' into next 2012-09-05 17:09:43 +02:00
Michael Stapelberg
9436e6f26e Merge branch 'fix-nagbar-exit' 2012-09-05 17:09:40 +02:00
Michael Stapelberg
f5a7492a11 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.
2012-09-05 17:09:23 +02:00
Michael Stapelberg
4976fa3350 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
2012-09-05 00:22:38 +02:00
Michael Stapelberg
2a37089ad1 Merge branch 'master' into next 2012-09-04 22:49:16 +02:00
Michael Stapelberg
ada6af4244 Merge branch 'fix-1px-flickering' 2012-09-04 22:49:12 +02:00
Michael Stapelberg
8176b55b7b 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
2012-09-04 22:47:12 +02:00
Michael Stapelberg
232d6ccce9 tests: introduce is_num_children test
This makes it clearer what the tests are actually doing and kills quite
a bit of useless repetitions
2012-09-04 22:24:13 +02:00
Michael Stapelberg
65e5bcfdf4 Merge branch 'master' into next 2012-09-04 20:21:31 +02:00
Michael Stapelberg
562c53d66c Merge branch 'fix-fullscreen-confreq' 2012-09-04 20:21:22 +02:00
Michael Stapelberg
5b95e20a62 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
2012-09-04 20:21:07 +02:00
Michael Stapelberg
73d5dcbbaf x: grab server and process pending events before managing existing windows
fixes #782
2012-09-04 18:02:37 +02:00
Michael Stapelberg
9976e7461e remove xcb-proto from DEPENDS, it’s only a build-time dep of libxcb (Thanks okraits) 2012-09-04 16:53:06 +02:00
Michael Stapelberg
4636eb840d fix compilation with older xcb-util with -DXCB_COMPAT (Thanks okraits) 2012-09-03 14:55:27 +02:00
Michael Stapelberg
f18ab28f5c bugfix: memleak: use i3STRING_FREE() instead of FREE() 2012-09-03 00:42:17 +02:00
Michael Stapelberg
2d1ebc2b90 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.
2012-09-03 00:42:14 +02:00
Michael Stapelberg
48baf3bf65 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.
2012-08-31 00:17:06 +02:00
Cian
8202f04bf2 Make the initial mention of 'split h/v' a little easier to understand. 2012-08-31 00:16:58 +02:00
Michael Stapelberg
6d8f61205d accept slashes in RandR output names (+test) (Thanks dbp)
fixes #785
2012-08-28 13:26:12 +02:00
Quentin Glidic
a007283773 i3-input: Fix text drawing offset 2012-08-28 12:06:03 +02:00
Quentin Glidic
af15087b99 i3-input: Do not use a non-loaded font
We must call load_font before any font-related calls like
predict_text_width
2012-08-28 10:58:18 +02:00
Michael Stapelberg
b8ac9591a2 manpage: update force-xinerama nvidia hint 2012-08-27 15:25:22 +02:00
Michael Stapelberg
c97d6198bd manpage: describe keybindings to open a terminal/dmenu (Thanks Joost) 2012-08-27 15:22:19 +02:00
Michael Stapelberg
67999269fd 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
2012-08-27 15:07:18 +02:00
Michael Stapelberg
c8cfc77b0a docs/testsuite: mention why using a separate language is great 2012-08-23 20:27:08 +02:00
eeemsi
b9255f51f8 Use (void) instead of () for functions without args 2012-08-23 19:34:37 +02:00
Sebastian Ullrich
d29b62f24f Remove dead code in cmd_workspace_number
If a ws doesn't exist, maybe_back_and_forth
will never return true for it.
2012-08-22 17:58:08 +02:00
Michael Stapelberg
82b73c20c9 testcase for the previous commit 2012-08-22 17:57:58 +02:00
Sebastian Ullrich
eadf1e306f Fix 'back and forth' in 'workspace number' for named ws 2012-08-22 17:57:32 +02:00
Michael Stapelberg
6e75dc7e0e testsuite: add hint about missing DUMMY Xorg module 2012-08-22 17:22:20 +02:00
Michael Stapelberg
7cadc40846 testcase for the previous commit 2012-08-22 17:16:18 +02:00
Sebastian Ullrich
bb853660cf Create ws in "move workspace number n" if not existing
fixes #729
2012-08-22 17:08:02 +02:00
Michael Stapelberg
4622cde7b7 Merge branch 'master' into next 2012-08-22 16:02:02 +02:00
Michael Stapelberg
2ac3b08cf6 Merge branch 'floating-resize-height' 2012-08-22 16:01:57 +02:00
Joel Stemmer
1089b0b201 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.
2012-08-22 16:01:40 +02:00
Michael Stapelberg
be6190a516 complete-run: check whether Xdummy dies, add a flag to keep the Xdummy output 2012-08-18 16:27:00 +02:00
Michael Stapelberg
ad21037cd2 update DEPENDS, prepare RELEASE-NOTES for 4.3 2012-08-18 15:33:36 +02:00
Michael Stapelberg
5257a1268f 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
2012-08-17 01:55:31 +02:00
Michael Stapelberg
ba8b5c480d debian: make 'i3' recommend dunst 2012-08-13 13:44:54 +02:00
Michael Stapelberg
1173740a35 debian/control: format build-depends nicely, add pango/cairo 2012-08-13 13:44:36 +02:00
Michael Stapelberg
125bf09e70 pango: divide by PANGO_SCALE to get a "normal" font size 2012-08-13 13:39:58 +02:00
Michael Stapelberg
d7b11bde28 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.
2012-08-13 13:38:04 +02:00
Michael Stapelberg
ef90ccd1a8 default config: include a short explanation about xft fonts 2012-08-13 13:34:30 +02:00