mirror of
https://github.com/UberGames/GtkRadiant.git
synced 2024-11-10 06:31:41 +00:00
#196 Workaround to get internal clipboard working on Mac. Even if retrieving the selection from the OS fails, if we still have something in the local clipboard buffer, use it. This at least restores the standard copy-paste workflow within the editor. @TTimo please review.
This commit is contained in:
parent
b992d051fb
commit
31ad3cbdeb
1 changed files with 2 additions and 1 deletions
|
@ -2110,12 +2110,13 @@ static void clipboard_clear( GtkClipboard *clipboard, gpointer user_data_or_owne
|
|||
}
|
||||
|
||||
static void clipboard_received( GtkClipboard *clipboard, GtkSelectionData *data, gpointer user_data ){
|
||||
g_Clipboard.SetLength( 0 );
|
||||
//g_Clipboard.SetLength( 0 );
|
||||
|
||||
if ( data->length < 0 ) {
|
||||
Sys_FPrintf( SYS_ERR, "Error retrieving selection\n" );
|
||||
}
|
||||
else if ( strcmp( gdk_atom_name( data->type ), clipboard_targets[0].target ) == 0 ) {
|
||||
g_Clipboard.SetLength( 0 );
|
||||
g_Clipboard.Write( data->data, data->length );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue