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
|
Sent when the user switches to a different workspace, when a new
|
||||||
workspace is initialized or when a workspace is removed (because the
|
workspace is initialized or when a workspace is removed (because the
|
||||||
last client vanished).
|
last client vanished).
|
||||||
|
output::
|
||||||
|
Sent when RandR issues a change notification (of either screens,
|
||||||
|
outputs, CRTCs or output properties).
|
||||||
|
|
||||||
=== workspace event
|
=== workspace event
|
||||||
|
|
||||||
|
@ -272,6 +275,17 @@ This event consists of a single serialized map containing a property
|
||||||
{ "change": "focus" }
|
{ "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
|
== See also
|
||||||
|
|
||||||
For some languages, libraries are available (so you don’t have to implement
|
For some languages, libraries are available (so you don’t have to implement
|
||||||
|
|
|
@ -58,6 +58,10 @@
|
||||||
*/
|
*/
|
||||||
#define I3_IPC_EVENT_MASK (1 << 31)
|
#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)
|
#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
|
#endif
|
||||||
|
|
|
@ -447,6 +447,8 @@ int handle_screen_change(void *prophs, xcb_connection_t *conn,
|
||||||
|
|
||||||
randr_query_outputs(conn);
|
randr_query_outputs(conn);
|
||||||
|
|
||||||
|
ipc_send_event("output", I3_IPC_EVENT_OUTPUT, "{\"change\":\"unspecified\"}");
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue