Commit Graph

712 Commits

Author SHA1 Message Date
jj
b6100dd727 Fix output retrieval for floating cons
When focusing/moving to outputs, the method of getting the correct
output for a given container fails if the container in question is
floating and only partially mapped on an output screen. This patch
introduces a fail-safe retrieval of the output for any container.
2013-10-23 23:26:06 +02:00
Tony Crisci
1110a1bed6 Add .clang_complete and Xdummy.so to gitignore
Adds two files to gitignore.

`.clang_complete` is created by the clang_complete vim plugin
[https://github.com/Rip-Rip/clang_complete]

`Xdummy.so` is created by compiling the Xdummy module.
2013-10-23 23:24:04 +02:00
Tony Crisci
e99158e419 Assigned windows open urgent when not visible
When i3 begins to manage a window, if the window opens on a workspace
that is not visible, the urgency hint on the newly managed window will
be set.

fixes #1088
2013-10-19 10:07:24 +02:00
Tony Crisci
14b86acf40 Testcases: Use AnyEvent::I3 version 0.15
Use the latest version of AnyEvent::I3, version 0.15, which includes
support for the `window` event tag.
2013-10-19 10:06:08 +02:00
Tony Crisci
9adff26dcf Testcases: new-test prints usage without input
Prevent the accidental creation of new tests with empty names by
printing usage information for new-test when the test name would be
empty.
2013-10-19 10:06:02 +02:00
Tony Crisci
cf3da1c433 Testcases: remove "latest" if it is a symbolic link
Test for the existence of the symlink to "latest" with the -l flag,
which tests if the target is a symbolic link. Testing with the -e flag
will fail in case the link points to a file that does not exist, which
will occur if the test result directories are deleted by hand.
2013-10-19 10:05:33 +02:00
jj
bf1699e967 Fix command parser: resizing tiling windows
i3 would accept an invalid resize command like 'resize shrink width 10
px or' without specifying the ppt value, and then crash. This patch
fixes the parser specification.
2013-10-13 18:02:40 +02:00
Michael Stapelberg
1c0554564a previous commit: extend test and code to also work with floating windows 2013-10-13 17:59:29 +02:00
Tony Crisci
f9d8a1b4d6 Testcases: ignore Xorg config dir when starting Xdummy
Start Xdummy with '-configdir /dev/null' to avoid conflicting settings
in xorg.conf.d.
2013-10-13 17:17:54 +02:00
jj
98c4cc46e4 Do not resize/reposition floating containers when moving them to scratchpad 2013-09-30 22:54:35 +02:00
Michael Stapelberg
8d38529bcd tests: move set_wm_class to X11::XCB::Window
This code was duplicated way too often for a long time :)
2013-09-24 21:56:52 +02:00
Michael Stapelberg
031de8f720 Merge branch 'master' into next 2013-09-24 07:48:09 +02:00
Michael Stapelberg
1a1d421534 Bugfix: correctly recognize assigned windows as urgent (Thanks jookia)
fixes #1086
2013-09-24 07:47:36 +02:00
syl20bnr
7098ef602b Add new bar.binding_mode_indicator configuration.
i3 current behavior hides the binding mode indicator when
workspace buttons are disabled.
This patch adds a new configuration for i3bar called
'binding_mode_indicator' which acts like the workspace_buttons.
It is now possible to configure i3bar to hide the
workspace buttons and keep showing the binding mode indicator.
This should make the hide workspace buttons configuration
more convenient for those who are heavily using binding
modes.
Default value for binding_mode_indicator is true.
2013-09-24 06:59:26 +02:00
jj
97b086efd9 Close all children when closing a workspace
fixes #591
2013-09-24 06:45:52 +02:00
Michael Stapelberg
153259cb10 tests: also get rid of smartmatch in complete-run.pl 2013-09-24 06:37:40 +02:00
jj
ee04f8bfda Fix handling of new windows with WM_STATE_FULLSCREEN
If the currently focused window is in fullscreen mode, and a new window
is opened with WM_STATE_FULLSCREEN set, the new window now becomes the
new fullscreen window and gains focus.
2013-09-24 06:36:56 +02:00
Michael Stapelberg
3ba8642efd tests: fix setting the urgency hint
X11::XCB < 0.08 had a bug which caused this code to work even though it
shouldn’t.
2013-09-24 06:36:08 +02:00
Michael Stapelberg
d6b1f1a1b2 i3test: get rid of the smartmatch operator, it’s experimental since perl 5.18 2013-09-24 06:35:51 +02:00
Michael Stapelberg
a52b5212ea Merge branch 'master' into next 2013-09-01 13:35:19 +02:00
Michael Stapelberg
2481b9dcd7 Bugfix: don’t flatten tabbed/stacked containers
fixes #1053
2013-09-01 13:35:04 +02:00
Sebastian Ullrich
431e98dc35 Respect workspace numbers when looking for a free workspace name
This prevents a ws '1' appearing on a new output when there's
already a ws '1: www' on an existing output
2013-08-18 17:47:53 +02:00
koebi
88671986f4 implement unmark command 2013-07-17 23:02:31 +02:00
Michael Stapelberg
eec80838ab actively delete _NET_WORKAREA on startup
fixes #1038
2013-07-13 12:24:15 +02:00
Franck Michea
1f8a860744 bugfix: Resize and center a scratchpad even when a criteria is used. 2013-07-11 21:18:21 +02:00
Alexander Berntsen
023594909e Implement debuglog command
Add debuglog command that takes toggle|on|off. Add get_debug_logging()
to be able to toggle. Make t/187-commands-parser.t expect 'debuglog'.
Document the debuglog command in userguide.
2013-07-07 15:33:42 +02:00
Michael Stapelberg
c4d4418745 Merge branch 'master' into next 2013-06-29 20:58:51 +02:00
Michael Stapelberg
d055e70a89 tests: update t/172-start-on-named-ws.t to check the previous commit 2013-06-29 20:58:33 +02:00
Michael Stapelberg
78e99440f6 Merge branch 'master' into next 2013-06-29 20:28:07 +02:00
Michael Stapelberg
b4f7142509 Bugfix: fix focus handling in 'floating disable' on non-visible windows (Thanks necoro)
fixes #1027
2013-06-29 20:27:33 +02:00
oblique
78fad71894 Update parent urgency hint if a child is removed. 2013-06-23 22:27:30 +02:00
Michael Stapelberg
3cf46ef4cc add a testcase for the shmlog command 2013-06-23 22:14:59 +02:00
Alexander Berntsen
f9d93d75b3 Implement shmlog command
Add shmlog command that takes <size>|toggle|on|off. Separate logbuffer
management into open_logbuffer() and close_logbuffer(). Make
t/187-commands-parser.t expect 'shmlog'. Add update_shmlog_atom() to
update the SHMLOG_PATH. Document the shmlog command in userguide.
2013-06-23 21:48:02 +02:00
Michael Stapelberg
80e7d2d346 lib/i3test: clarify how to identify open_window() windows in i3 commands (Thanks vandannen) 2013-06-08 12:49:02 +02:00
haptix@web.de
e3913093b6 introduced i3 command for changing the hidden state and the mode of i3bar
The hidden_state and mode of each i3bar instance can now be controlled from within i3.
Therefore, two new i3 command were introduced:
    _
    bar hidden_state show|hide|toggle [<bar_id>]

    show: always show the bar
    hide: normal hide mode
    toggle: toggle between show and hide (individually for each bar)
    _
    bar mode dock|hide|invisible|toggle [<bar_id>]

    hide,dock: like before
    invisible: always keep the bar hidden
    toggle: toggle between dock and hide (individually for each bar)

