GTK Clipboard issue on Mac emulator
For very long now, I have experienced (on the Mac emulator) that often a second hardcopy command does not register into the clipboard. The solution was to quit the emulator, restart, and then Hardcopy of the same screen works.
I got tired of that and searched to find this tip: https://stackoverflow.com/questions/2418487/clear-the-system-clipboard-using-the-gtk-lib-in-c/2419673#2419673 which seems to work.
I implemented it in my branch in screen.c and it seems to be working, or at least the clipboard hasn't yet failed again. I will report if it does.
void copyScreenToClipboard(void) {
...
clipboard = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD);
gtk_clipboard_clear(clipboard);
**gtk_clipboard_set_text(clipboard, "", 0); //JM FOUND TIP TO PROPERLY CLEAR CLIPBOARD**
and the same in
void copyRegisterXToClipboard(void) {