Commit Graph

373 Commits

Author SHA1 Message Date
Michael Walle
5aa43d61f8 Add force_xinerama configuration option
The configuration option does the same as the commandline parameter, except
it can be easily set by the user (e.g. you are using KDM and can't start a
session through ~/.xsession).

Signed-off-by: Michael Walle <michael@walle.cc>
2011-09-19 23:10:38 +01:00
Michael Stapelberg
b3adaa2983 Implement the window_role criterion (checks WM_WINDOW_ROLE)
Closes: #446

This is handy for matching specific windows of a multi-window application, for
example only Pidgin’s buddy list window.
2011-09-18 16:05:10 +01:00
Michael Stapelberg
7a38d8ac56 Merge branch 'master' into next 2011-09-17 14:13:05 +01:00
Michael Stapelberg
deab3ac338 Send the correct X11 border_width in faked ConfigureNotifys 2011-09-17 14:11:55 +01:00
Michael Stapelberg
ad568aa8c1 Merge branch 'master' into next 2011-09-14 23:00:02 +01:00
Michael Stapelberg
6b541d382b Bugfix: Don’t fix floating coordinates when reassigning (fixes flickering)
This fixes flickering when moving floating windows between different monitors.
2011-09-14 22:58:51 +01:00
Michael Stapelberg
dc790cfa32 Bugfix: Correctly free old assignments when reloading
Fixes #516
2011-09-11 23:41:46 +01:00
Michael Stapelberg
2fc54aadf1 Implement support for PCRE regular expressions for all criteria (for_window, commands, assignments) 2011-09-10 23:53:11 +01:00
Michael Stapelberg
8114ecda47 Merge branch 'master' into next 2011-08-27 13:47:57 +02:00
Michael Stapelberg
e97a7e34f7 Bugfix: Re-implement reconfiguring height of dock windows (+test) (Thanks thomasba) 2011-08-27 13:47:10 +02:00
Michael Stapelberg
53a9ace3a6 Merge branch 'master' into next 2011-08-26 03:24:14 +02:00
Michael Stapelberg
7bf465af9f Fix prototype of con_inside_focused 2011-08-26 03:23:57 +02:00
Michael Stapelberg
a57a2b9ccb Merge branch 'master' into next 2011-08-26 03:18:16 +02:00
Michael Stapelberg
7fca7f029f Correctly render containers when a split container is focused 2011-08-26 03:17:41 +02:00
Michael Stapelberg
75c11cb894 Merge branch 'master' into next 2011-08-24 23:00:12 +02:00
Michael Stapelberg
698d97cd02 Bugfix: Correctly warp floating windows when using the 'move' command 2011-08-24 22:59:46 +02:00
Michael Stapelberg
7a22bd1cf3 Merge branch 'master' into next 2011-08-17 12:14:17 +02:00
Peter Bui
36224f86d1 Only warp pointer once during x_push_changes()
- Introduce warp_to static variable in x.c that stores the coordinates
  to warp to as a Rect.

- Add x_set_warp_to function to set this variable.  Use in _tree_next,
  workspace_show, and con_move_to_workspace.

- In x_push_chanages, if warp_to is set, then call xcb_warp_pointer_rect
  and then reset it to NULL.

This fixes all know bugs for pointer warping for me.
2011-08-17 12:12:40 +02:00
Michael Stapelberg
2abe23d6ff Merge branch 'master' into next 2011-08-17 01:52:45 +02:00
Michael Stapelberg
7951445849 xcb: use predefined XCB_ATOM_ atoms, don’t request them 2011-08-17 01:41:19 +02:00
Michael Stapelberg
d3efa73dd7 Merge branch 'master' into next 2011-08-11 22:22:44 +02:00
Valentin Voigt
bf0c67b2af Warp cursor when changing workspace. 2011-08-11 22:13:50 +02:00
Michael Stapelberg
3af7692a92 Merge branch 'tests-optimize' into next 2011-08-10 15:57:28 +02:00
Michael Stapelberg
10f871b57b implement "socket activation": passing IPC sockets to i3 2011-08-10 15:55:27 +02:00
Mateusz Poszwa
42db9de7ec Add new_float config option.
This option sets the default border style for containers automatically put into floating mode.

Fixes #264
2011-08-09 09:29:53 +02:00
Helgi Kristvin Sigurbjarnarson
35d7ef0ddd Feature: implement GET_MARKS 2011-08-09 08:04:33 +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
Peter Bui
1750192f63 Modify workspace next/prev to account for workspaces on all outputs.
Generally, the traversal goes: numbered workspaces in order, and then
named workspaces in the order in which they appear in the tree.

Example:
    Output 1:       Output 2:
	1 3 D C         2 4 B A

Traversal: 1, 2, 3, 4, D, C, B, A, 1, ...

Note, after the numbered workspaces, we traverse the named workspaces
from output 1, and then output 2, etc.
2011-08-04 00:12:09 +02:00
Michael Stapelberg
c883e7050a Include <limits.h> in all.h 2011-08-04 00:10:04 +02:00
Michael Stapelberg
192dbdabd6 Bugfix: Correctly set the _NET_CLIENT_LIST_STACKING hint (fixes chromium tabbar)
Fixes #287
2011-08-03 20:07:03 +02:00
Michael Stapelberg
3a41aea75b add xcb_icccm_get_wm_protocols to xcb_compat.h (Thanks Merovius) 2011-07-31 18:32:28 +02:00
Michael Stapelberg
1b0d6ab202 remove unnecessary 'extern' keyword from function prototypes in include/xcursor.h 2011-07-29 13:16:26 +02:00
Michael Stapelberg
3721c598bd Bugfix: Set the cursor via the Xlib connection if XCursor is supported
This fixes a race where we created cursors on the Xlib connection, flushed,
then used the cursor on the XCB connection. Even though we flushed, the X
server did not process the requests yet and therefore returned a BadCursor
error.

This bugfix uses the Xlib connection for setting the root window cursor which
will ensure that the requests are properly serialized.

An easy test for this (on my machine) is the following ~/.xsession:
    xsetroot -cursor_name cross
    exec i3
If you see a cross cursor instead of the pointer, the race happens. You’ll see
a error_code=6 error in your ~/.xsession-errors.
2011-07-29 13:13:51 +02:00
Michael Stapelberg
a05a9f8dae Set some more atoms for _NET_SUPPORTED (Thanks lexszero) 2011-07-23 22:40:47 +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
b87742172b Add missing function prototype for strndup on Darwin (Thanks Marcus) 2011-07-17 22:18:00 +02:00
Michael Stapelberg
02dfb8e891 use memmem and strndup from FreeBSD on Darwin (Thanks Marcus) 2011-07-17 15:18:45 +02:00
Claudio Marforio
cc24a96e96 patch to allow exec_always in configure file
fixed indentation, updated docs
2011-07-12 18:23:14 +02:00
Michael Stapelberg
05e39c1c48 Ignore X11 errors caused by ReparentWindow / ChangeProperty on already destroyed windows
These errors can happen because a DestroyWindow request by a client will
trigger an UnmapNotify, then a DestroyNotify. We cannot distinguish this
UnmapNotify from an UnmapNotify not followed by a DestroyNotify, so we just try
to send the ReparentWindow / ChangeProperty and ignore the errors, if any.
2011-07-10 23:44:13 +02:00
Michael Stapelberg
78d25c4cd9 expose event handler: use x_deco_recurse 2011-07-10 22:06:16 +02:00
Michael Stapelberg
c55abca115 add i3-nagbar. tells you about config file errors (for example) 2011-07-10 14:33:19 +02:00
Michael Stapelberg
d641e1da3b Don’t force wrapping when focusing in a direction would work (+test)
Think of the following layout:

 -------------
 | tab |     |
 | con | win |
 |     |     |
 -------------

The tabbed container on the left has two children. Assume you have focused the
second/right child in the tabbed container. i3 used to focus the first/left
container of the tabbed container when using 'focus right' (it wrapped focus).

With this commit, the default behaviour is to instead focus the window on the
right of the screen.

The intention is to make focus switching more intuitive, especially with tabbed
containers supporting 'focus left'/'focus right' in tree. You should end up
using less 'focus parent' :).

You can force the old behaviour with 'force_focus_wrapping true' in your
config.

Code coverage is 62.5% with this commit.
2011-06-12 12:56:50 +02:00
Michael Stapelberg
fb9d77305e Implement 'fullscreen global' 2011-06-10 18:27:20 +02:00
Michael Stapelberg
60ae26c19d Implement 'workspace next/prev' (+test) 2011-06-10 16:03:59 +02:00
Michael Stapelberg
39b1c1bf75 Re-implement the 'mode' command 2011-06-10 02:38:07 +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
2c68c234ea Implement assignments for (named) workspaces, with '~' compatibility (floating) 2011-05-23 18:41:17 +02:00
Michael Stapelberg
5ae4620a24 Time Lord technology: for_window config directive to run arbitrary cmds
An example to set all XTerms floating:
    for_window [class="XTerm"] mode floating

To make all urxvts use a 1-pixel border:
    for_window [class="urxvt"] border 1pixel

A less useful, but rather funny example:
    for_window [title="x200: ~/work"] mode floating

The commands are not completely arbitrary. The commands above were tested,
others may need some fixing. Internally, windows are compared against your
criteria (class, title, …) when they are initially managed and whenever one of
the relevant values change. Then, the specified command is run *once* (per
window). It gets prefixed with a criteria to make it match only the specific
window that triggered it. So, if you configure "mode floating", i3 runs
something like '[id="8393923"] mode floating'.
2011-05-15 20:10:25 +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