wayland: handle outputs disappearing

That is, deal with monitors being unplugged.

At least on Sway 1.4, surfaces are not unmapped before the output is
removed. Thus, in addition to free:ing the monitor resources, we also
need to update all terminals that are mapped on this output - remove
the output from their "mapped on" list.
This commit is contained in:
Daniel Eklöf 2020-04-27 20:46:40 +02:00
parent 37871aad84
commit 9cfe720000
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
2 changed files with 51 additions and 11 deletions

View file

@ -20,6 +20,7 @@ struct monitor {
struct wl_output *output;
struct zxdg_output_v1 *xdg;
char *name;
uint32_t wl_name;
int x;
int y;