diff options
-rw-r--r-- | include/wlr/types/wlr_output_layout.h | 4 | ||||
-rw-r--r-- | types/wlr_output_layout.c | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/include/wlr/types/wlr_output_layout.h b/include/wlr/types/wlr_output_layout.h index bb73958e..41f06c25 100644 --- a/include/wlr/types/wlr_output_layout.h +++ b/include/wlr/types/wlr_output_layout.h @@ -82,7 +82,7 @@ struct wlr_output *wlr_output_layout_output_at( * * Returns true on success, false on a memory allocation error. */ -bool wlr_output_layout_add(struct wlr_output_layout *layout, +struct wlr_output_layout_output *wlr_output_layout_add(struct wlr_output_layout *layout, struct wlr_output *output, int lx, int ly); /** @@ -94,7 +94,7 @@ bool wlr_output_layout_add(struct wlr_output_layout *layout, * * Returns true on success, false on a memory allocation error. */ -bool wlr_output_layout_add_auto(struct wlr_output_layout *layout, +struct wlr_output_layout_output *wlr_output_layout_add_auto(struct wlr_output_layout *layout, struct wlr_output *output); /** diff --git a/types/wlr_output_layout.c b/types/wlr_output_layout.c index 221c8071..22a79c89 100644 --- a/types/wlr_output_layout.c +++ b/types/wlr_output_layout.c @@ -165,7 +165,7 @@ static struct wlr_output_layout_output *output_layout_output_create( return l_output; } -static bool output_layout_add(struct wlr_output_layout *layout, +static struct wlr_output_layout_output *output_layout_add(struct wlr_output_layout *layout, struct wlr_output *output, int lx, int ly, bool auto_configured) { struct wlr_output_layout_output *l_output = @@ -174,7 +174,7 @@ static bool output_layout_add(struct wlr_output_layout *layout, if (is_new) { l_output = output_layout_output_create(layout, output); if (l_output == NULL) { - return false; + return NULL; } } @@ -189,15 +189,15 @@ static bool output_layout_add(struct wlr_output_layout *layout, wl_signal_emit_mutable(&layout->events.add, l_output); } - return true; + return l_output; } -bool wlr_output_layout_add(struct wlr_output_layout *layout, +struct wlr_output_layout_output *wlr_output_layout_add(struct wlr_output_layout *layout, struct wlr_output *output, int lx, int ly) { return output_layout_add(layout, output, lx, ly, false); } -bool wlr_output_layout_add_auto(struct wlr_output_layout *layout, +struct wlr_output_layout_output *wlr_output_layout_add_auto(struct wlr_output_layout *layout, struct wlr_output *output) { return output_layout_add(layout, output, 0, 0, true); } |