Commit Graph

785 Commits (9571200baa387eb0b4b0e8afd9d540175a95adc5)

Author SHA1 Message Date
Tony Crisci 0514be8d4b Handle EWMH requests to change current desktop
This request is used by pagers and bars to change the current
desktop likely as a result of some user action. We interpret this as
a request to focus the given workspace.

for more information see:

http://standards.freedesktop.org/wm-spec/latest/ar01s03.html#idm140251368135008
2014-07-10 22:39:42 +02:00
Tony Crisci 196e748e94 bugfix: default floating border regression
Fixes a bug where a normal floating default border is not applied when
the default tiling border is set to a pixel value.

This bug was introduced in this commit:

43b447855d

Consider motif border for floating geometry

Fixes a comment that claimed default floating border could override
motif hints, which was never the case.

fixes #1305
2014-07-10 22:32:27 +02:00
Tony Crisci b7f4ac769b Add testcase for EWMH desktop viewport
Test that the EWMH specified property _NET_DESKTOP_VIEWPORT is updated
properly on the root window. We interpret this as a list of x/y
coordinate pairs for the upper left corner of the respective outputs of
the workspaces.

This test is for this commit:

feature: implement ewmh desktop viewport property

4205973135
2014-07-10 22:31:46 +02:00
Michael Stapelberg 704ccb1d25 tests: include error message when unable to create a FIFO
I have seen this message once or twice, but since the actual error
message was not included, I cannot definitely say what’s going on.

I think it might be a race condition where the file with the specified
tmpname() already exists, but let’s be sure before we attempt to fix it.
2014-07-10 22:30:45 +02:00
Tony Crisci 1c81216a72 Add testcase for EWMH desktop names
Test that the EWMH specified property _NET_DESKTOP_NAMES is updated
properly on the root window. We interpret this as a list of the open
workspace names.

This test is for this commit:

Implement EWMH desktop names

a9c094b731
2014-07-10 22:29:03 +02:00
Tony Crisci 7381b50587 Make absolute floating move work with criteria
Make commands of type `move [window|container] [to] [absolute] position
<px> [px] <px> [px]` work with command selection criteria.

fixes #1301
2014-07-02 19:07:08 +02:00
Michael Stapelberg 2d28273cac Merge branch 'master' into next 2014-06-28 13:01:48 +02:00
Tony Crisci 7afe9cc78b Explicitly set current border width when BS_PIXEL
When a window becomes managed, if the config specifies a pixel border
style, explicitly set the current border width so it does not change
when the container changes from tiling to floating.

fixes #1266
2014-06-28 13:00:59 +02:00
Michael Stapelberg 01a2c5a3f1 Merge branch 'master' into next 2014-06-27 09:05:32 +02:00
Michael Stapelberg c159fc4197 Bugfix: create the directory for storing the restart state (Thanks hjem)
fixes #1303
2014-06-27 09:04:51 +02:00
Tony Crisci 136b3e345b Handle WM_CHANGE_STATE requests for iconic state
http://tronche.com/gui/x/icccm/sec-4.html#s-4.1.4

 > IconicState - The client's top-level window is iconic (whatever that
 > means for this window manager). The client can assume that its
 > top-level window is not viewable, its icon_window (if any) will be
 > viewable and, failing that, its icon_pixmap (if any) or its
 > WM_ICON_NAME will be displayed.

For these requests, we just close the window.

fixes #1279
2014-06-24 09:39:12 +02:00
Tony Crisci 14ec68526b Cross-output focus focus floating exception
Focusing across outputs with `focus [direction]` should focus an
existing floating con when no tiling con exists on the output in
[direction].
2014-06-24 09:05:39 +02:00
Tony Crisci 682fb0a291 Implement the window::urgent event
The window::urgent event is emitted when a container becomes urgent or
loses its urgent status.
2014-06-24 09:04:45 +02:00
Michael Stapelberg a6c6e3e3a0 Merge branch 'master' into next 2014-06-24 09:01:59 +02:00
Tony Crisci 1d100d6e16 Bugfix: don't focus unmapped container on manage
A window may become unmapped on manage when an assignment command unmaps
the window, such as moving it to the scratchpad or killing it.

