Skip to content
This repository was archived by the owner on May 31, 2022. It is now read-only.

Commit 194a834

Browse files
author
Allen Webster
committed
fix more win32 clipboard bugs
1 parent fd51cb3 commit 194a834

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

platform_win32/win32_4ed.cpp

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -378,15 +378,6 @@ win32_read_clipboard_contents(Thread_Context *tctx, Arena *arena){
378378

379379
String_Const_u8 result = {};
380380

381-
#if 0
382-
b32 has_text = false;
383-
b32 has_unicode = IsClipboardFormatAvailable(CF_UNICODETEXT);
384-
if (!has_unicode){
385-
has_text = IsClipboardFormatAvailable(CF_TEXT);
386-
}
387-
b32 can_read = has_unicode || has_text;
388-
#endif
389-
390381
if (OpenClipboard(win32vars.window_handle)){
391382
b32 got_result = false;
392383
if (!got_result){
@@ -1942,7 +1933,9 @@ WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdS
19421933
win32_output_error_string(error_string);
19431934
}
19441935
win32vars.clip_wakeup_timer = system_wake_up_timer_create();
1945-
win32vars.clipboard_sequence = GetClipboardSequenceNumber();
1936+
win32vars.clipboard_sequence = 0;
1937+
win32vars.next_clipboard_is_self = 0;
1938+
#if 0
19461939
if (win32vars.clipboard_sequence == 0){
19471940
Scratch_Block scratch(win32vars.tctx);
19481941
win32_post_clipboard(scratch, "", 0);
@@ -1958,6 +1951,7 @@ WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdS
19581951
else{
19591952
log_os(" no initial sequence number\n");
19601953
}
1954+
#endif
19611955

19621956
log_os("Setting up keyboard layout...\n");
19631957
win32vars.kl_universal = LoadKeyboardLayoutW(L"00000409", 0);

0 commit comments

Comments
 (0)