ipc: implement output event
This commit is contained in:
parent
4ce0d6f014
commit
aec40126b4
14
docs/ipc
14
docs/ipc
|
@ -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 don’t have to implement
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue