mirror of
https://github.com/labwc/labwc.git
synced 2025-11-05 13:29:58 -05:00
output: assert instead of quiet return
This commit is contained in:
parent
afe666fd6e
commit
238fab1518
1 changed files with 3 additions and 4 deletions
|
|
@ -7,6 +7,7 @@
|
||||||
|
|
||||||
#define _POSIX_C_SOURCE 200809L
|
#define _POSIX_C_SOURCE 200809L
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
#include <assert.h>
|
||||||
#include <wlr/types/wlr_xdg_output_v1.h>
|
#include <wlr/types/wlr_xdg_output_v1.h>
|
||||||
#include <wlr/types/wlr_output_damage.h>
|
#include <wlr/types/wlr_output_damage.h>
|
||||||
#include <wlr/util/region.h>
|
#include <wlr/util/region.h>
|
||||||
|
|
@ -48,7 +49,7 @@ output_for_each_surface_iterator(struct wlr_surface *surface, int sx, int sy,
|
||||||
{
|
{
|
||||||
struct surface_iterator_data *data = user_data;
|
struct surface_iterator_data *data = user_data;
|
||||||
struct output *output = data->output;
|
struct output *output = data->output;
|
||||||
if (!surface || !wlr_surface_has_buffer(surface)) {
|
if (!wlr_surface_has_buffer(surface)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
struct wlr_box surface_box = {
|
struct wlr_box surface_box = {
|
||||||
|
|
@ -78,9 +79,7 @@ output_surface_for_each_surface(struct output *output,
|
||||||
.ox = ox,
|
.ox = ox,
|
||||||
.oy = oy,
|
.oy = oy,
|
||||||
};
|
};
|
||||||
if (!surface) {
|
assert(surface);
|
||||||
return;
|
|
||||||
}
|
|
||||||
wlr_surface_for_each_surface(surface,
|
wlr_surface_for_each_surface(surface,
|
||||||
output_for_each_surface_iterator, &data);
|
output_for_each_surface_iterator, &data);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue