aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRose Hudson <rose@krx.sh>2023-08-22 11:51:59 +0200
committerSimon Ser <contact@emersion.fr>2023-08-22 11:53:25 +0200
commit91f813ffb75026baacdccf0f526ba6ee29dcd790 (patch)
tree4a8efe4c92b478003437252ecb1c839e6b70044b
parente85c79051cc5003568ace6a29ce6e13d16796e48 (diff)
output_layout: return wlr_output_layout_output when adding output
This will be used for the scene-graph integration.
-rw-r--r--include/wlr/types/wlr_output_layout.h4
-rw-r--r--types/wlr_output_layout.c10
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);
}