Multi copy from other applications
This commit is contained in:
parent
bcff1f1f9f
commit
d04dd8879b
|
@ -695,7 +695,7 @@ CUSTOM_COMMAND_SIG(setup_new_project){
|
|||
if (sh_script != 0){
|
||||
fprintf(sh_script, "#!/bin/bash\n\n");
|
||||
|
||||
fprintf(sh_script, get_code_home);
|
||||
fprintf(sh_script, "%s", get_code_home);
|
||||
|
||||
fprintf(sh_script, "OPTS=%.*s\n",
|
||||
default_flags_sh.size, default_flags_sh.str);
|
||||
|
|
|
@ -74,6 +74,7 @@ osx_error_dialogue(char *str){
|
|||
}
|
||||
|
||||
- (void)requestDisplay;
|
||||
- (void)checkClipboard;
|
||||
- (CVReturn)getFrame;
|
||||
- (void)drawRect:(NSRect)bounds;
|
||||
@end
|
||||
|
@ -141,7 +142,18 @@ static DISPLINK_SIG(osx_display_link);
|
|||
[self setNeedsDisplayInRect:rect];
|
||||
}
|
||||
|
||||
static i32 did_update_for_clipboard = true;
|
||||
- (void)checkClipboard{
|
||||
NSPasteboard *board = [NSPasteboard generalPasteboard];
|
||||
if (board.changeCount != osx_objc.prev_clipboard_change_count && did_update_for_clipboard){
|
||||
[self requestDisplay];
|
||||
did_update_for_clipboard = false;
|
||||
}
|
||||
}
|
||||
|
||||
- (CVReturn)getFrame{
|
||||
did_update_for_clipboard = true;
|
||||
|
||||
@autoreleasepool
|
||||
{
|
||||
if (osx_objc.running){
|
||||
|
@ -637,15 +649,10 @@ NSWindow* window = 0;
|
|||
|
||||
void
|
||||
osx_schedule_step(void){
|
||||
//DBG_POINT();
|
||||
#if 1
|
||||
[NSTimer scheduledTimerWithTimeInterval: 0.0
|
||||
target: view
|
||||
selector: @selector(requestDisplay)
|
||||
userInfo: nil repeats:NO];
|
||||
#else
|
||||
[view requestDisplay];
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -700,6 +707,11 @@ main(int argc, char **argv){
|
|||
[window setTitle:@WINDOW_NAME];
|
||||
[window makeKeyAndOrderFront:nil];
|
||||
|
||||
[NSTimer scheduledTimerWithTimeInterval: 0.5
|
||||
target: view
|
||||
selector: @selector(checkClipboard)
|
||||
userInfo: nil repeats:YES];
|
||||
|
||||
osx_init();
|
||||
|
||||
[NSApp run];
|
||||
|
|
Loading…
Reference in New Issue