mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-22 04:45:58 +01:00
compositor: fix wlr_surface_set_role() error messages
This commit is contained in:
parent
fffa1908af
commit
0040c78c0b
1 changed files with 3 additions and 4 deletions
|
@ -774,7 +774,7 @@ bool wlr_surface_set_role(struct wlr_surface *surface,
|
||||||
if (surface->role != NULL && surface->role != role) {
|
if (surface->role != NULL && surface->role != role) {
|
||||||
if (error_resource != NULL) {
|
if (error_resource != NULL) {
|
||||||
wl_resource_post_error(error_resource, error_code,
|
wl_resource_post_error(error_resource, error_code,
|
||||||
"Cannot assign role %s to wl_surface@%" PRIu32 ", already has role %s\n",
|
"Cannot assign role %s to wl_surface@%" PRIu32 ", already has role %s",
|
||||||
role->name, wl_resource_get_id(surface->resource),
|
role->name, wl_resource_get_id(surface->resource),
|
||||||
surface->role->name);
|
surface->role->name);
|
||||||
}
|
}
|
||||||
|
@ -782,9 +782,8 @@ bool wlr_surface_set_role(struct wlr_surface *surface,
|
||||||
}
|
}
|
||||||
if (surface->role_data != NULL && surface->role_data != role_data) {
|
if (surface->role_data != NULL && surface->role_data != role_data) {
|
||||||
wl_resource_post_error(error_resource, error_code,
|
wl_resource_post_error(error_resource, error_code,
|
||||||
"Cannot reassign role %s to wl_surface@%" PRIu32 ","
|
"Cannot reassign role %s to wl_surface@%" PRIu32 ", role object still exists",
|
||||||
"role object still exists", role->name,
|
role->name, wl_resource_get_id(surface->resource));
|
||||||
wl_resource_get_id(surface->resource));
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue