Remove the line to warp the pointer to (0, 0) in `new-test` helper
script, which is used to create new tests.
Since 4.6-g0634766, testcases may assume at the start of the test that
the pointer begins at position (0, 0).
Tests may disturb the pointer in their normal operation that may lead to
unexpected results in later tests using that display. Reset the pointer
before a test begins to (0, 0) to save test developers from related
"gotchas" and reduce multi-monitor test boilerplate.
Split test 514's assertion into three assertions to make it more
explicit what is being tested, and why a run might fail.
Move critical test code out of the event handler to clarify flow and
allow a query of the actual current workspace to use in assertions.
Works around an issue which caused this test to fail spurriously because
of pointer-related quirks in the i3 test suite which would sometimes
cause i3 to open on workspace 2 (However, the test is now agnostic to
the initial workspace or output).
When 'move <direction>' is issued in the context of a container that
borders a workspace, and there is no suitable place within this
workspace for which this container can move, move the container to the
closest output in this direction instead.
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.
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.
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
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.
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.
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.
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.
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.
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.
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
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.
_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).
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'.
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.
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
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-*
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
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>
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.
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.
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.
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.
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
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.
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#669fixes#771
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
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).
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
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.
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
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