Properly close disabled outputs restored during a restart. ()

If an output is disabled during a restart, for example because a binding
such as

    bindsym $mod+Shift+r exec "xrandr --auto", restart

is used, it can happen that we first write the layout to disk and only
then receive the RandR change events. This leads to a situation where
the restored tree will contain these outputs, but the restarted i3
process will not receive the RandR events, thus the internal output in i3
is marked disabled.

This patch finds these cases after a restart and force-disables the
affected outputs.

fixes 
This commit is contained in:
Ingo Bürk
2016-05-08 12:49:24 +02:00
committed by Michael Stapelberg
parent a8757625c3
commit dbafb3cf23
3 changed files with 124 additions and 81 deletions

@ -60,6 +60,12 @@ void init_ws_for_output(Output *output, Con *content);
*/
void randr_query_outputs(void);
/**
* Disables the output and moves its content.
*
*/
void randr_disable_output(Output *output);
/**
* Returns the first output which is active.
*