ipc: implement output event

next
Michael Stapelberg 2010-03-19 22:40:43 +01:00
parent 4ce0d6f014
commit aec40126b4
3 changed files with 20 additions and 0 deletions

View File

@ -260,6 +260,9 @@ workspace::
Sent when the user switches to a different workspace, when a new
workspace is initialized or when a workspace is removed (because the
last client vanished).
output::
Sent when RandR issues a change notification (of either screens,
outputs, CRTCs or output properties).
=== workspace event
@ -272,6 +275,17 @@ This event consists of a single serialized map containing a property
{ "change": "focus" }
---------------------
=== output event
This event consists of a single serialized map containing a property
+change (string)+ which indicates the type of the change (currently only
"unspecified").
*Example:*
---------------------------
{ "change": "unspecified" }
---------------------------
== See also
For some languages, libraries are available (so you dont have to implement

View File

@ -58,6 +58,10 @@
*/
#define I3_IPC_EVENT_MASK (1 << 31)
/* The workspace event will be triggered upon changes in the workspace list */
#define I3_IPC_EVENT_WORKSPACE (I3_IPC_EVENT_MASK | 0)
/* The output event will be triggered upon changes in the output list */
#define I3_IPC_EVENT_OUTPUT (I3_IPC_EVENT_MASK | 1)
#endif

View File

@ -447,6 +447,8 @@ int handle_screen_change(void *prophs, xcb_connection_t *conn,
randr_query_outputs(conn);
ipc_send_event("output", I3_IPC_EVENT_OUTPUT, "{\"change\":\"unspecified\"}");
return 1;
}