This patch introduces a hidden_state ("hidden_state hide|show") in the
barconfig, which indicates the current hidden_state of each i3bar
instance. It only affects the bar when in hide mode. Additionally, a new
invisible mode was introduced. In order to change the hidden_state or
mode of the bar from i3, a barconfig-update event was introduced, for
which a bar can subscribe and the bar then gets notified about the
currently set hidden_state and mode in its barconfig.

For convenience, an id field ("id <bar_id>") was added to the barconfig, where one can
set the desired id for the corresponding bar. If the id is not specified, i3 will
deterministically choose an id; otherwise, with the previous random approach for finding
a new id, which is actually not shared with i3bar, as it would determine its id on
startup, the event-subscription would be destroyed on reload. Still, this issue remains
when manually changing the bar_id in the config and then reloading.

fixes #833, #651
2013-05-25 23:00:36 +02:00
haptix@web.de
f0eba6d15c Fix problem when moving fullscreen window to scratchpad
When moving a fullscreen window to scratchpad with 'move scratchpad', the
focused window would stay fullscreen.

Also, when having a container in fullscreen mode and then focusing a child of
this container and moving it to scratchpad, it would enable fullscreen for
the child window.

This patch fixes both problems, so the scratchpad window is always floating.
2013-05-25 22:59:27 +02:00
Michael Stapelberg
0b000b1464 Merge branch 'master' into next 2013-04-02 23:59:48 +02:00
Michael Stapelberg
0901720a24 Bugfix: fix floating window size with hide_edge_borders (+test)
fixes #998
2013-04-02 23:59:26 +02:00
haptix@web.de
43bf72fc5d add testcase for the workspace-focus ipc event 2013-04-02 22:27:04 +02:00
Michael Stapelberg
bfc2cbc69a t/201-config-parser: add test for quotes in comments 2013-04-02 22:27:04 +02:00
Philippe Virouleau
0a3d42c21e Fix scratchpad_show
Test if window is in scratchpad
    Test if function is called without criteria
    Updated testcase
