Commit Graph

1351 Commits

Author SHA1 Message Date
Michael Stapelberg
5f52c78aa0 Change the root window cursor to 'watch' during startups 2011-10-10 15:54:18 +01:00
Michael Stapelberg
2ad4fbb34a startup: delete the startup sequence upon completion, make the timeout complete it 2011-10-10 15:54:18 +01:00
Michael Stapelberg
997a539a8a Implement timeouts for startup notifications 2011-10-10 15:54:17 +01:00
Michael Stapelberg
6ac098a45e support _NET_STARTUP_ID on the client leader window
(necessary for GIMP, geeqie, …)
2011-10-10 15:54:17 +01:00
Michael Stapelberg
4204b8e2b0 Get the _NET_STARTUP_ID in manage_window, get the corresponding workspace 2011-10-10 15:54:17 +01:00
Michael Stapelberg
499d89bdb0 Keep track of startup notifications in a TAILQ, save workspace 2011-10-10 15:54:17 +01:00
Michael Stapelberg
f4f4d782bb implement a startup monitor, move code to src/startup.c 2011-10-10 15:54:17 +01:00
Michael Stapelberg
c812cdcf9a make handle_client_message not return anything
The function returned an int for historical reasons.
2011-10-10 15:54:17 +01:00
Michael Stapelberg
d1d4f39f9e save the last timestamp received by X11 in last_timestamp
We need it for startup notifications (to generate a unique id)

Conflicts:

	include/i3.h
	src/main.c
2011-10-10 15:54:17 +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
0f74f9b921 remove left-over type definition for mode_info 2011-10-09 18:25:21 +01:00
Michael Stapelberg
18991a65c7 log WM_NAME (non-utf-8 window titles) 2011-10-09 14:45:34 +01:00
Michael Stapelberg
29c185dd0b Move fake_configure_notify to libi3 2011-10-09 13:40:15 +01:00
Michael Stapelberg
658bf5adff Bugfix: Warp pointer to the correct window when using the 'focus' command
Comment in the code makes the fix clear, I think.

Steps to reproduce the issue:
1) On the right monitor, open two terminals (h-split workspace)
2) 'i3 mark foo' on the right terminal
3) Focus the left terminal
4) Switch to the left monitor
5) i3 '[con_mark="foo"] focus'
6) the left window will contain the pointer (and is focused for a short period
   of time, or even permanently due to race conditions)
2011-10-03 21:54:36 +01:00
Noe Rubinstein
1eab86b916 add "move workspace next" and "move workspace prev"
some factorization would be better here, however I don't really know my
way around bison
2011-10-02 22:03:47 +01:00
Michael Stapelberg
b2ad9a77c8 rename the internal function to _workspace_show, add a comment to workspace_show_by_name 2011-10-02 22:03:16 +01:00
Noe Rubinstein
92cc4494aa refactor workspace_show and friends 2011-10-02 21:57:00 +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
046cf99585 Move ipc_send_message and ipc_recv_message to libi3
Make i3-msg and src/ipc.c use it
2011-10-02 18:33:36 +01:00
Michael Stapelberg
501dc36b98 move sstrdup, scalloc, smalloc, srealloc to libi3, improve error messages 2011-10-02 18:09:30 +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 Stapelberg
0482dc7546 Merge branch 'master' into next 2011-10-01 17:44:46 +01:00
Michael Walle
8adcf3e5d1 set close-on-exec flag on errorlogfile
Make sure the file descriptor is closed within the child after forking.

Signed-off-by: Michael Walle <michael@walle.cc>
2011-10-01 17:44:22 +01:00
Michael Stapelberg
3629934b0a Check for PCRE version and disable PCRE_UCP for <= 8.10 2011-09-30 20:31:32 +01:00
Michael Stapelberg
db33da2258 Merge branch 'master' into next 2011-09-26 20:12:07 +01:00
Michael Stapelberg
abaa8c2356 Bugfix: IPC: Correctly dump the 'focus' array 2011-09-26 20:11:47 +01:00
Michael Stapelberg
6420b2b102 Introduce the i3-sensible-{pager,editor,terminal} scripts
The former two provide fallbacks in case $PAGER or $EDITOR is not set (which
might be more common than you think, because they have to be set in
~/.xsession, not in the shell configuration!) while the latter tries to launch
a terminal emulator. The scripts are most prominently used in i3-nagbar, which
alerts the user when the configuration is broken for some reason. Also,
i3-sensible-terminal is used in the default configuration.

This commit does not rely on the shell supporting ${PAGER:-less} anymore, which
is not the case for 'fish'.
2011-09-25 18:46:37 +01:00
Michael Stapelberg
1481cd95c9 Implement the I3_SYNC client protocol
This is mainly useful for the testsuite. The tests can wait until i3 processed
all X11 events and then continue. This eliminates sleep() calls which leads to
a more robust and faster testsuite.
2011-09-22 23:13:12 +01:00
Michael Stapelberg
daebe28b09 Merge branch 'master' into next 2011-09-22 23:11:14 +01:00
Yves Fischer
0c367f9e4c Skip dragging of floating cons in fullscreen mode 2011-09-22 23:10:48 +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
143663f031 Merge branch 'master' into next 2011-09-20 22:37:08 +01:00
Michael Stapelberg
77ae3cd8f7 Bugfix: use bufcopy instead of buf when boundary checking (Thanks thomasba)
Also replace the useless (bufcopy + (next - bufcopy)) with next
2011-09-20 22:36:23 +01:00
Michael Stapelberg
de7c2841ed Merge branch 'master' into next 2011-09-20 21:42:51 +01:00
Michael Stapelberg
cd6c3fedcb A bit more boundary-checking when replacing variables.
Makes valgrind happy
2011-09-20 21:42:26 +01:00
Michael Stapelberg
e1949aa694 Bugfix: Correctly split key/value when parsing variables (Thanks xeen) 2011-09-20 21:42:09 +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
05c0a8985b Merge branch 'master' into next 2011-09-18 17:44:00 +01:00
Michael Stapelberg
2fe0949abd Bugfix: Only change focus in tree_close() when the container was focused before
Fixes: #441

I’m not sure if that’s really all there is to it. Seems a bit too simple :).
We’ll see if I missed some corner cases in the next few days…
2011-09-18 17:43:02 +01:00
Michael Stapelberg
46409ad656 Merge branch 'master' into next 2011-09-18 17:02:52 +01:00
Michael Stapelberg
a82f5750de Bugfix: Avoid out of bounds coordinates when moving floating windows (Thanks eeemsi)
This commit makes the coordinates proportional when moving floating windows.
That is, if you have a window at the bottom of your 1920 px monitor and move it
to your 800 px monitor, it will be at the bottom of the 800 px monitor (and not
out of bounds).
2011-09-18 17:00:29 +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
c88425147e Merge branch 'master' into next 2011-09-18 14:39:33 +01:00
Michael Stapelberg
7a2e92a116 Bugfix: Use con_orientation(). Fixes switching between different outputs
Fixes: #518

For stacking containers, direct access using con->orientation is wrong, we need
to use con_orientation().
2011-09-18 14:38:39 +01:00
Michael Stapelberg
0bc44ffc37 Merge branch 'master' into next 2011-09-18 00:40:42 +01:00
Peter Bui
a5012f6021 fix-bug-515: always adjust floating position when moving to another output
Floating con position needs to be adjusted when moving to another
output, regardless of whether or not the target workspace is visible.
2011-09-18 00:38:32 +01:00