This can cause i3 focus to be an unmapped window and different than X
focus which can lead to complications

fixes #1283
2014-06-24 09:01:04 +02:00
Tony Crisci cbd51ce664 Workspace command number selection
If a `workspace {N}` or `move to workspace {N}` command is given with N
as a plain number, the workspace of this number is selected for the
context of the command if one exists and there is no workspace with a
name that exactly matches N.
2014-06-23 21:30:07 +02:00
Tony Crisci babfb779d7 Implement the window::floating event
The window::floating event should be emitted when a window transitions
to or from the floating state.
2014-06-23 21:18:12 +02:00
Tony Crisci c2b6b06da7 Make command `move [direction]` work with criteria
A container selected with criteria should be moved with the `move
[direction]` command, instead of this command always acting on the
focused container.
2014-06-23 21:17:27 +02:00
Tony Crisci cf6cc134b8 Implement the window::move event
The window::move event should be emitted when the window moves position
in the tree.
2014-06-19 13:00:17 +02:00
Tony Crisci 25ca78bbba Implement the window::close event
The window::close event should be emitted when a window closes.
2014-06-19 12:59:25 +02:00
Michael Stapelberg 0bc73f526d tests: explicitly set input hint
Since i3 honors the “Globally Active Input” focus model, we need to
explicitly state that we are not using that in our testcases :).

This requires X11::XCB from git to work (commit
71b25dcaafc509e710b8fd7de20c97ac3549fc39).
2014-06-19 12:17:39 +02:00
Tony Crisci 8a618e4b00 bugfix: don't set input focus if not accepted
http://tronche.com/gui/x/icccm/sec-4.html#s-4.1.7

> Clients using the Globally Active model can only use a SetInputFocus request
> to acquire the input focus when they do not already have it on receipt of one
> of the following events:
> * ButtonPress
> * ButtonRelease
> * Passive-grabbed KeyPress
> * Passive-grabbed KeyRelease

Since managing a window happens on a MapNotify (which is absent from this
list), the window cannot accept input focus, so we should not try to focus
the window at all.

Fixes an issue with xfce4-notifyd which (correctly) declines focus when
we send WM_TAKE_FOCUS, which puts i3 in a state where i3 focus and X
focus are different when a notification appears.
2014-06-19 11:55:28 +02:00
Michael Stapelberg 893dbae4b1 Bugfix: don’t overwrite the window’s geometry after restarting
fixes #1263
2014-06-13 22:29:47 +02:00
Michael Stapelberg e69fcbb17b Bugfix: ensure floating windows don’t drop out of fullscreen when restarting
fixes #1263
2014-06-13 22:26:06 +02:00
Michael Stapelberg 2e4a2d4f30 Bugfix: don’t overwrite the original size of floating windows when changing border style
fixes #1263
2014-06-13 22:19:23 +02:00
Michael Stapelberg 0552fd5666 Bugfix: fix crash when using multiple for_window statements that move windows (Thanks Antonio)
fixes #1257
2014-06-12 09:32:55 +02:00
Michael Stapelberg 94574db6f6 cleanup temporary directory when restarting and not using XDG_RUNTIME_DIR
fixes #1253
2014-06-11 09:17:43 +02:00
Michael Stapelberg 26460c091a delete ipc socket when exiting, cleanup tmpdir
fixes #1253
2014-06-08 22:13:43 +02:00
Michael Stapelberg 7b06e20105 tests: fix a few racy testcases by adding sync_with_i3 calls 2014-06-01 11:48:10 +02:00
Tony Crisci b4507da713 Set EWMH active window to None when none has focus
_NET_ACTIVE_WINDOW:

> The window ID of the currently active window or None if no window has
> the focus.

This fixes a bug that would not update _NET_ACTIVE_WINDOW when focus
changed to an i3 container without a window such as a branch or
workspace content container.
2014-06-01 11:45:59 +02:00
Atte Peltomaki 62ea60ba42 Add configuration option for disabling mouse warping
This patch adds a new configuration option "mouse_warping [output|none]".

