Commit Graph

231 Commits

Author SHA1 Message Date
d39261a1f0 rewrite con_descend_orientation
It now uses the container orientation (if it is appropriate, the last focused
one otherwise) to recurse. This works better if the target workspace is in
vertical orientation when you use right/left or if it is in horizontal
orientation but you use up/down.
2011-08-07 15:57:36 +02:00
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
8be26c9a22 x: Don’t set background color on frame windows, reduces flickering 2011-07-10 19:58:46 +02:00
23d4917e43 Bugfix: Correctly revert floating focus when killing the last floating window (+test) 2011-07-01 01:10:43 +02:00
fb9d77305e Implement 'fullscreen global' 2011-06-10 18:27:20 +02:00
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
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
44c2555e67 Bugfix: When focusing the next floating window, descend the CT_FLOATING_CON
makes t/35-floating-focus.t pass again
2011-05-13 19:53:19 +02:00
36583ec6ee Bugfix: When moving floating cons to other workspaces, attach them to the workspace 2011-04-18 18:44:18 +02:00
02acf426d3 Bugfix: Don’t set the layout when it’s default layout anyways
Fixes some nasty side-effects
2011-04-02 22:08:38 +02:00
650eebc347 Implemented config key 'new_container' 2011-04-02 21:43:49 +02:00
99ce340fea Focus cons when moving to a visible workspace on a different output (Thanks mseed)
Fixes: #355
2011-03-20 19:32:00 +01:00
0639a7d95b Make i3 compatible with the very latest xcb
This involves:
 • Compiling with xcb-util instead of xcb-{atom,aux} (they merged the libraries)
 • Not using xcb-{event,property} anymore (code removed upstream)
 • Not using the predefined WINDOW, CARDINEL, … atoms (removed upstream)
 • Using the new xcb_icccm_* data types/functions instead of just xcb_*
   (for example xcb_icccm_get_wm_hints instead of xcb_get_wm_hints)

Also I refactored the atoms to use x-macros.
2011-03-18 14:39:27 +01:00
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
b484ed5f9d When making floating cons tiling, re-insert next to the next focused *tiling* con (Thanks mseed)
Fixes: #337 and #350
2011-03-14 23:50:29 +01:00
cdeb49127f Bugfix: restore focus to the correct window when a non-focused window gets destroyed (+testcase) 2011-03-14 16:34:35 +01:00
51ff0f80a6 Obey minimum size when resizing floating windows
Fixes #285
2011-03-06 14:15:46 +01:00
0a2ee1d2aa Bugfix: Focus workspace after closing one of multiple dock clients (+testcase) (Thanks mseed) 2011-03-04 15:21:18 +01:00
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
3dfe5c8a9a bugfix: fix clicking on dock clients (Thanks mseed) 2011-02-21 01:58:57 +01:00
35e79c87c8 Place dock clients on the output corresponding to their geometry request 2011-02-21 01:28:29 +01:00
7f89c71689 Implement dock mode, update testsuite
Currently, dock clients are only possible at the top.
2011-02-20 23:43:03 +01:00
6a6746b967 revert the replacement of a single h/v-split with its child container
Makes more problems than it creates. Will use a different fix suggested by
Merovius.
2011-02-19 18:30:26 +01:00
834f4d7bc2 add missing function documentation 2011-02-14 23:17:30 +01:00
26a416e016 refactor tree_move() into src/move.c, change config (!), change testcase
Due to lots of cases which were added and added to tree_move(), the function
was not really easy to understand. For this refactoring, I wrote tree_move()
from scratch, thinking about (hopefully) all cases. The testsuite still passes.

The move command also has different parameters now. Instead of the hard to
understand 'before v' stuff, we use 'move [left|right|up|down]'.
2011-02-14 23:05:20 +01:00
28dd226259 refactor code for removing children from a con
Let’s see how this callback stuff will work out. If it doesn’t work out well,
we will remove it.
2011-02-14 18:08:36 +01:00
d855bea215 Bugfix: Correctly focus con when moving to another workspace (Thanks mseed)
This fixes #310.
2011-02-01 17:17:50 +01:00
97ab44b3d8 disable workspace-level move operations (not yet implemented) (Thanks mseed) 2011-02-01 16:59:02 +01:00
ac8fb2399d Don't mess with sizes when moving to other ws. 2011-01-29 15:19:41 +01:00
3383437705 refactor some places to use con_descend_focused instead of duplicating code 2011-01-27 16:09:14 +01:00
f462a9a215 re-insert floating cons next to the currently focused con of the appropriate workspace 2011-01-27 16:04:17 +01:00
432563d6e7 Fix the percentages when moving containers. 2011-01-27 13:00:14 +01:00
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
45227fba54 A new logic to calculate the percentages.
It's slower, but this way we make sure that the resulting
percentages *ALWAYS* sum up to 1.0 (or as close to that as we get
with double math).
2011-01-27 13:00:14 +01:00
ad95d5bb1f bugfix: you can’t unfullscreen workspaces (Thanks Merovius) 2011-01-21 22:09:04 +01:00
1fecbb3e5a Bugfix: also close empty split containers when the clients are moved away (Thanks mseed)
Also update the testcase (which used only 'kill' before).
2011-01-20 10:09:43 +01:00
0eb5eb34cd When in stacking mode with only one child, respect border styles 1pixel and none (Thanks Merovius) 2011-01-17 14:38:16 +01:00
b660769fe0 Bugfix: Correctly move to other workspaces when a floating window is focused on the target ws (Thanks mseed) 2011-01-07 23:56:32 +01:00
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
228b5c51ff change many LOG/printf messages to use DLOG 2011-01-07 20:58:58 +01:00
5ccd7b01e7 Bugfix: fix fullscreen mode for floating windows 2011-01-07 02:50:35 +01:00
fa44383cc6 fix small memory leak (unused ->name) 2011-01-04 22:15:52 +01:00
2d05c3a37d Fix dragging floating containers / click handling 2010-12-31 01:38:17 +01:00
028f7d2ca7 Fix resize handling on click on borders (did not correctly use orientation) 2010-12-28 16:26:42 +01:00
a1dd74da5a Implement default border styles (thanks litemotiv). 2010-12-27 13:10:45 +01:00
0f0d01336b Bugfix: Correctly attach floating Cons to a different workspace, extend testcase 2010-11-29 20:39:56 +01:00
ad825913b4 Bugfix: Fix crash when moving a floating Con to a different workspace, add testcase (Thanks EelVex) 2010-11-29 20:20:44 +01:00
17caaf1159 Correctly update the _NET_WM_STATE hint when *not* going into fullscreen (when already in fullscreen) 2010-11-28 22:07:54 +01:00
3bab222aa7 Bugfix: Re-attach windows in correct order when switching layout (Thanks fernandotcl) 2010-11-28 01:51:16 +01:00
d0de3f403d Bugfix: Restore focus after changing layout (Thanks fernandotcl) 2010-11-28 01:39:47 +01:00