Commit Graph

206 Commits (55a338c9199af25214893c20b381eb12c73d4553)

Author SHA1 Message Date
oblique a93e1e5c59 Ensure that resize will take place even if pixel is smaller than size increments.
fixes #1011
2013-04-15 20:59:51 +02: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
oblique e92dd1acc6 Obey WM_SIZE_HINTS's resize increments in floating 2013-02-14 19:38:26 +01:00
Francesco Mazzoli f13d8ed06f wrap when moving things to outputs with direction 2013-01-26 19:27:58 +01:00
Michael Stapelberg 74558bb33d Call scratchpad_show() when focusing scratchpad windows via criteria
fixes #931
2013-01-25 16:11:20 +01:00
Michael Stapelberg b3d7531947 refactor both i3-nagbar starts into src/util.c
With this change, libev >= 4 is a hard dependency. It should be present
in all major linux distributions (even the latest ubuntu LTS).
2012-12-24 16:53:20 +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
Michael Stapelberg 19cbd3cbec code style fixes for the previous commit
• our function names use underscores
• rewrote the function’s comment
• function comments must be in the source _and_ in the header
• no blank lines after function signatures
2012-11-25 20:55:49 +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 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
Michael Stapelberg 29b19a7468 spelling error: s/implementaiton/implementation/g 2012-10-24 07:58:03 +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 2738f13798 move owindow definition into the command parser 2012-10-08 13:26:24 +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
Yaroslav Molochko 04c58c7325 Implement variable border widths for pixel/normal
fixes #325
2012-09-24 22:20:29 +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 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
Sebastian Ullrich 236f9f45e3 Make "[move] workspace number" accept a default ws name after the ws number 2012-09-22 14:34:05 +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 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
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
Sebastian Ullrich eadf1e306f Fix 'back and forth' in 'workspace number' for named ws 2012-08-22 17:57:32 +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
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 a7569e6a98 implement error messages when moving to another ws fails (Thanks eeemsi)
fixes #769
2012-08-13 01:57:39 +02:00
Michael Stapelberg 884627ef20 use I3__FILE__ for DLOG, leave __FILE__ as is
See also commit 0e752070ac, which broke
source code listings in gdb unless you cd into i3/src. This should give
us best of both :-).
2012-08-12 12:19:47 +02:00
Michael Stapelberg 0e752070ac explicitly set filenames to $(basename __FILE__)
This makes the debug log a bit more readable, especially since commit
48f1e383ca
2012-08-07 09:55:52 +02:00
Michael Stapelberg 1b2d222449 Properly report errors in 'focus parent' (Thanks eeemsi)
Also, make X11 errors debug log level only. They are harmless usually.

fixes #762
2012-08-05 20:57:20 +02:00
Michael Stapelberg 8a1c8115ca fix a few warnings/places where the clang static analyzer complains 2012-08-05 16:34:38 +02:00
Michael Stapelberg fb4ee17b05 Merge branch 'master' into next 2012-08-04 16:10:37 +02:00
Michael Stapelberg e36674c5b8 Fix a crash when the current output cannot be determined (Thanks Tucos)
This is only a cosmetical change though, the fix for the root cause can
be found in the commits following this one.
2012-08-04 15:19:11 +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 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 a97e70d483 Merge branch 'master' into next 2012-07-22 21:26:00 +02:00
Michael Stapelberg 83dc5d5cb6 Bugfix: Fix duplicate return value for 'resize' command 2012-07-22 21:25:38 +02:00
Michael Stapelberg c5d0472158 Explicitly disconnect in the 'exit' command
This fixes a race condition when running the tests. I think that the X11
server has more time to clean up the resources when we do an explicit
disconnect. The symptom I was seeing was that sometimes, i3 couldn’t
become the window manager on one of the Xdummy instances.
2012-06-29 23:13:25 +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
Pavel Löbl 51173baf28 Fix 'move to workspace' when used with criteria
When moving window from other (not current) workspace to another
workspace with criteria we should stay on current workspace.

And we should exit early when criteria was specified but didn't
match any window.
2012-06-03 19:41:45 +02:00
Pavel Löbl 4611f875ff Fix a mistake in comment 2012-06-03 19:38:43 +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
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
Ondrej Grover edae08a4d9 maybe_back_and_forth now sets render_tree 2012-05-09 20:38:41 +02:00
Michael Stapelberg 42dcb4e8c4 make maybe_back_and_forth static 2012-05-09 20:34:40 +02:00