2013-03-27 21:51:13 +01:00
oblique
8a4a719093 Add support for _NET_WM_STATE_DEMANDS_ATTENTION.
_NET_WM_STATE_DEMANDS_ATTENTION indicates that some action in or with
the window happened. It's a weaker hint than urgency flag of WM_HINTS,
but some applications and almost all Qt applications use it instead of
WM_HINTS' urgency flag (one example is Skype).
2013-03-09 10:55:13 +01:00
Michael Stapelberg
7ecdcb61f8 config: accept “smart” as popup_during_fullscreen parameter (Thanks supplantr)
This was the default, so explicitly setting it is not really necessary,
but of course it should be possible.

fixes #967
2013-02-24 17:23:37 +01:00
Michael Stapelberg
d5358a749e Merge branch 'master' into next 2013-02-19 00:28:05 +01:00
Michael Stapelberg
9bfe6a6236 Bugfix: Properly parse commands like “move workspace torrent” (Thanks rasi)
fixes #955
2013-02-19 00:27:55 +01:00
Michael Stapelberg
2922603cc4 tests: correctly close stdout with IPC::Run
while IPC::Run supports <&-, it does not support >&- apparently.
2013-02-19 00:26:00 +01:00
Michael Stapelberg
9cd2d1fb8a make t/205-ipc-windows require AnyEvent::I3 >= 0.15
Necessary due to the new event type
2013-02-18 10:59:32 +01:00
Piotr S. Staszewski
3facbbca5c Add a new IPC event for changes on windows.
Added new event id (I3_IPC_EVENT_WINDOW) so that a an IPC client can
subscribe to events on windows. Added a basic window event that gets
triggered when a window gets successfully reparented. This new event
also dumps the container data, so that IPC clients can get the initial
window name. IPC clients wishing to see window events should subscribe
to 'window'.
2013-02-18 10:55:11 +01:00
Sebastian Ullrich
49979c9d15 Always auto center on 'scratchpad show' if window hasn't been repositioned by the user
This change ensures a scratchpad window is still centered on the screen
if it has first been shown on another screen of a different
resolution. Moving or resizing the scratchpad manually disables this
behavior.
2013-02-18 10:38:28 +01:00
Michael Stapelberg
7f0065e1b1 tests: unset $ENV{SHELL} to avoid breakage with fish (Thanks dRbiG) 2013-02-15 16:41:28 +01:00
Mats
fa4301e06d Split workspace instead of changing orientation
Move all children of the workspace into a new container if there is more
than one otherwise simply change the orientation.

fixes #922
2013-02-15 03:16:02 +01:00
Sebastian Rachuj
b565bfca13 Bugfix: Do not move focus if a container is moved across outputs
fixes #809

This makes the moving behavior more consistent. If you want to focus the
workspace you are moving to, just chain the keybinding in your config
file:

    bindsym $mod+Shift+1 move workspace 1; workspace 1
2013-02-10 17:38:17 +01:00
Michael Stapelberg
a1774e78fc i3test: fix get_focused() docs (Thanks knopwob) 2013-02-07 15:57:15 +01:00
Sascha Kruse
0a0d66dc8a put common part of error messages into variable
This makes future changes easier when new tokens are added to the
parser.
2013-02-01 11:50:52 +01:00
Sascha Kruse
bbede97966 scratchpad_show focus unfocused scratchpad window
When there's an unfocused scratchpad window on the current workspace
scratchpad_show will focus that scratchpad window.
2013-01-30 13:33:55 +01:00
Michael Stapelberg
03693bf0cc add testcase for "move workspace <output>" 2013-01-30 13:31:20 +01:00
Vivien Didelot
1d22fe42f2 split main .gitignore and ignore more files
This patch splits the main .gitignore with a specific
testcases/.gitignore and also add 4 patterns to the ignore list:

  i3-command-parser.stamp
  i3-config-parser.stamp
  testcases/-
  testcases/i3-cfg-for-*
2013-01-26 19:30:10 +01:00
Michael Stapelberg
4796a61c31 add testcase for "move to output" wrapping 2013-01-26 19:28:11 +01:00
Francesco Mazzoli
3cd4b8c111 update tests to test the output wrapping 2013-01-26 19:08:41 +01:00
Adrien Schildknecht
76ef3a4ab8 remove the urgency indicator when a window is closed 2013-01-25 18:53:59 +01:00
Michael Stapelberg
a32d2d5d61 scratchpad: fix crash when moving last window of an invisible workspace (+test) (Thanks bafain)
It looks like the code which was removed with this commit was not
necessary anyways since con_move_to_workspace() by now checks on its own
whether it moves to the scratchpad.

fixes #913
2013-01-25 15:28:58 +01:00
Michael Stapelberg
c2061042e1 Merge branch 'master' into next 2013-01-25 13:56:26 +01:00
Michael Stapelberg
8bc771ac16 Bugfix: parse outputs as "word", not "string", to ignore trailing whitespace (Thanks leifarne)
fixes #921
2013-01-25 13:55:26 +01:00
Michael Stapelberg
2c249b6949 Merge branch 'master' into next 2013-01-01 16:31:27 +01:00
Michael Stapelberg
138e04fd4d Bugfix: Fix for_window moving of assigned windows (Thanks bafain)
fixes #909
2013-01-01 16:31:08 +01:00
Michael Stapelberg
6856b232d6 t/175-startup-notification: use the testcases X11 connection
This needs X11::XCB >= 0.07 and will be skipped if that is not
installed.

This fixes a race condition in the testsuite.
2012-12-27 18:02:23 +01:00
Michael Stapelberg
1b62feccac t/132-move-workspace: add missing sync_with_i3 2012-12-27 16:55:22 +01:00
Michael Stapelberg
baae706b87 t/166-assign: sync after mapping the window 2012-12-26 22:04:35 +01:00
Michael Stapelberg
c06d62887e t/173-regress-focus-assign: sync after mapping the window 2012-12-26 22:04:15 +01:00
Michael Stapelberg
4d65cfc67d t/189-floating-constraints: sync before getting window rects 2012-12-26 22:03:37 +01:00
Michael Stapelberg
27adbbff61 t/510-focus-across-outputs: fix sync order
syncing _after_ fresh_workspace makes no change, but we need to wait for
the WarpPointer request to be processed.
2012-12-26 22:03:02 +01:00
Michael Stapelberg
92e2190300 t/503-workspace: sync after switching focus to a different output 2012-12-26 22:02:43 +01:00
Simon Elsbrock
0045cfa637 move visible scratchpad window to focused workspace
If there is a visible scratchpad on another (non-internal) workspace,
bring it to the focused workspace instead of doing nothing.

closes #784
2012-12-24 19:20:47 +01:00
Michael Stapelberg
061d90f305 move scratchpad test to separate file, otherwise it is non-conclusive 2012-12-24 19:19:32 +01:00
Michael Stapelberg
ff9c2f0c46 new-test: add launch_with_config to multi-monitor template 2012-12-22 14:08:25 +01:00
Michael Stapelberg
a1ccca22e6 Merge branch 'master' into next 2012-12-22 14:08:14 +01:00
Michael Stapelberg
36b106a9d3 Bugfix: Ignore ConfigureRequests for scratchpad windows (Thanks MeanEYE)
fixes #898
2012-12-22 14:08:11 +01:00
Michael Stapelberg
3ca8299637 complete-run: clarify the message about missing ../i3 (Thanks Marcos) 2012-12-20 23:50:50 +01:00
Michael Stapelberg
6dfb08170c fix bind[code|sym] --release (Thanks paolo)
fixes #890
2012-12-14 21:41:56 +01:00
Michael Stapelberg
1ae08b196a Bugfix: Don’t move floating windows when their size constraints forbid resizing (Thanks aksr)
fixes #883
2012-11-27 09:26:31 +01:00
Adrien \"schischi\" Schildknecht
f41fa1baa1 The command to resize a floating window now checks the minimum and maximum size. 2012-11-25 20:52:56 +01:00
Michael Stapelberg
3cb909fa62 config parser: recover after invalid input
This is done by ignoring the rest of the current line and jumping to the
nearest <error> token.

fixes #879
2012-11-20 17:10:29 +01:00
Michael Stapelberg
773654dbb8 complete-run: run 000-load-deps as early as possible 2012-11-13 21:04:13 +01:00
Michael Stapelberg
5fb9b8ffb8 tests: 000-load-deps: bail out when dependencies are not found, test more of them
This should be a better hint for people who forgot to install the
testsuite dependencies :).
2012-11-13 21:03:44 +01:00
Michael Stapelberg
a3324a5e42 tests: 115-ipc-workspaces: ensure the i3 ipc socket is connected 2012-11-13 21:03:25 +01:00
Michael Stapelberg
e809bff1ab t/115: make the test a little shorter by using helper functions 2012-11-13 09:40:29 +01:00
Francesco Mazzoli
a6b6bb670a workspace events test 2012-11-13 09:40:29 +01:00
Michael Stapelberg
dece12bf18 Merge branch 'master' into next 2012-11-10 09:01:24 +01:00
Michael Stapelberg
81393c93c2 bugfix: fix workspace back_and_forth after displaying a scratchpad window
fixes #868
2012-11-10 09:01:04 +01:00
Quentin Glidic
783fd66b58 complete-run: Unset I3SOCK 2012-11-07 13:40:51 +01:00
Michael Walle
ae14fe9141 introduce new command to rename focused workspace
The corresponding command is 'rename workspace to <name>'. As a side-effect
this fixes the command 'rename workspace 1 to to'.

Signed-off-by: Michael Walle <michael@walle.cc>
2012-10-31 09:09:56 +01:00
Deiz
aefcb0b668 Skip floating windows in the focus stack when moving through the tree
Includes a test for the new behaviour
2012-10-16 20:03:40 +02:00
Deiz
c406b4c2fe Skip floating cons in focus (child|parent) and stop them from being split
Focusing child from a workspace should now skip over the floating con and
go directly to its child. Focusing parent from that grandchild should leave
the workspace focused again.
2012-10-16 20:01:36 +02:00
Deiz
47de7375dd Allow 'focus $dir' to move out of non-global fullscreen containers 2012-10-09 21:26:49 +02:00
Deiz
ca77c12dde Allow workspace contents to be moved if there are only floating children 2012-10-09 21:25:13 +02:00
Deiz
e07803999f Fix fullscreen focus bug and corresponding test flaw
As the workspace might be reached via recursion (e.g. moving from the edge
of a fullscreen split container), it's necessary to check for a fullscreen
container whenever a workspace is reached.
2012-10-09 21:24:04 +02:00
Michael Stapelberg
a06bf27c24 tests: fix error messages, add 'bind' as synonym to mode blocks 2012-10-09 14:11:35 +02:00
Michael Stapelberg
587b92b7a3 t/201-config-parser: test more directives, test error handling 2012-10-08 13:24:47 +02:00
Michael Stapelberg
a635945f85 tests: use new assign syntax, drop legacy test 2012-10-08 13:22:17 +02:00
Michael Stapelberg
00fca2dabd add first bits of a (custom) config parser 2012-10-08 13:17:46 +02: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
Deiz
fdcba7b91a Replace the discrete 'split' Con property with a simple function. 2012-10-04 17:48:08 +02:00
Deiz
d7e5da8b39 Un-fullscreen as needed when moving fullscreen containers
This avoids a case where a fullscreen container could be moved onto a
workspace that already had its own fullscreen container, leading to
two fullscreen containers on top of each other.
2012-10-04 17:46:54 +02:00
Michael Stapelberg
13147978c5 Merge branch 'master' into next 2012-10-03 15:08:31 +02:00
Sascha Kruse
507898484f set workspace_layout in create_workspace_on_output
fixes #835
2012-10-03 15:08:21 +02:00
Michael Stapelberg
85dc1b0865 testsuite: add 'new-test' helper script 2012-10-03 00:13:30 +02:00
Michael Stapelberg
029d9040e1 add test for previous commit 2012-10-03 00:04:05 +02:00
Deiz
e89a25f81f Implement moving workspaces as if they're regular containers 2012-09-29 00:17:36 +02:00
Michael Stapelberg
43d486441d Bugfix: with one ws per output, don’t crash on cross-output moves (Thanks moju)
fixes #827
2012-09-28 23:04:37 +02:00
Michael Stapelberg
66b389cba1 Make the resize command honor criteria (Thanks Tblue)
fixes #816
2012-09-28 20:36:25 +02:00
Michael Stapelberg
5d8e3f58f6 Fix 'border toggle' (it "skipped" 1px border) (Thanks joepd)
fixes #818
2012-09-28 19:29:14 +02:00
Simon Elsbrock
da2b47c1e5 fix crash: send non-floating window with floating parent to scratchpad (thanks pkordy)
Fix a crash that occured when moving a window to the scratchpad that is
seemingly floating to the user, but actually a descendant of a floating
parent con (and itself non-floating). If that is the case, move the
floating parent container to scratchpad instead of the window.

fixes #740
2012-09-28 17:58:58 +02:00
Michael Stapelberg
0610964c22 add testcase for commit 87525ad 2012-09-27 12:37:38 +02:00
Michael Stapelberg
c31b3b296a Bugfix: Correctly clear the urgency hint when the window is underneath a split-con (+test)
Previously, when you had an urgent container in a stack on some
invisible workspace (say urxvt) and you switched to it, the urgency hint
was not properly cleared.
2012-09-25 15:40:08 +02:00
Yaroslav Molochko
04c58c7325 Implement variable border widths for pixel/normal
fixes #325
2012-09-24 22:20:29 +02:00
Sascha Kruse
b741c49212 testcase for propagating urgency 2012-09-22 19:31:46 +02:00
Michael Stapelberg
1e143feab1 Close empty workspaces after cross-output move (+test) (Thanks chrysn)
fixes #795
2012-09-22 19:03:19 +02:00
Michael Stapelberg
11378b7012 t/506-focus-right: also verify that focus up/down is a no-op (Thanks swh) 2012-09-22 17:30:44 +02:00
Michael Stapelberg
19883108a9 Make get_output_next() work with non-aligned RandR setups (+test) (Thanks Feh, swh, Moritz)
A good visualization of the new algorithm is this:

           +--------+
           |        |
+--------+=|   S1   |========================
|        | |        |
|   S0   | +--------+
|        |         +--------+
+--------+=========|        |================
                   |   S2   | +--------+
                   |        | |        |
                   +--------+ |   S3   |
                              |        |
                              +--------+

