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,16 +86,18 @@ pub const Output = struct {
self.listen_mode.notify = handleMode;
c.wl_signal_add(&wlr_output.events.mode, &self.listen_mode);
// 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
// layout.
c.wlr_output_layout_add_auto(root.wlr_output_layout, wlr_output);
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
// layout.
c.wlr_output_layout_add_auto(root.wlr_output_layout, wlr_output);
// Creating the global adds a wl_output global to the display, which Wayland
// clients can see to find out information about the output (such as
// DPI, scale factor, manufacturer, etc).
c.wlr_output_create_global(wlr_output);
// Creating the global adds a wl_output global to the display, which Wayland
// clients can see to find out information about the output (such as
// 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