Clipboard fix
Fixed duplicated entries in 4coder internal clipboard (Fix from VDK on the 4coder discord). Removed the unnecessary loop that was there to try to fix the clipboard missing entries (which was fixed previously by removing the `next_clipboard_is_self` variable).
This commit is contained in:
parent
dfce9bf369
commit
33c3428796
|
@ -448,6 +448,7 @@ win32_post_clipboard(Arena *scratch, char *text, i32 len){
|
||||||
SetClipboardData(CF_TEXT, memory_handle);
|
SetClipboardData(CF_TEXT, memory_handle);
|
||||||
}
|
}
|
||||||
CloseClipboard();
|
CloseClipboard();
|
||||||
|
win32vars.clipboard_sequence = GetClipboardSequenceNumber();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -456,14 +457,10 @@ system_get_clipboard_sig(){
|
||||||
String_Const_u8 result = {};
|
String_Const_u8 result = {};
|
||||||
DWORD new_number = GetClipboardSequenceNumber();
|
DWORD new_number = GetClipboardSequenceNumber();
|
||||||
if (new_number != win32vars.clipboard_sequence){
|
if (new_number != win32vars.clipboard_sequence){
|
||||||
win32vars.clipboard_sequence = new_number;
|
result = win32_read_clipboard_contents(win32vars.tctx, arena);
|
||||||
|
if (result.str != 0){
|
||||||
for (i32 R = 0; R < 8; ++R){
|
win32vars.clipboard_sequence = new_number;
|
||||||
result = win32_read_clipboard_contents(win32vars.tctx, arena);
|
}
|
||||||
if (result.str == 0){
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return(result);
|
return(result);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue