Commit Graph

64 Commits

Author SHA1 Message Date
Michael Stapelberg
32b97745ec Don’t call ev_destroy_loop with ev < 4 in atexit (Thanks xeen) 2011-10-15 16:56:32 +01:00
Michael Stapelberg
5f52c78aa0 Change the root window cursor to 'watch' during startups 2011-10-10 15:54:18 +01:00
Michael Stapelberg
b9db72dc8a Implement support for startup notifications
This only sets up startup notifications for the 'exec' commands and directives.

Monitoring startups follows later.
2011-10-10 15:54:17 +01:00
Michael Stapelberg
2a29d9c2c1 Make conn_screen available outside of main()
Will be used in other parts of the code for startup notification
2011-10-10 15:54:17 +01:00
Michael Stapelberg
b755397687 Make i3 send arguments as command to a running i3 instance (like i3-msg)
From i3 --help:

If you pass plain text arguments, i3 will interpret them as a command
to send to a currently running i3 (like i3-msg). This allows you to
use nice and logical commands, such as:

	i3 border none
	i3 floating toggle
	i3 kill window
2011-10-02 19:20:43 +01:00
Michael Stapelberg
4243a4053e Cleanup i3 --help 2011-10-02 18:55:15 +01:00
Michael Stapelberg
23796ea900 Implement i3 --get-socketpath, useful for IPC scripts
In order to not depend on X11 just for getting the socket paths, scripts or
other programs can now use i3 --get-socketpath. Since i3 must be present on the
computer anyways, this saves one dependency :).
2011-10-02 16:12:10 +01:00
Michael Stapelberg
679bceccc4 remove obsolete comment 2011-10-02 13:18:12 +01:00
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
d03dffe012 Kill left-over i3-nagbar processes on 'exit' 2011-09-11 21:49:35 +01:00
Michael Stapelberg
2cd8231fce Merge branch 'master' into next 2011-08-20 17:48:49 +02:00
Michael Stapelberg
f15559eb1f Don’t die, but ELOG and fallback when the pointer cannot be queried (Thanks Niklas) 2011-08-20 17:48:07 +02:00
Michael Stapelberg
4cf2cab626 Merge branch 'master' into next 2011-08-17 13:37:33 +02:00
Michael Stapelberg
09ad9808f6 Bugfix: Set focus to where the mouse pointer is when starting (Thanks nutron)
Fixes #477
2011-08-17 13:37:08 +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
10f871b57b implement "socket activation": passing IPC sockets to i3 2011-08-10 15:55:27 +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
ffbcfa2c97 Bugfix: also free() X11 errors in the main loop 2011-07-31 19:41:57 +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
bc7dec6a4c X11 errors: also log the error_code (see X Protocol, Appendix B, Errors) 2011-07-29 13:11:02 +02:00
Fernando Tarlá Cardoso Lemos
7a18dcc89e Set the root window cursor. Fixes #442. 2011-07-29 12:38:24 +02:00
Michael Stapelberg
f84264ae41 remove _NET_WM_WORKAREA from _NET_SUPPORTED for now
See ticket #301, this is a problem with Qt apps on your second monitor.

We should implement better EWMH support, but not before the release :).
2011-07-27 12:51:38 +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
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
c55abca115 add i3-nagbar. tells you about config file errors (for example) 2011-07-10 14:33:19 +02:00
Michael Stapelberg
fb9d77305e Implement 'fullscreen global' 2011-06-10 18:27:20 +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
3f45d3c447 re-implement assignments of workspace to specific outputs 2011-05-14 22:19:58 +02:00
Sardem FF7
8a40dc0011 Use XDG_RUNTIME_DIR when available
XDG_RUNTIME_DIR is the volatile runtime data dir provided by modern
session manager such as systemd
2011-04-26 18:39:11 +02:00
Michael Stapelberg
4fd4e619ec little coding style fixes, fix compilation warning 2011-03-21 23:54:13 +01:00
Fernando Tarlá Cardoso Lemos
f0f7cb7478 If the socket path isn't specified, write it to /tmp. 2011-03-21 23:49:39 +01:00
Fernando Tarlá Cardoso Lemos
6d8784af98 Set the I3_SOCKET_PATH atom to the expanded path. 2011-03-21 23:46:03 +01:00
Michael Stapelberg
b342d387a8 Handle saved_configpath in get_config_path, fix memleak in current_configpath handling, update atoms after reloading (Thanks fernandotcl) 2011-03-19 22:26:15 +01:00
Michael Stapelberg
626c65b0d8 Bugfix: correctly store the config path for using it for I3_CONFIG_PATH later 2011-03-19 21:50:13 +01:00
Michael Stapelberg
9344b9790c Bugfix: fix null-pointer dereference when IPC is disabled (Thanks Merovius) 2011-03-19 21:37:27 +01:00
Michael Stapelberg
65a3259b3c Set the I3_SOCKET_PATH and I3_CONFIG_PATH atoms on the X11 root window 2011-03-19 21:20:38 +01:00
Michael Stapelberg
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
Michael Stapelberg
36664c6289 Send WM_TAKE_FOCUS to clients when setting focus (fixes java swing problems) 2011-03-17 22:27:59 +01:00
Michael Stapelberg
76e978bfb3 fix small warnings when compiling with DEBUG=0 2011-03-14 23:17:52 +01:00
Michael Stapelberg
89ef41dadf re-implement support for MappingNotifys 2011-03-14 17:20:04 +01:00
Michael Stapelberg
f395c141c8 bugfix: initialize root variable earlier 2011-01-28 00:42:55 +01:00
Michael Stapelberg
79bbde8766 add a flag to disable the signalhandler 2011-01-28 00:31:26 +01:00
Michael Stapelberg
ae4331113e re-implement xkb support for detecting keyboard layout changes 2011-01-17 14:27:49 +01:00
Axel Wagner
92a038dd25 Save environment-variable AFTER reading the configfile 2011-01-12 10:16:11 +01:00
Axel Wagner
4caf85aa0b Use I3SOCK-environment-variable 2011-01-12 10:15:48 +01:00