Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/build-full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,21 +83,21 @@ jobs:
if: runner.os == 'Linux'
run: |
# sync deps
nimble install -y -d
nimble install -y -d --feature:dev
nimble installTestDeps

- name: Install Deps
if: runner.os == 'macOS'
run: |
# sync deps
nimble install -y -d
nimble install -y -d --feature:dev
nimble installTestDeps

- name: Install Deps
if: runner.os == 'Windows'
run: |
# sync deps
nimble install -y -d
nimble install -y -d --feature:dev
nimble installTestDeps

- name: Build Tests
Expand Down
4 changes: 2 additions & 2 deletions siwin.nimble
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = "1.0.0"
version = "1.0.1"
author = "levovix0"
description = "Cross-platform window creation and event handling library"
license = "MIT"
Expand All @@ -21,7 +21,7 @@ when defined(android):
requires "https://github.com/yglukhov/android"

when defined(macosx):
requires "darwin >= 0.2.4"
requires "darwin#30d16cf0983124057a57553a0f1f9fd5df525f84"

feature "dev":
requires "opengl"
Expand Down
10 changes: 5 additions & 5 deletions src/siwin/platforms/cocoa/window.nim
Original file line number Diff line number Diff line change
Expand Up @@ -1050,7 +1050,7 @@ method content*(
clipboard: ClipboardCocoa, kind: ClipboardContentKind, mimeType: string
): ClipboardContent =
autoreleasepool:
let pasteboard = NSPasteboard.withName(NSPasteboardNameGeneral)
let pasteboard = NSPasteboard.generalPasteboard()
clipboard.refreshClipboardAvailability(pasteboard)
let targetType = bestMimeType(clipboard.availableMimeTypes, kind, mimeType)
if targetType.len == 0:
Expand All @@ -1070,7 +1070,7 @@ method content*(

method `content=`*(clipboard: ClipboardCocoa, content: ClipboardConvertableContent) =
autoreleasepool:
let pasteboard = NSPasteboard.withName(NSPasteboardNameGeneral)
let pasteboard = NSPasteboard.generalPasteboard()
if pasteboard == nil:
return

Expand Down Expand Up @@ -1101,7 +1101,7 @@ method `content=`*(clipboard: ClipboardCocoa, content: ClipboardConvertableConte
continue

let data = stringToNSData(serialized)
discard item.setDataForType(data, @targetType)
discard item.setData(data, @targetType)
availableKinds.incl converted.kind
if converted.kind != ClipboardContentKind.other:
availableKinds.incl ClipboardContentKind.other
Expand All @@ -1110,8 +1110,8 @@ method `content=`*(clipboard: ClipboardCocoa, content: ClipboardConvertableConte
if availableMimeTypes.len == 0:
return

pasteboard.clearContents()
pasteboard.writeObjects(arrayWithObjects[NSPasteboardItem](item))
discard pasteboard.clearContents()
discard pasteboard.writeObjects(arrayWithObjects[NSPasteboardItem](item))
clipboard.availableKinds = availableKinds
clipboard.availableMimeTypes = availableMimeTypes

Expand Down
Loading