Skip to content

HotFix: Fix Linux Building Errors - #24

Merged
kiyarose merged 3 commits into
mainfrom
cursor/embed-media-renderer-5158
May 20, 2026
Merged

HotFix: Fix Linux Building Errors#24
kiyarose merged 3 commits into
mainfrom
cursor/embed-media-renderer-5158

Conversation

@kiyarose

Copy link
Copy Markdown
Member

This pull request introduces version 2.8.1 of PinStick, updating version numbers across all platforms and adding new features and improvements for media handling and overlay support. The most significant changes include new Swift support utilities for media and overlay window management, enhancements to overlay mode documentation and Linux support, and a fix for X11 cursor handling on Linux.


Version Bump:

  • Bumped the app version to 2.8.1 in all relevant files, including Jot.xcodeproj/project.pbxproj, cross-platform/package.json, cross-platform/package-lock.json, cross-platform/src-tauri/Cargo.toml, and cross-platform/src-tauri/tauri.conf.json to reflect the new release. [1][2][3][4][5][6][7][8][9][10]

New Swift Support Utilities:

  • Added MediaNoteSupport.swift, providing utilities for classifying, parsing, and managing local and remote media items in notes, including secure bookmark handling and media type detection.
  • Added OverlayWindowSupport.swift, which encapsulates overlay window features such as opacity persistence, overlay application, mouse event management, and a polling-based mouse monitor class for overlay mode.

Overlay Mode and Cross-Platform Documentation:

  • Updated the README.md to document overlay mode support, including platform-specific notes for Linux (X11 and Wayland), and clarified overlay mode features in the cross-platform Tauri app.

Linux/X11 Cursor Handling Fix:

  • Improved X11 cursor position retrieval in cross-platform/src-tauri/src/main.rs by introducing a cached display connection, ensuring correct behavior and stability when running on Linux/X11.

These changes collectively improve media handling, overlay window management, and cross-platform stability, while preparing the app for the 2.8.1 release.

@kiyarose
kiyarose requested a review from CopilotMay 20, 2026 05:48
@kiyarosekiyarose self-assigned this May 20, 2026
@kiyarosekiyarose added the bug Something isn't working label May 20, 2026
@kiyarose
kiyarose marked this pull request as draft May 20, 2026 05:48
@kiyarose
kiyarose marked this pull request as ready for review May 20, 2026 05:48
@deepsource-io

deepsource-ioBot commented May 20, 2026

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in df14682...de6e705 on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

Overall GradeSecurity

Reliability

Complexity

Hygiene

Code Review Summary

AnalyzerStatusUpdated (UTC)Details
RustMay 20, 2026 5:54a.m.Review ↗

Important

AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR prepares PinStick v2.8.1 with a cross-platform version bump, adds macOS-side media + overlay support utilities/UI, and adjusts the Linux/X11 cursor implementation in the Tauri app to address build/runtime issues.

Changes:

  • Bump versions to 2.8.1 across Xcode project + Tauri (Cargo + npm + tauri.conf).
  • Add macOS note enhancements: persisted note text, local/remote media embedding, and overlay-mode window behavior.
  • Update Linux cursor handling by introducing a cached X11 Display* for X11 cursor queries.

Reviewed changes

Copilot reviewed 9 out of 11 changed files in this pull request and generated 5 comments.

Show a summary per file
FileDescription
README.mdDocuments overlay mode behavior, including Linux X11 vs Wayland limitations.
PinStickApp.swiftImplements macOS media embedding UI and overlay mode behavior/state.
OverlayWindowSupport.swiftAdds macOS overlay window helpers + polling mouse monitor for click-through control.
MediaNoteSupport.swiftAdds parsing/classification and bookmark persistence for note media.
Jot.xcodeproj/project.pbxprojBumps MARKETING_VERSION to 2.8.1 across targets/configs.
cross-platform/src-tauri/tauri.conf.jsonBumps Tauri app version to 2.8.1.
cross-platform/src-tauri/src/main.rsUpdates Linux/X11 cursor retrieval with cached X11 display helper.
cross-platform/src-tauri/Cargo.tomlBumps Rust crate version to 2.8.1.
cross-platform/src-tauri/Cargo.lockUpdates locked crate version to 2.8.1.
cross-platform/package.jsonBumps npm package version to 2.8.1.
cross-platform/package-lock.jsonUpdates lockfile package versions to 2.8.1.
Files not reviewed (1)
  • cross-platform/package-lock.json: Language not supported
Comments suppressed due to low confidence (1)

cross-platform/src-tauri/src/main.rs:229

  • linux_x_display() returns a single shared Display* used by XQueryPointer. Tauri commands can run concurrently, and Xlib requires either XInitThreads + locking or external synchronization around Display usage. Consider guarding Xlib calls with a Mutex (or initializing Xlib threading) to avoid data races/UB under concurrent command invocations.
 let display = linux_x_display()?;
let mut root_return: xlib::Window = 0;
let mut child_return: xlib::Window = 0;
let mut root_x: i32 = 0;
let mut root_y: i32 = 0;
let mut win_x: i32 = 0;
let mut win_y: i32 = 0;
let mut mask: u32 = 0;
let ok = xlib::XQueryPointer(

Comment threadPinStickApp.swift
Comment on lines +81 to 83
private var remoteMedia: [RemoteMediaItem] {
MediaNoteSupport.parseRemoteMedia(from: text)
}
Comment threadPinStickApp.swift
Comment on lines +219 to +225

if let existing = localMedia {
existing.url.stopAccessingSecurityScopedResource()
}

MediaNoteSupport.saveLocalMediaBookmark(for: url)
_ = url.startAccessingSecurityScopedResource()
Comment threadPinStickApp.swift Outdated
Comment on lines +56 to +58
let markdownPattern = #"!\[[^\]]*\]\((https?://[^)\s]+)\)"#
if let regex = try? NSRegularExpression(pattern: markdownPattern) {
let range = NSRange(noteText.startIndex..<noteText.endIndex, in: noteText)
Comment threadcross-platform/src-tauri/src/main.rs Outdated
Comment on lines +194 to +198
static DISPLAY: OnceLock<Result<*mut xlib::Display, String>> = OnceLock::new();
DISPLAY
.get_or_init(|| unsafe {
let display = xlib::XOpenDisplay(std::ptr::null());
if display.is_null() {
@kiyarose
kiyarose marked this pull request as draft May 20, 2026 05:53
@kiyarose
kiyarose marked this pull request as ready for review May 20, 2026 05:55
@kiyarose
kiyarose merged commit 35a6fce into mainMay 20, 2026
5 checks passed
@kiyarose
kiyarose deleted the cursor/embed-media-renderer-5158 branch May 20, 2026 06:02
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugSomething isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@kiyarose