ipc: fix current_workspace
This commit is contained in:
parent
a71d782da9
commit
fab8b84db7
@ -186,6 +186,9 @@ struct xoutput {
|
|||||||
/** Name of the output */
|
/** Name of the output */
|
||||||
char *name;
|
char *name;
|
||||||
|
|
||||||
|
/** Pointer to the Con which represents this output */
|
||||||
|
Con *con;
|
||||||
|
|
||||||
/** Whether the output is currently active (has a CRTC attached with a
|
/** Whether the output is currently active (has a CRTC attached with a
|
||||||
* valid mode) */
|
* valid mode) */
|
||||||
bool active;
|
bool active;
|
||||||
|
10
src/ipc.c
10
src/ipc.c
@ -343,13 +343,11 @@ IPC_HANDLER(get_outputs) {
|
|||||||
y(integer, output->rect.height);
|
y(integer, output->rect.height);
|
||||||
y(map_close);
|
y(map_close);
|
||||||
|
|
||||||
/*
|
|
||||||
* XXX
|
|
||||||
* No idea how to handle this, where should we get this data from?
|
|
||||||
* I think we might need to keep a reference to the CT_OUTPUT Con in Output
|
|
||||||
*/
|
|
||||||
ystr("current_workspace");
|
ystr("current_workspace");
|
||||||
y(null);
|
Con *ws = NULL;
|
||||||
|
if (output->con && (ws = con_get_fullscreen_con(output->con)))
|
||||||
|
ystr(ws->name);
|
||||||
|
else y(null);
|
||||||
|
|
||||||
y(map_close);
|
y(map_close);
|
||||||
}
|
}
|
||||||
|
@ -69,6 +69,7 @@ void tree_init() {
|
|||||||
oc->name = strdup(output->name);
|
oc->name = strdup(output->name);
|
||||||
oc->type = CT_OUTPUT;
|
oc->type = CT_OUTPUT;
|
||||||
oc->rect = output->rect;
|
oc->rect = output->rect;
|
||||||
|
output->con = oc;
|
||||||
|
|
||||||
char *name;
|
char *name;
|
||||||
asprintf(&name, "[i3 con] output %s", oc->name);
|
asprintf(&name, "[i3 con] output %s", oc->name);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user