Since wlr_output_enable doesn't have any effect before finishing all the procedure, a little hack allows to make use of focusmon(), which must know the latest in about which output is currently disabled
Also improve performance in focusmon() and cleaner code in outputmgrapplyortest()
22AOV53ZPZKPZPJGHYOLNJYTUNQEB55NXSDW3HNFXD4IX4KXGHTAC E2R42IRNQ5XSPNVGV6YNTHVQF53UG46G3MZ3HE3KLTRN7LUZLRAQC YHZK5M5YT2UTQMKA7MOGKNTCNHTITIVTZWCV34NGWLHAZVGJWT4AC 7B74AT3BXYB7PVW4F6SGQNPMHOU5TEV5TZ54CG6VSQI46XSEKWXQC NLOBELMSKHUSKSMPZ2QSDVIOJRGWV7HNXNIKZ55TMUCH7DI73TAAC ECWSMUGSFAFGG3BNRFXTRJRC3NLZF67M5RSSW6AXAZP42O3F4VPQC L2ERA3TQPLMFAEQVNC5RFDTO532JQPHLYVBCE3JZT2J6VSXG4IJQC Z5S64ZSKKSAUU62WBIQFYQP6B6M2STGV7PSJKEL2FGC4VRLWFLDAC KNZTVAWZZH2ES6EIZNB3MSQBNQAC4IPUJKOUCBVOPDRP6UQQBBDQC if (!config_head->state.enabled) {wl_list_for_each(m, &mons, link) {if (m->wlr_output->name == wlr_output->name) {// focus the left monitor (relative to the current focus)focusmon(&ar);closemon(m);}}}
} else {Monitor *m;wl_list_for_each(m, &mons, link) {if (m->wlr_output->name == wlr_output->name) {// focus the left monitor (relative to the current focus)m->wlr_output->enabled = !m->wlr_output->enabled;focusmon(&ar);closemon(m);m->wlr_output->enabled = !m->wlr_output->enabled;}}