Commit Graph

79 Commits (e68a8dd86c34db800a2b5643c94b292ad191a708)

Author SHA1 Message Date
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 fb4ee17b05 Merge branch 'master' into next 2012-08-04 16:10:37 +02:00
Michael Stapelberg d57d51da6d Bugfix: Properly fix floating coordinates when disabling outputs (Thanks Tucos)
Since the content containers are not yet updated (they will be when
rendering), we need to use the output containers’s rects instead.
2012-08-04 16:09:16 +02:00
Michael Stapelberg e867fd8105 Bugfix: fix floating coordinates when moving assigned workspaces 2012-08-04 16:09:10 +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 206b96202c Use (void) instead of () for functions without args (Thanks fernandotcl)
See also:
http://article.gmane.org/gmane.linux.kernel/1268792

The C compiler will handle (void) as "no arguments" and () as "variadic
function" (equivalent to (...)) which might lead to subtle errors, such
as the one which was fixed with commit 0ea64ae4.
2012-03-31 10:53:04 +02:00
Fernando Tarlá Cardoso Lemos a22f161ab5 If moving the last ws, create a new one in its place.
This seems better than refusing to move the last workspace.
2012-02-15 17:59:33 +00:00
Michael Stapelberg c1e0c38b27 randr: Skip workspaces which are assigned to a different output when creating a new workspace
If you had workspace 1, 2, 3, 4 on LVDS1 and you enabled HDMI2 (where workspace
1 to workspace 5 are assigned to HDMI2), i3 would look for a new workspace for
LVDS1 (since all workspaces were moved), create workspace 5, move that over due
to assignment and then create workspace 6. Effectively, you would end up with
an empty workspace 5.
2012-02-07 21:10:16 +00:00
Fernando Tarlá Cardoso Lemos 8cffde232f Don't migrate unfocused empty workspaces when disabling output.
This is more similar to what happens when you close the last client
of an unfocused workspace (the workspace gets reaped).
2012-02-07 20:45:14 +00:00
Michael Stapelberg 36464c7a54 Merge branch 'master' into next 2012-01-29 18:02:48 +00:00
Fernando Tarlá Cardoso Lemos 55525015cc Fix coords of floating containers when the output is disabled.
This prevents floating containers from "disappearing" when their
associated output is disabled. Thanks Michael for the advice.
2012-01-29 18:02:27 +00:00
Michael Stapelberg fabcd7d911 Merge branch 'master' into next 2012-01-21 15:08:36 +00:00
Michael Stapelberg 077d2433a7 Bugfix: Fix coordinates when the rect of an output changes (Thanks Paul)
Fixes #623
2012-01-21 15:07:53 +00:00
Michael Stapelberg 6df971d5d5 Ignore next_on_output/prev_on_output when looking for the first workspace 2012-01-08 16:31:07 +00:00
Michael Stapelberg d25e77ce75 Don’t set the _NET_WM_WORKAREA hint at all (Thanks cg)
Fixes: #539
2011-11-30 20:33:07 +00:00
Michael Stapelberg d686f2f873 Bugfix: Don’t create a workspace named "back_and_forth" on startup
Fixes #565
2011-11-26 22:24:30 +00:00
Michael Stapelberg 227a58b0c3 Bugfix: Fix startup when RandR is not present 2011-11-24 23:49:35 +00:00
Michael Stapelberg 2b6504d310 Bugfix: RandR: Correctly keep focus on the focused workspace when an output disappears (Thanks AlexanderB, xeen) 2011-10-31 12:11:34 +00:00
Michael Stapelberg 9d15a00ba8 introduce sasprintf() in libi3, use it everywhere 2011-10-23 13:16:56 +01:00
Michael Stapelberg 42d355f2b7 normalize modelines/headers across src/*.c 2011-10-22 23:40:02 +01:00
Michael Stapelberg 0f74f9b921 remove left-over type definition for mode_info 2011-10-09 18:25:21 +01:00
Noe Rubinstein 92cc4494aa refactor workspace_show and friends 2011-10-02 21:57:00 +01:00
Michael Stapelberg 1717b88174 Merge branch 'master' into next 2011-09-22 20:11:44 +01:00
Michael Stapelberg 4dbda73114 Bugfix: Correctly revert focus to other floating windows when closing a floating window
Uncovered by the testsuite \o/
2011-09-22 20:10:51 +01:00
Michael Stapelberg 8928b5f55d Bugfix: Correctly handle workspace names which do not start with a zero 2011-09-05 22:21:10 +02:00
Michael Stapelberg 7c6f693c8a Bugfix: Don’t consider the workspace next/prev command when looking for named workspaces
Fixes #469
2011-08-17 12:28:45 +02:00
Michael Stapelberg 99ba193ce7 Bugfix: the up/down directions were swapped
Also compare 'output' and 'current' in the same order in both parts of the
condition to make the comparison more clear.
2011-08-07 15:46:24 +02:00
Peter Bui a547365a88 Implement switching focus across screens.
Modify _tree_next() so that when we reach the workspace container:

1. Find the next corresponding output (screen) using the added
get_output_next().

2. If there is another output, find the visible workspace.

3. Call workspace_show on found workspace.

4. Find the appropriate window to focus (leftmost/rightmost, etc.) using
con_descend_direction, and then focus it.

I've only tested on horizontal monitors (left/right).
2011-08-07 14:33:07 +02:00
Michael Stapelberg d0741975f1 Bugfix: Use the appropriate number when assigning numbered workspaces in randr.c 2011-08-04 00:10:23 +02:00
Michael Stapelberg 9800d5286f Bugfix: Correctly check if the workspace already exists 2011-08-03 12:18:30 +02:00
Michael Stapelberg dcba8024de also handle quoted workspace names, extend t/72 for that 2011-08-03 03:33:12 +02:00
Michael Stapelberg 0092b245a1 Bugfix: When looking for an unused workspace, try the named workspaces first
Fixes: #449
2011-08-03 03:08:59 +02:00
Michael Stapelberg d3e3339a05 Bugfix: Fix small memory leak when initializing output Cons 2011-07-31 17:11:51 +02:00
Michael Stapelberg ffe297f5e5 Bugfix: use the global root variable, don’t get the first one (Thanks quaec) 2011-07-23 22:29:01 +02:00
Michael Stapelberg b35ff6a7c9 Bugfix: Correctly attach new output cons to the root con (Thanks mseed) 2011-06-11 14:36:09 +02:00
Michael Stapelberg 1585d942ea Make workspace_layout handle all cons at workspace level, not only the first one (+test)
This makes opening new windows on workspace level and moving windows to the
right/left more like in the old i3.
2011-06-02 17:21:38 +02:00
Michael Stapelberg 97e45b9cfc Bugfix: RandR: Correctly assign focused workspaces to outputs
Fixes: #399
2011-05-29 14:39:41 +02:00
Michael Stapelberg d3e458bc78 Remove old code from randr.c and workspace.c 2011-05-14 22:38:19 +02:00
Michael Stapelberg 5db97dc473 Bugfix: Fix initialization / assignments when RandR is missing 2011-05-14 22:34:34 +02:00
Michael Stapelberg 3f45d3c447 re-implement assignments of workspace to specific outputs 2011-05-14 22:19:58 +02:00
Michael Stapelberg 167bdd26b7 Argument for 'kill' for killing a specific window (now default) or the whole client (+test)
Use 'kill window' to kill a specific window (for example only one specific
popup), use 'kill client' to kill the whole application (or X11 connection to
be specific).
2011-05-13 20:41:03 +02:00
Michael Stapelberg 28b9ed6eb3 Bugfix: Ensure that all outputs have a ->con before handling disabled outputs (Thanks JimdiGriz)
Steps to reproduce:
• xrandr --output VGA1 --auto
• xrandr --output LVDS1 --off
2011-04-27 10:18:46 +02:00
Michael Stapelberg e835888a9e Bugfix: Actually re-attach dock clients when outputs get disabled (Thanks phnom)
Fixes: #348
2011-03-20 01:07:21 +01:00
Michael Stapelberg eeb5bdd66f cleanup code of workspace rotation on output changes 2011-03-17 17:53:56 +01:00
Simon Kampe 2f992f5c0e Added config key for default orientation of containers (new_container_orientation) and added support in randr.c for automatically changing the orientation when user does a xrandr rotate. 2011-03-17 17:43:35 +01:00
Fernando Tarlá Cardoso Lemos c0563af3e2 Bring back some more EWMH support. 2011-03-14 17:11:33 +01:00
Michael Stapelberg ffc71859a3 Implement support for top/bottom dock clients (according to _NET_WM_STRUT_PARTIAL or requested position) 2011-02-21 14:27:32 +01:00
Michael Stapelberg a92b9dca73 Bugfix: fix disabling RandR outputs 2011-02-21 01:43:39 +01:00
Michael Stapelberg a33d869885 Bugfix: Correctly open workspaces on additional outputs 2011-02-21 01:12:22 +01:00