Commit Graph

65 Commits

Author SHA1 Message Date
Michael Stapelberg 334e41daa4 bugfix: don’t assume a workspace always has tiling cons when focusing (Thanks mseed) 2011-01-27 16:51:16 +01:00
Michael Stapelberg 3383437705 refactor some places to use con_descend_focused instead of duplicating code 2011-01-27 16:09:14 +01:00
Fernando Tarlá Cardoso Lemos 432563d6e7 Fix the percentages when moving containers. 2011-01-27 13:00:14 +01:00
Fernando Tarlá Cardoso Lemos bc82fc7e9f This parameter is no longer needed.
The algorithm is now always the same, doesn't matter if we're
adding or removing a container to/from its parent.
2011-01-27 13:00:14 +01:00
Fernando Tarlá Cardoso Lemos a93f4643ec Only fix the percentages after we insert the container.
This is what floating.c does and it allows us to unify the logic that
calculates those percentages.
2011-01-27 13:00:14 +01:00
Michael Stapelberg 3fe4146e24 Bugfix: fix crash in tree_flatten (Thanks mseed) 2011-01-19 09:31:31 +01:00
Michael Stapelberg d6d4c962f4 Bugfix: Call mark_unmapped() on floating nodes aswell (Thanks mseed)
This fixes #292.
2011-01-17 14:11:56 +01:00
Michael Stapelberg 83f6e445a0 Bugfix: Don’t use ->old_parent for floating cons (Thanks eelvex)
Instead, we attach them to their workspace when toggling back to tiling. This
makes more sense; afterall, floating clients are always directly below a
CT_WORKSPACE container.
2011-01-08 00:44:03 +01:00
Michael Stapelberg 54b9549713 Bugfix: Look for cons to focus *starting* at the ws, not beneath the ws (Thanks mseed)
This should fix #286.
2011-01-08 00:10:49 +01:00
Michael Stapelberg 115462f103 Implement tree flattening to automatically solve situations of redundant chains of split containers
This should fix the move problems. See comment of tree_flatten() for a little
example.
2011-01-07 22:21:41 +01:00
Michael Stapelberg 228b5c51ff change many LOG/printf messages to use DLOG 2011-01-07 20:58:58 +01:00
Michael Stapelberg 5098e45f23 Re-Implement support for RandR changes 2011-01-05 00:16:10 +01:00
Michael Stapelberg 1fb9b7c431 Bugfix: Correctly change focus after closing floating containers (Thanks litemotiv!) 2011-01-04 22:40:05 +01:00
Michael Stapelberg 0416be18df fix memleak: free struct Window members 2011-01-04 22:39:45 +01:00
Michael Stapelberg 80ecd157f6 fix memleak: free con->name before overwriting it 2011-01-04 22:38:33 +01:00
Michael Stapelberg 9713419327 Bugfix: Also change focus when the killed container was focused (Thanks fernandotcl) 2011-01-02 18:08:45 +01:00
Michael Stapelberg 50914e0483 Bugfix: Correctly change focus when closing a split-container
The problem was i3 leaving an invalid focus pointer valid (after killing the
container) because the container itself is not mapped (if it has no x11 window,
for example split containers).
2010-12-30 23:01:58 +01:00
Michael Stapelberg f65e4f5b16 Bugfix: Don’t redistribute resize percentage values when closing floating (!) windows (Thanks Merovius) (+testcase) 2010-12-30 02:39:14 +01:00
Michael Stapelberg d184587959 Bugfix: Don’t focus next window if the window was not mapped at the moment (on a different ws) 2010-12-28 02:27:11 +01:00
Fernando Tarlá Cardoso Lemos c88c3e3ab2 Default to a file in /tmp for the restart state.
The file is now created in /tmp using the process PID and the
username of the user running i3. The restart state file is only
loaded when restarting (the --restart option is appended to the
command line prior to the restart). That means that renaming the
old state file with the ".old" extension is no longer needed.

This "--restart" switch is supposed to be only used by i3. The
"-L" switch can be used to load a layout (and not delete it
afterwards). We unlink the state file after we load it so that
we don't keep cruft in /tmp or try to restart from an old config
file if restart_state is set.
2010-12-27 13:33:03 +01:00
Michael Stapelberg b0068de3d7 Bugfix: Transfer 'percent' factor when splitting, add testcase for resizing 2010-11-29 11:24:12 +01:00
Michael Stapelberg 2dba7ec1ec Bugfix for the last commit (broke some moving situations), update testcase 2010-11-28 20:15:47 +01:00
Michael Stapelberg 780b0ddbbc look & feel: when moving, descend if the container in target direction is a split-container 2010-11-28 18:35:11 +01:00
Michael Stapelberg 4fcd2f6e7e Bugfix: Fix focus when moving Cons
When having two v-splits on a horizontal desktop:
----------------
|  t1   |  t3  |
|-------|------|
|  t2   |  t4  |
----------------
…focus is on t2, and you move it into the right v-split (move after h), the
focus was not properly updated. That is, inside the right v-split, focus was
correct, but the workspace focus was still pointing to the left v-split.
2010-11-28 18:05:53 +01:00
Michael Stapelberg 511cbec49b look and feel: when moving a Con is not possible, split a workspace level
This allows you to open three cons, then move the last one to the right (like
in previous i3 releases).
2010-11-28 14:45:14 +01:00
Michael Stapelberg 81044a7104 Correctly restore focus when restarting (Thanks fernandotcl) 2010-11-28 14:27:44 +01:00
Michael Stapelberg 3bab222aa7 Bugfix: Re-attach windows in correct order when switching layout (Thanks fernandotcl) 2010-11-28 01:51:16 +01:00
Michael Stapelberg 2c157283ea fix third argument to strncat(), use smalloc(), use strlen(".old")+1 2010-11-28 01:22:10 +01:00
Fernando Tarlá Cardoso Lemos 0a17fe973c Make the restart path configurable. 2010-11-28 01:18:10 +01:00
Michael Stapelberg 0cfebcb5b6 remove some debug messages 2010-11-27 18:05:45 +01:00
Michael Stapelberg 1de97a1f1f correctly sort numbered workspaces (+testcase)
Numbered workspaces (workspaces with a name containing only digits) will be
inserted in the correct order now. Named workspaces are always sorted after
numbered workspaces and in the order of creation.
2010-11-21 23:35:49 +01:00
Michael Stapelberg fab8b84db7 ipc: fix current_workspace 2010-11-21 22:12:34 +01:00
Michael Stapelberg 2d280469af Bugfix: Don’t draw borders for fullscreen windows 2010-11-21 17:00:10 +01:00
Michael Stapelberg 09b5b17830 Bugfix: Don’t attach tiling containers to floating containers
This bug happened when there were only floating containers on a workspace and a
new tiling window was to be opened.
2010-11-21 16:49:59 +01:00
Michael Stapelberg db651679c5 Bugfix: Properly ignore UnmapNotify events (especially for floating windows)
This fixes the bug which caused floating windows to be visible even when
switching to a different workspace.

Instead of ignoring a specific sequence, we now set an ignore_unmap counter for
each container. (So, should containers be closed too early or stay open even if
they should be closed, we probably need to have a closer look at the counter.
At the moment, it is increased by one on reparenting and unmapping (for
workspace changes) and decremented by one on each UnmapNotify event).

This system is better because a sequence does not describe a single unmap or
reparent request but a request to X11 on the network layer -- which can contain
multiple requests.
2010-11-20 19:11:43 +01:00
Fernando Tarlá Cardoso Lemos bfa12a5819 Port the path resolution and config loading code from -next. 2010-11-15 14:00:46 +01:00
Michael Stapelberg 39b378b0a4 don’t allow useless splits, change orientation of existing split container instead 2010-11-14 23:18:39 +01:00
Michael Stapelberg d760a1c7b2 Bugfix: don’t kill parent when currently in tree_close() for a child of this parent 2010-11-14 20:14:09 +01:00
Michael Stapelberg f0efb3737e don’t remove floating container twice (it’s already removed in con_detach) 2010-11-14 20:11:46 +01:00
Michael Stapelberg 945632ddcb Implement setting the WM_NAME of i3 container windows for debugging 2010-11-14 16:41:46 +01:00
Michael Stapelberg 7c6f2dbfc6 Rendering fixes for stacking mode 2010-11-13 22:39:59 +01:00
Michael Stapelberg dc10c67060 Bugfix: Close containers which are empty due to a move (Thanks fernando) 2010-11-13 14:55:11 +01:00
Michael Stapelberg c1d574f84e enumerate workspaces when initializing outputs 2010-11-12 17:33:59 +01:00
Michael Stapelberg 099df7f438 Bugfix: Keep focus on the current workspace when moving containers, add testcase 2010-07-17 13:27:34 +02:00
Michael Stapelberg 49add4f3e4 Bugfix: Don’t go further when switching focus on a CT_WORKSPACE 2010-07-17 01:56:16 +02:00
Michael Stapelberg 69e5c0f6ce Treat stacking containers as if they are in vertical orientation, add testcase 2010-07-17 01:27:47 +02:00
Michael Stapelberg 09c6b587d3 close empty parent containers, add testcase 2010-07-17 00:54:47 +02:00
Michael Stapelberg 33572b8c4b s/con->parent/parent to make it more readable
(and necessary for the next commit)
2010-07-17 00:54:03 +02:00
Michael Stapelberg 7415f14448 Add more documentation to functions/header files 2010-07-13 11:35:05 +02:00
Michael Stapelberg 66480d3725 Bugfix: Don’t try to focus the container itself when closing 2010-07-04 22:16:54 +02:00