module/foreign-toplevel: track outputs each toplevel is mapped on

* Bind the foreign-toplevel-manager object *after* the first round of
  global objects. This ensures we bind all pre-existing wl-output
  objects before binding the toplevel manager. This is important, since
  otherwise we wont get any output_enter() events for the initial set of
  toplevels.

* Bind xdg-output-manager, to be able to bind xdg-output objects for
  each wl-output.

* Add xdg-output-listener to each wl/xdg-output, to be able to get the
  outputs’ names.

* Add a list of outputs to each toplevel. The output_enter() event
  adds to this list, and output_leave() removes from it.

* Add option ‘all-monitors’. When not set (the default), toplevels are
  only included in the generated content if they are mapped on the same
  output as the bar itself. When *not* set, all toplevels are always
  included in the generated content.
This commit is contained in:
Daniel Eklöf 2021-08-25 09:38:26 +02:00
parent 01c6fc5f52
commit 589a6f528a
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
3 changed files with 312 additions and 23 deletions

View file

@ -72,7 +72,7 @@ if backend_wayland
endforeach
mod_data += {
'foreign-toplevel': [[ftop_proto_headers + ftop_proto_src], [dynlist]],
'foreign-toplevel': [[wl_proto_src + wl_proto_headers + ftop_proto_headers + ftop_proto_src], [dynlist]],
}
endif