mirror of
https://github.com/TTimo/GtkRadiant.git
synced 2025-01-09 11:30:51 +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
06582069d5
commit
242b6e1e3d
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