aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-11-16 12:17:08 +0100
committerdec05eba <dec05eba@protonmail.com>2021-11-16 12:17:08 +0100
commit62a89c4bf63357fb95c34898a37ff663293a8dea (patch)
tree8ef3fc321a0461ab158c14669b1e647dfe55da69 /tests
parenteba962c3e353b3fd3f11e30a7d6f48585e3a153c (diff)
Ensure window gets clipboard owner before setting clipboard string
Diffstat (limited to 'tests')
-rw-r--r--tests/main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/main.c b/tests/main.c
index a9aebec..cee3ec7 100644
--- a/tests/main.c
+++ b/tests/main.c
@@ -256,8 +256,9 @@ int main(int argc, char **argv) {
}
case MGL_EVENT_KEY_PRESSED: {
if(event.key.code == MGL_KEY_C) {
- mgl_window_set_clipboard(&window, "hello", 5);
- fprintf(stderr, "Copied 'hello' to the clipboard\n");
+ const char *str = "東京都, Tōkyō-to";
+ mgl_window_set_clipboard(&window, str, strlen(str));
+ fprintf(stderr, "Copied '%s' to the clipboard\n", str);
} else if(event.key.code == MGL_KEY_V) {
char *str;
size_t size;