When mouse warping is disabled, mouse cursor does not jump to middle of current
screen when changing workspaces between multiple outputs. This introduces a
"special" cursor state, where focus is in one window and cursor on another.
Useful for eg. scrolling a web page with mouse wheel while typing into another
window on keyboard.
2014-05-31 14:55:29 +02:00
Tony Crisci f41e81bd96 Feature: Workspace assignment by number
Workspace assignments with bare numbers assign all workspaces with that
number to the specified output.

Workspace assignment by number is overridden by workspace assignment by
name.
2014-05-20 20:15:55 +02:00
Tony Crisci c79309eba8 Fix test 517
Test 517 was sometimes failing because the command to reset the test
generates a focus event which was not being properly ignored.

Now the correct event should always be tested.
2014-05-20 19:59:49 +02:00
Aleksi Blinnikka 89dd868e82 Separate border width for floating windows
Floating windows already had their own border style, but the width was
the same for all windows.

The configuration directives 'new_window' and 'new_float' can now be
used simultaneously to have different border widths for floating and
tiled windows.

fixes #1244
2014-05-16 17:59:21 +02:00
Tony Crisci e707e0a5fa i3bar: implement custom workspace numbers config
Implement the configuration option within the bar config directive for
custom workspace numbers with the directive `strip_workspace_numbers
yes`.

This directive strips the workspace name of the number prefix and
delimiter. When the workspace name consists only of the number, it will
default to show the number.

For example:

* "2:5" -> "5"
* "4:$" -> "$"
* "8" -> "8"

This allows customization of i3bar for alternate ordering of workspaces
which has a legitimate use for alternate keyboard layouts such as
Dvorak.

fixes #1131
2014-05-16 17:55:30 +02:00
Tony Crisci 22b4215d92 Feature: improve active window request handling
Allow client requests of type _NET_ACTIVE_WINDOW to switch workspaces if
they indicate they are a pager. Otherwise, set the urgency hint on that
con to indicate that something happened.

This allows task switchers like skippy-xd to work properly.

http://standards.freedesktop.org/wm-spec/latest/ar01s03.html#idm140251368127856
2014-05-03 15:57:43 +02:00
Marco Hunsicker 7170afc2c7 Test workspace empty event semantics
This patchs provides testcases for the workspace "empty" event.
2014-05-03 15:37:25 +02:00
Tony Crisci 4126c87daf Dont include dock clients in ewmh lists
http://standards.freedesktop.org/wm-spec/latest/ar01s03.html#idm140251368149456

The _NET_CLIENT_LIST property of the root window:

> These arrays contain all X Windows managed by the Window Manager.

Dock clients are not managed windows, so they should not be included in
_NET_CLIENT_LIST or _NET_CLIENT_LIST_STACKING.
2014-05-03 15:08:31 +02:00
Michael Stapelberg dba8c91eff add a testcase for the previous commit (internal workspaces) 2014-05-03 15:00:49 +02:00
Tony Crisci 8146638320 Implement the window::fullscreen_mode event
The fullscreen_mode event is a window with the "change" property set to
"fullscreen_mode". This event should be emitted whenever a window enters
or exits fullscreen mode.

This event can be used to turn off dpms off when a window is fullscreen
or display the fullscreen container name in the status line for
instance.
2014-04-30 09:35:31 +02:00
Tony Crisci ea551e4d99 Bugfix: resize window check should check for null
When checking the window type for a resize command, first check to see
if the window property is null before checking whether or not it is a
dock window. The window may be null in the case it is a branch
container.

fixes #1220
2014-04-26 12:10:05 +02:00
Tony Crisci 05f0585817 Dont set input focus and send WM_TAKE_FOCUS
If input focus is set by the window manager, it is not necessary to send
WM_TAKE_FOCUS because it has already taken focus.

http://tronche.com/gui/x/icccm/sec-4.html#s-4.1.7

> The goal is to support window managers that want to assign the input
> focus to a top-level window in such a way that the top-level window
> either can assign it to one of its subwindows or can decline the offer
> of the focus. For example, a clock or a text editor with no currently
> open frames might not want to take focus even though the window
> manager generally believes that clients should take the input focus
> after being deiconified or raised.

Both setting input focus and sending WM_TAKE_FOCUS is effectively
setting focus on the window twice which is certainly against the spirit
of the spec, if not the letter.

fixes #1167
2014-04-15 17:46:08 +02:00
Tony Crisci 819bc09375 Maintain the _NET_CLIENT_LIST property
Add and update the _NET_CLIENT_LIST property on the root window to
better comply with ewmh standards.

Information on this property can be found here:
http://standards.freedesktop.org/wm-spec/latest/ar01s03.html

> These arrays contain all X Windows managed by the Window Manager.
> _NET_CLIENT_LIST has initial mapping order, starting with the oldest window.

fixes #1099
2014-04-15 17:44:25 +02:00
Michael Stapelberg e84fa22bb8 Fix t/158-wm_take_focus, it was not properly verifying events (Thanks TonyC)
See also http://cr.i3wm.org/patch/500 for TonyC’s patch. This version
reduces code duplication.
2014-04-09 21:47:32 +02:00
Tony Crisci fe5103e8e1 Test 222: call exit_gracefully
Not calling exit_gracefully causes some other test to fail during a
complete_run sometimes.
2014-03-21 19:21:19 +01:00
Tony Crisci 1263d2c0e8 Test 175: use BAIL_OUT instead of `die`
BAIL_OUT produces a friendlier message explaining why the tests cannot
continue on the command line. `die` produces a cryptic message that some
test failed for some reason.
2014-03-21 19:21:14 +01:00
Michael Stapelberg c23db20cb5 Merge branch 'master' into next 2014-03-15 18:05:45 +01:00
Tony Crisci a6a6c9b6d9 Bugfix: don't try to resize docks by command
cmd_resize does not implement a method to resize dock clients.

A command like `[instance=".*"] resize grow width 160 px or 16 ppt`
when a dock client matched would crash i3.

fixes #1201
2014-03-15 18:05:42 +01:00
Tony Crisci 9b03be644f Add valgrind suppression file to testcases
The suppression file makes valgrind output more readable by hiding
reports of memory leaks for GObject-related initialization functions in
Pango and Cairo.
2014-03-10 17:37:41 +01:00
Tony Crisci 0711f5ab4e Add test for floating types
Add a test that verifies that windows with properties that indicate they
should be floating are indeed opened floating.
2014-03-08 21:00:50 +01:00
Marco Hunsicker 00ee86de79 Send IPC window events for focus and title changes
This patch fixes ticket #1168 to extend the window IPC event mechanism
to send IPC events for window focus and title changes. The newly added
window events use the same format as the already established "new"
event.

Specifically this patch:

* Moves the ipc_send_window_event() function from src/manage.c into
  src/ipc.c and adds an argument for the change property of the event
* Updates src/manage.c to use the new function signature. To ensure
  that the "new" event does not send the same event data as the
  "focus" event, setting focus now happens after the "new" event
  has been sent
* Adds IPC focus event notification to src/x.c. To workaround a problem
  during window close when accessing the window name, a function has been
  added to query whether a window is actually attached to its parent. To
  avoid obsolete focus notification, a new field has been added to keep
  track of the focus without any interference by the click handling
* Adds IPC title event notification to src/handlers.c. To avoid
  obsolete title notification, a function has been added to determine
  whether a window title has actually changed
* Updates the IPC documentation to include the new events
* Updates testcases/t/205-ipc-windows.t to include the "focus" event
  in order to ensure the correct event sequence
* Adds two new unit tests, b/testcases/t/219-ipc-window-focus.t and
  b/testcases/t/220-ipc-window-title.t to ensure proper "focus" and
 "title" events
2014-02-26 22:24:19 +01:00
Michael Stapelberg 07d583d780 tests: sync_with_i3 before warping pointer
To be honest, I’m not entirely sure where the race condition originates
from, but when making sure that there are no pending events
(which is what sync_with_i3 accomplishes) before warping the pointer, we
have less flaky testsuite runs.

