mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-31 22:25:21 -04:00
xdg-toplevel: check that title provided actually is UTF-8
While the xdg-shell protocol requires this, it does not yet have a dedicated error code for invalid titles; this commit makes wlroots send a generic error instead.
This commit is contained in:
parent
41494244df
commit
a3d22dbe97
4 changed files with 85 additions and 0 deletions
11
include/util/utf8.h
Normal file
11
include/util/utf8.h
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
#ifndef UTIL_UTF8_H
|
||||
#define UTIL_UTF8_H
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
/**
|
||||
* Return true if and only if the string is a valid UTF-8 sequence.
|
||||
*/
|
||||
bool is_utf8(const char *string);
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue