Commit Graph

465 Commits (bc5f33878a256b3268411d110718bb2ff1b66862)

Author SHA1 Message Date
Michael Stapelberg 68a23b9577 Bugfix: only honor _NET_ACTIVE_WINDOW for visible windows (+test) (Thanks Tucos)
fixes #774
2012-08-12 16:08:53 +02:00
Michael Stapelberg b01d45e027 complete-run: handle bailouts 2012-08-12 13:46:54 +02:00
Michael Stapelberg dd743f3b55 add testcase for previous bugfix (floating window size) 2012-08-12 00:36:44 +02:00
Michael Stapelberg ae88accf6f 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.
2012-08-12 00:22:17 +02:00
Michael Stapelberg d92626bc62 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'
2012-08-12 00:20:52 +02:00
Michael Stapelberg 6ba0944430 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
2012-08-08 18:45:40 +02:00
Michael Stapelberg 78f5f2204d ipc: implement GET_VERSION to find out the i3 version
This is useful for third-party scripts which require certain features
and want to error out cleanly when they are run with an old i3 version.

Additionally, i3 --version might be different from what’s actually
running (an old version of the binary), so i3-msg -t get_version will be
the best way to figure out the i3 version you are actually running from
this commit on.
2012-08-05 14:30:05 +02:00
Michael Stapelberg 2f22fae119 i3-migrate-config-to-v4: use layout toggle split (Thanks eeemsi) 2012-08-04 12:46:37 +02:00
Michael Stapelberg de94f6da1a Introduce splith/splitv layouts, remove orientation
With this commit, the "default" layout is replaced by the splith and
splitv layouts. splith is equivalent to default with orientation
horizontal and splitv is equivalent to default with orientation
vertical.

The "split h" and "split v" commands continue to work as before, they
split the current container and you will end up in a split container
with layout splith (after "split h") or splitv (after "split v").

To change a splith container into a splitv container, use either "layout
splitv" or "layout toggle split". The latter command is used in the
default config as mod+l (previously "layout default"). In case you have
"layout default" in your config file, it is recommended to just replace
it by "layout toggle split", which will work as "layout default" did
before when pressing it once, but toggle between horizontal/vertical
when pressing it repeatedly.

The rationale behind this commit is that it’s cleaner to have all
parameters that influence how windows are rendered in the layout itself
rather than having a special parameter in combination with only one
layout. This enables us to change existing split containers in all cases
without breaking existing features (see ticket #464). Also, users should
feel more confident about whether they are actually splitting or just
changing an existing split container now.

As a nice side-effect, this commit brings back the "layout toggle"
feature we once had in i3 version 3 (see the userguide).

AFAIK, it is safe to use in-place restart to upgrade into versions
after this commit (switching to an older version will break your layout,
though).

Fixes #464
2012-08-04 03:13:24 +02:00
Michael Stapelberg 077e021e26 tests: implement --xtrace in complete-run.pl 2012-08-04 03:12:06 +02:00
Michael Stapelberg cc7f16007a Display i3-nagbar when commands lead to an error
e.g. pressing Mod1+x when having the following in your configfile:

    bindsym Mod1+x some invalid command

will lead to an i3-nagbar instance popping up, offering you to view the
error log (which will contain parser errors from this commit on).
2012-08-02 17:45:09 +02:00
Michael Stapelberg ac7278eb1a resizing: traverse containers up properly (+test) (Thanks oblique)
In certain situations (when you have a h-split within a h-split) you
couldn’t properly resize previously. This commit makes the resize
command properly traverse up the containers.

fixes #754
2012-07-22 21:37:26 +02:00
Michael Stapelberg a65394646c tests: t/504: ensure cursor position
Otherwise, the cursor might be at (1025, 0) due to previous testcases
and we wouldn’t start up on the correct workspace.
2012-06-29 23:21:32 +02:00
Michael Stapelberg f0f45aa84d tests: t/166-assign.t: use wait_for_window
While it’s generally intended that wait_for_window is not called within
this testcase, in the first test instruction it was a mistake. The
window in fact gets mapped and therefore we should call wait_for_window.
2012-06-29 23:20:46 +02:00
Michael Stapelberg daee3218c9 tests: make t/166-assign.t more robust
…by using the new syntax which will not trigger i3-nagbar. Checking for
i3-nagbar is inherently prone to race conditions since i3-nagbar does
not communicate in any way that it’s there.
2012-06-29 21:28:10 +02:00
Michael Stapelberg 19946ee14d tests: make t/159-socketpath more robust
…by getting the socket path from i3 and then checking that it conforms
to what we expect. Previously we monitored /tmp, which can go wrong in
various ways, especially since i3’s directory within /tmp is not
predictable (by design).
2012-06-29 21:23:28 +02:00
Michael Stapelberg a15fe0e332 Merge branch 'master' into next 2012-06-10 17:57:25 +02:00
Michael Stapelberg f0b56c5e98 parser: reorder v/h/vertical/horizontal
This eliminates an error message upon split horizontal which did not
occur in older i3 versions. The command itself worked just fine.
2012-06-10 17:56:28 +02:00
Pavel Löbl 2afecaf355 Add a new command 'move to workspace current'
Added a new command 'move to workspace current' which can be used
with criteria to move a window to the current workspace.
2012-06-03 19:42:56 +02:00
Fernando Tarlá Cardoso Lemos fffc53c246 Restrict "move to workspace" commands in fullscreen. 2012-06-03 16:24:53 +02:00
Fernando Tarlá Cardoso Lemos 4452bfb942 Prevent moving out of fullscreen containers. 2012-06-03 16:24:53 +02:00
Fernando Tarlá Cardoso Lemos 8bf4e9e059 Restrict directional focus in fullscreen.
This reuses the same fullscreen focus logic to ensure that focus
doesn't escape a fullscreen container.
2012-06-03 16:24:53 +02:00
Fernando Tarlá Cardoso Lemos 250c260eaa Allow focus child/parent when in fullscreen.
This is now restricted according to the already defined fullscreen
focus constraints. Test case 157 was removed, as we don't prevent
level up/down in fullscreen anymore. Those commands are properly
tested in fullscreen by test case 156.

Fixes: #612
2012-06-03 16:24:53 +02:00
Fernando Tarlá Cardoso Lemos da1e232757 Refined the fullscreen focus constraints.
Basically, a focus change can't escape a fullscreen container. The
only exception is per-output fullscreen containers, as you should
be able to focus a container in a different workspace in this case.

This is an improvement on 4eab046e, now considering the difference
between global and per-output fullscreen and taking the tree
structure into account to determine what escaping the fullscreen
container means. It only affects targeted focus commands in the
form "for_window [...] focus", but it lays the foundation for
forthcoming fixes to all other focus commands.
2012-06-03 16:24:53 +02:00
Michael Stapelberg 1103f94c34 Merge branch 'master' into next 2012-05-28 23:37:26 +02:00
Fernando Tarlá Cardoso Lemos 485871ffdd Get rid of references to level up/down.
In v4 syntax, that's focus parent/child.
2012-05-28 23:37:15 +02:00
Michael Stapelberg ed957d60a7 Merge branch 'master' into next 2012-05-09 21:08:28 +02:00
Fernando Tarlá Cardoso Lemos 4eab046e8f Allow focus w/ target when in fs in some cases.
If the target is in a different workspace, there's no reason why
we wouldn't allow the user to focus it. We already allow this when
focusing a workspace, for example.
2012-05-09 21:08:19 +02:00
Michael Stapelberg eab9f46c33 Merge branch 'master' into next 2012-05-09 20:39:26 +02:00
Michael Stapelberg ec4dddb608 tests: add test to verify workspace_auto_back_and_forth works with 'workspace number' 2012-05-09 20:33:41 +02:00
Michael Stapelberg 82e0eaa315 tests: Check that 'workspace number <number>' opens a new workspace 2012-05-09 20:33:11 +02:00
Pavel Löbl 8557b05a2c t/141-resize.t: do not compare float values directly. use i3test.pm::cmp_float which compares using precision of 1e-6. 2012-05-05 19:15:43 +02:00
Michael Stapelberg bbe607899c Send proper error messages upon parser failures, use yajl for generating command replies
Fixes: #693
2012-05-02 22:01:50 +02:00
Michael Stapelberg 1bb165a29a tests: warp the pointer to in multi-monitor tests to avoid flaky tests 2012-04-09 14:48:57 +02:00
Michael Stapelberg 983ba656fc t/166-assign: wait until the window is definitely mapped 2012-04-09 14:48:25 +02:00
Michael Stapelberg 7210ab22d7 t/166-assign: remove unnecessary sleeps 2012-04-09 14:48:15 +02:00
Michael Stapelberg 0f10ccdf12 Implement fake-outputs option (cmdline, cfg) for multi-monitor testing
This kills the dependency on xdmx and makes the testsuite simpler
and more flexible (in the output sizes / configurations).
2012-04-09 14:28:36 +02:00
Michael Stapelberg 373b4ad74a Implement 'rename workspace <old_name> to <new_name>' 2012-04-08 20:40:00 +02:00
Michael Stapelberg ad513b4799 Implement 'move [container|window] to workspace number <number>' 2012-04-08 20:33:46 +02:00
Michael Stapelberg 72078c704e Implement 'workspace number <number>' to switch to named workspaces 2012-04-08 19:17:46 +02:00
Michael Stapelberg 849e06f21e Replace the old fullscreen container when requesting fullscreen
Fixes: #510
2012-04-08 17:53:37 +02:00
Michael Stapelberg 2d110c90e6 Implement resize <grow|shrink> <width|height>, use it in the default config
Fixes: #576
2012-04-08 16:00:15 +02:00
Michael Stapelberg c0c2fd631b add a testcase for the previous commit 2012-04-05 18:12:24 +02:00
Michael Stapelberg 941267e98e testsuite: explicitly start Xdummy with -nolisten tcp 2012-03-26 17:00:44 +02:00
Pavel Löbl f78f137ed0 Extends move command for floating windows 2012-03-25 11:06:49 +02:00
Michael Stapelberg 2abfb5a88b Bugfix: Also clear the command parser’s stack upon invalid commands (Thanks helgikrs)
Fixes: #652
2012-03-21 17:20:07 +01:00
Michael Stapelberg d085e88d02 t/158-wm_take_focus: use sync_with_i3 instead of a timeout 2012-02-21 14:37:55 +01:00
Michael Stapelberg 41400d8a16 t/164-kill-win-vs-client: get rid of sleep()s 2012-02-21 14:28:37 +01:00
Michael Stapelberg bee1e90b1e t/187-commands-parser: shave off a bit of time by consolidating calls 2012-02-21 14:22:26 +01:00
Michael Stapelberg b21a675a9c t/171-config-migrate: shave off a bit of time by consolidating migrate_config calls 2012-02-21 14:11:04 +01:00