Commit Graph

88 Commits

Author SHA1 Message Date
Michael Stapelberg
bbe607899c Send proper error messages upon parser failures, use yajl for generating command replies
Fixes: 
2012-05-02 22:01:50 +02:00
Jose Pereira
9a58c1fcaa Added option to select primary display on tray_output 2012-04-05 14:42:07 +02:00
Michael Stapelberg
206b96202c Use (void) instead of () for functions without args (Thanks fernandotcl)
See also:
http://article.gmane.org/gmane.linux.kernel/1268792

The C compiler will handle (void) as "no arguments" and () as "variadic
function" (equivalent to (...)) which might lead to subtle errors, such
as the one which was fixed with commit 0ea64ae4.
2012-03-31 10:53:04 +02:00
Michael Stapelberg
e114b3dba2 Refactor the interface of commands.c
This change has two implications:

1) tree_render() will now be called precisely once for input which consists of
   multiple commands (like "focus left; focus right"). Also, the caller of
   parse_command() has to call it. This makes us able to fix tickets such as
   ticket  (where multiple tree_render() calls are noticable).

2) The output of a command is now a JSON array of return values of the
   individual subcommands. In the case of "focus left; focus right", this is:

   [{"success":true}, {"success":true}]

   While this is incompatible with what i3 returned before, the return value of
   commands was undocumented and therefore not subject to our API stability.
2012-02-15 20:57:25 +00:00
Michael Stapelberg
3229f7677f Rip out the old command parser, remove migration code 2012-01-27 22:11:03 +00:00
Michael Stapelberg
3b7f4d428e Correctly restore focus after in-place restarts
Note: This change requires two in-place restarts when you are upgrading
in-place from an old version.

Fixes 
2012-01-21 18:35:15 +00:00
Michael Stapelberg
31b7ec29fd Re-implement bar borders (by Angelo Haller)
This re-introduces borders around the workspace buttons in i3bar.
No additional pixels will be consumed (you will not lose any space for your
windows).
2012-01-20 21:36:50 +00:00
dbp
a3081c488a Allow different modifier keys for showing hidden i3bar. 2012-01-08 12:47:41 +00:00
Michael Stapelberg
dee7c07ad2 shmlog: store meta information in the buffer itself, store path as X11 atom
This makes i3-dump-log completely independent of a running i3 instance.
2012-01-06 23:40:07 +00:00
Michael Stapelberg
91499ed2c7 properly serialize floating/scratchpad state when restarting 2012-01-05 21:41:20 +00:00
Michael Stapelberg
08986a1798 Implement scratchpad functionality (see userguide) 2011-12-21 23:15:32 +00:00
Michael Stapelberg
966c654112 implement the GET_LOG_MARKERS IPC request/reply 2011-12-10 11:16:32 +00:00
Michael Stapelberg
7498ddd12f ipc: set CLOEXEC on client file descriptors (Thanks biiter) 2011-11-15 23:39:43 +00:00
Michael Stapelberg
2a78a5f2b6 ipc: fix memory leaks when clients disconnect 2011-11-07 21:34:39 +00:00
Michael Stapelberg
42d355f2b7 normalize modelines/headers across src/*.c 2011-10-22 23:40:02 +01:00
Michael Stapelberg
149b05aacf ipc: when requesting the bar config without a payload, return an array of available bar IDs 2011-10-18 22:12:46 +01:00
Michael Stapelberg
e3cbdea1fc Bugfix: Correctly close the colors map in the IPC bar config reply 2011-10-18 22:11:44 +01:00
Michael Stapelberg
c2c6ca25d5 Make the barconfig list a TAILQ 2011-10-18 22:11:27 +01:00
Michael Stapelberg
24ede1c834 add an IPC request to get the bar configuration (by ID) 2011-10-18 19:05:49 +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
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
b4809e9ba7 Merge branch 'master' into next 2011-08-31 14:45:14 +02:00
Michael Stapelberg
e1631d6320 properly free memory/close fd upon errors (Thanks xeen)
Found with the static analyzer cppcheck
2011-08-31 14:44:48 +02:00
Michael Stapelberg
57e7266da4 Merge branch 'master' into next 2011-08-28 17:41:23 +02:00
Peter Bui
6e59d693d2 Use name_json if available, rather than non-descriptive name. 2011-08-28 17:36:16 +02:00
stfn
8e8b9b93f4 ipc.c: Fix warning 2011-08-26 23:33:11 +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
Michael Stapelberg
eb0a56fad1 Merge branch 'get-marks' into next 2011-08-09 09:28:06 +02:00
Peter Bui
5e06b1b21d Fix some potential memory leaks 2011-08-09 09:27:15 +02:00
Helgi Kristvin Sigurbjarnarson
3cc22dcbe4 Preserve marks between restarts. 2011-08-09 08:19:31 +02:00
Helgi Kristvin Sigurbjarnarson
35d7ef0ddd Feature: implement GET_MARKS 2011-08-09 08:04:33 +02:00
Michael Stapelberg
34eb9b2664 ipc: make 'focused' a bool 2011-07-24 15:00:09 +02:00
Michael Stapelberg
b09bb0fc2a ipc: make 'urgent' a bool 2011-07-24 14:54:30 +02:00
Michael Stapelberg
36fde6dbe1 ipc: send 'percent': null when percent is not relevant for the container 2011-07-24 14:47:28 +02:00
Michael Stapelberg
fdd098b010 secure strscpy by replacing with strncpy 2011-07-23 22:22:36 +02:00
Michael Stapelberg
fb9d77305e Implement 'fullscreen global' 2011-06-10 18:27:20 +02:00
Michael Stapelberg
51bfdbf0a8 ipc: make 'layout' a string 2011-06-02 17:12:18 +02:00
Michael Stapelberg
8acea3d34c call tree_render() only after commands which require it
Saves one call of tree_render for exec, for example
2011-05-29 13:20:34 +02:00
Michael Stapelberg
9c05c18156 ipc: change border_style to human-readable string instead of enum value 2011-05-11 20:39:18 +02:00
Michael Stapelberg
a149283964 Fix unaligned memory access on sparc (Thanks David Coppa) 2011-04-28 21:44:29 +02:00
Michael Stapelberg
2c6508a6a3 remove useless checks, size_t != ssize_t :) 2011-04-28 20:24:16 +02:00
Michael Stapelberg
528f486eee Make code compatible with yajl 2.0 *and* 1.0 2011-04-27 19:52:53 +02:00
Michael Stapelberg
39ee97fd82 FREE() already nulls the pointer 2011-03-21 23:49:16 +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
f34b045619 Fix dock client handling for inplace restarts 2011-02-21 03:01:55 +01:00
Michael Stapelberg
9719b21243 refactor some places to use output_get_content() 2011-02-21 01:55:36 +01:00
Michael Stapelberg
6b272fea55 Bugfix: in get_workspaces, only consider the CT_CON, not the CT_DOCKAREAs (Thanks fernandotcl) 2011-02-21 00:54:29 +01:00
Michael Stapelberg
7f89c71689 Implement dock mode, update testsuite
Currently, dock clients are only possible at the top.
2011-02-20 23:43:03 +01:00