Initial commit
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
diff -bur fltk-1.3.0r9619.org/src/Fl_cocoa.mm fltk-1.3.0r9619/src/Fl_cocoa.mm
|
||||
--- fltk-1.3.0r9619.org/src/Fl_cocoa.mm 2012-06-18 19:24:30.971688769 +0200
|
||||
+++ fltk-1.3.0r9619/src/Fl_cocoa.mm 2012-06-18 19:25:25.700310375 +0200
|
||||
@@ -1319,9 +1319,13 @@
|
||||
}
|
||||
@end
|
||||
|
||||
+static void clipboard_check(void);
|
||||
+
|
||||
@implementation FLApplication
|
||||
+ (void)sendEvent:(NSEvent *)theEvent
|
||||
{
|
||||
+ // update clipboard status
|
||||
+ clipboard_check();
|
||||
NSEventType type = [theEvent type];
|
||||
if (type == NSLeftMouseDown) {
|
||||
fl_lock_function();
|
||||
@@ -2790,6 +2794,26 @@
|
||||
PasteboardCreate(kPasteboardClipboard, &myPasteboard);
|
||||
}
|
||||
|
||||
+extern void fl_trigger_clipboard_notify(int source);
|
||||
+
|
||||
+void fl_clipboard_notify_change() {
|
||||
+ // No need to do anything here...
|
||||
+}
|
||||
+
|
||||
+static void clipboard_check(void)
|
||||
+{
|
||||
+ PasteboardSyncFlags flags;
|
||||
+
|
||||
+ allocatePasteboard();
|
||||
+ flags = PasteboardSynchronize(myPasteboard);
|
||||
+
|
||||
+ if (!(flags & kPasteboardModified))
|
||||
+ return;
|
||||
+ if (flags & kPasteboardClientIsOwner)
|
||||
+ return;
|
||||
+
|
||||
+ fl_trigger_clipboard_notify(1);
|
||||
+}
|
||||
|
||||
/*
|
||||
* create a selection
|
||||
Reference in New Issue
Block a user