closes #1189
2014-02-25 20:44:17 +01:00
Michael Stapelberg 62a4237ed0 t/130-close-empty-split: clean up old workspace
This hopefully increases the reliability of the test. Empty containers
created by “open” sometimes get spurious UnmapNotify events, and in at
least one run, this test failed because of such an event.
2014-02-13 21:05:42 +01:00
Tony Crisci 6ae4ecb1de Bugfix: `tree_split` should not split floating cons
Use the more robust test of `con_is_floating` for testing a container
for being floating.

fixes #1177
2014-02-08 20:59:23 +01:00
Steve Jones 0e27ff3cd0 Set EWMH desktop properties on startup.
Calls ewmh_update_current_desktop on startup to set the
_NET_CURRENT_DESKTOP property. Without this change the property only
gets set after the workspaces have been manipulated. Also exclude
hidden workspaces (i.e. those starting with "__" from the workspace
index.

Adds tests for startup and workspace switching.
2014-02-08 20:38:16 +01:00
Michael Stapelberg 10d7c1a993 Merge branch 'master' into next 2014-01-13 23:36:47 +01:00
Tony Crisci 7639337716 Bugfix: `move <direction>` sends workspace focus
Make sure the command `move <direction>` properly sends the workspace
focus ipc event required for i3bar to be properly updated and redrawn.

Make `ipc_send_workspace_focus_event publicly available from ipc.h for
more flexible event sending.
2014-01-13 23:36:31 +01:00
Tony Crisci aa11c03d4c Movement into a branch considers movement direction
Change the behavior of movement into a branch with respect to the
position the moving con will be placed within the branch when the
movement is complete.

The correct position is determined by the direction of movement or the
position of the focused-inactive container within the branch.

If the direction of movement is the same as the orientation of the
branch container, append or prepend the container to the branch in the
obvious way.  If the movement is to the right or downward, insert the
moving container in the first position (i.e., the leftmost or top
position resp.) If the movement is to the left or upward, insert the
moving container in the last position (i.e., the rightmost or bottom
position resp.)

If the direction of movement is different from the orientation of the
branch container, insert the container into the branch after the
focused-inactive container.

fixes #1060
2014-01-06 22:26:23 +01:00
Michael Stapelberg 81fd4ec71c add testcase for #1149 2014-01-05 20:37:42 +01:00
Michael Stapelberg 9daf0d8b2b t/215-layout-restore-crash: fix test description 2014-01-04 21:57:35 +01:00
Michael Stapelberg 90e7c5c18a tests: add t/215-layout-restore-crash.t for the last couple of commits 2014-01-04 21:39:33 +01:00
Michael Stapelberg 318b089e6d fix test after renaming role to window_role 2013-12-22 21:52:49 +01:00
Michael Stapelberg ef7b3e5464 allow parsing multiple nodes from a json layout 2013-12-22 21:52:49 +01:00
Michael Stapelberg 6800524f2e GET_TREE: serialize container type into a string
So far, this was blessed for internal use only (by virtue of not being
in the documentation), but we want to expose it for the stored layouts.
2013-12-22 21:52:49 +01:00
Michael Stapelberg 58297f4ab5 layout restore: support more criteria, match only once (+test) 2013-12-22 21:52:49 +01:00
Michael Stapelberg 4add185025 tests: add simple layout restore test 2013-12-22 21:52:49 +01:00
Michael Stapelberg b2c91f54ab Merge branch 'master' into next 2013-12-21 21:32:55 +01:00
Michael Stapelberg 85321bdf1d Bugfix: ignore _NET_ACTIVE_WINDOW for scratchpad windows (Thanks mistnim)
fixes: #1136
2013-12-21 21:32:23 +01:00
Tony Crisci 5a69bffbd6 Remove pointer warp from test boilerplate
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).
2013-12-10 21:52:50 +01:00
Tony Crisci 1b640ae3be Testcases: init pointer in a predictable position
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.
2013-12-04 19:51:05 +01:00
Tony Crisci 18ad1fd4de Refactor and improve test 514
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).
2013-12-04 19:50:35 +01:00
Michael Stapelberg ca39289e3e t/516-move: use window id, fix typo 2013-11-19 20:28:32 +01:00
Tony Crisci 9f955a1e01 Command 'move <direction>' moves across outputs
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.
2013-11-19 20:26:52 +01:00
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