Don't advertise the noop output

This commit is contained in:
Isaac Freund 2020-04-15 12:23:14 +02:00
parent 9ee61b3bf9
commit 5da3935c18
No known key found for this signature in database
GPG Key ID: 86DED400DDFD7A11
3 changed files with 16 additions and 9 deletions

View File

@ -31,3 +31,7 @@ struct wlr_backend *river_wlr_noop_backend_create(struct wl_display *display) {
struct wlr_output *river_wlr_noop_add_output(struct wlr_backend *backend) {
return wlr_noop_add_output(backend);
}
bool river_wlr_output_is_noop(struct wlr_output *output) {
return wlr_output_is_noop(output);
}

View File

@ -29,5 +29,6 @@ bool river_wlr_backend_is_multi(struct wlr_backend *backend);
struct wlr_session *river_wlr_backend_get_session(struct wlr_backend *backend);
struct wlr_backend *river_wlr_noop_backend_create(struct wl_display *display);
struct wlr_output *river_wlr_noop_add_output(struct wlr_backend *backend);
bool river_wlr_output_is_noop(struct wlr_output *output);
#endif

View File

@ -86,6 +86,7 @@ pub const Output = struct {
self.listen_mode.notify = handleMode;
c.wl_signal_add(&wlr_output.events.mode, &self.listen_mode);
if (!c.river_wlr_output_is_noop(wlr_output)) {
// Add the new output to the layout. The add_auto function arranges outputs
// from left-to-right in the order they appear. A more sophisticated
// compositor would let the user configure the arrangement of outputs in the
@ -97,6 +98,7 @@ pub const Output = struct {
// DPI, scale factor, manufacturer, etc).
c.wlr_output_create_global(wlr_output);
}
}
/// Add a new view to the output. arrangeViews() will be called by the view
/// when it is mapped.