When focus is on S0, 'focus output right' will first match S1 (the
closest output which overlaps in the highlighted area), then S2, but not
S3 (since S3 does not overlap into the highlighted area).

fixes #669
fixes #771
2012-09-22 16:54:59 +02:00
Michael Stapelberg
2fba607e4d tests: Bugfix: use exit_gracefully() in t/200-urgency-timer 2012-09-22 14:51:38 +02:00
Sebastian Ullrich
236f9f45e3 Make "[move] workspace number" accept a default ws name after the ws number 2012-09-22 14:34:05 +02:00
Michael Stapelberg
66d786762a tests: rename double t/198, add boilerplate 2012-09-22 14:20:19 +02:00
Michael Stapelberg
9dbbe400a1 tests: fix t/113-urgent.t after previous commit 2012-09-22 14:19:20 +02:00
Simon Elsbrock
28104a480c implement delayed urgency hint reset
If there is a client with an urgency hint on another workspace and
switching to this workspace would cause the urgency to be reset (by
moving the focusing to the client), delay the reset by some time. This
gives the user the chance to see it.

This commit adds the possibility to configure the urgency delay timer
duration using the 'force_display_urgency_hint' directive. Also,
documentation and a testcase was added to allow for automated checks of
the intended behavior.

fixes #482
2012-09-22 14:12:09 +02:00
chrysn
e15e37f922 fixes #776
this implements both the "move container to workspace back_and_forth" command
and movements to the same workspace when auto_back_and_forth is set.

it includes documentation and test suite additions by michael.

it also simplifies the workspace_show_by_name function (making use of
workspace_get accepting NULL pointers).
2012-09-22 13:35:31 +02:00
Michael Stapelberg
7a2e105931 tests: add testcase for the 'mode' IPC event 2012-09-22 13:20:53 +02:00
Michael Stapelberg
77134c0dbf tests: add missing boilerplate 2012-09-22 12:56:01 +02:00
Sascha Kruse
f9c903ba62 complete-run.pl: Check for missing executables 2012-09-20 11:37:49 +02:00
Michael Stapelberg
cd4dd365e8 Allow changing the layout of workspaces by storing it (Thanks mhcerri)
Before commit 4976fa3350, setting the
layout of workspaces to something else than the default would just mess
up the parent container of the workspace (the content container).

After that commit, it would create an unnecessary split container when
you change the layout _before_ opening any containers. To avoid this, we
now store the layout (similar to how the 'workspace_layout'
configuration directive works) and apply it when the first container is
attached to the workspace.

Fixes #796
2012-09-16 22:53:41 +02:00
Michael Stapelberg
794783defb Merge branch 'master' into next 2012-09-14 13:18:04 +02:00
Michael Stapelberg
15499bf8e7 Bugfix: Don’t focus the wrong workspace when moving to scratchpad (+test) (Thanks loblik)
The problem was that scratchpad_move() didn’t check whether the source
workspace was focused. Therefore, 'move scratchpad' only worked reliably
interactively , but not when used with criteria.
2012-09-14 13:17:32 +02:00
Michael Stapelberg
338199913b add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
Michael Stapelberg
d745b47269 fix typo 2012-09-10 14:08:52 +02:00
Michael Stapelberg
71607ccdd3 tests: document each and every i3test function 2012-09-10 13:30:47 +02:00
Michael Stapelberg
0626c637aa tests: move does_i3_live to i3test::Test 2012-09-10 13:29:50 +02:00
Michael Stapelberg
6bfbec9da3 tests: make cmp_float a real test instruction 2012-09-10 13:24:11 +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
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
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
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
Michael Stapelberg
6d8f61205d accept slashes in RandR output names (+test) (Thanks dbp)
fixes #785
2012-08-28 13:26:12 +02:00
Michael Stapelberg
82b73c20c9 testcase for the previous commit 2012-08-22 17:57:58 +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
Michael Stapelberg
4622cde7b7 Merge branch 'master' into next 2012-08-22 16:02:02 +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
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