Fix clipboard crash from un-masked scratch on windows
parent
5b8d22a766
commit
b9b44f481a
|
@ -1306,7 +1306,7 @@ system_post_clipboard(String_Const_u8 str, i32 index){
|
||||||
// TODO(inso): index?
|
// TODO(inso): index?
|
||||||
//LINUX_FN_DEBUG("%.*s", string_expand(str));
|
//LINUX_FN_DEBUG("%.*s", string_expand(str));
|
||||||
linalloc_clear(&linuxvars.clipboard_arena);
|
linalloc_clear(&linuxvars.clipboard_arena);
|
||||||
linuxvars.clipboard_contents = push_u8_stringf(&linuxvars.clipboard_arena, "%.*s", str.size, str.str);
|
linuxvars.clipboard_contents = push_u8_stringf(&linuxvars.clipboard_arena, "%.*s", string_expand(str));
|
||||||
XSetSelectionOwner(linuxvars.dpy, linuxvars.atom_CLIPBOARD, linuxvars.win, CurrentTime);
|
XSetSelectionOwner(linuxvars.dpy, linuxvars.atom_CLIPBOARD, linuxvars.win, CurrentTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -355,7 +355,7 @@ system_get_keyboard_modifiers_sig(){
|
||||||
|
|
||||||
internal String_Const_u8
|
internal String_Const_u8
|
||||||
win32_read_clipboard_contents(Thread_Context *tctx, Arena *arena){
|
win32_read_clipboard_contents(Thread_Context *tctx, Arena *arena){
|
||||||
Scratch_Block scratch(tctx);
|
Scratch_Block scratch(tctx, arena);
|
||||||
|
|
||||||
String_Const_u8 result = {};
|
String_Const_u8 result = {};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue