add todos + make sure non-implimented platforms still work.

This commit is contained in:
David Rubin
2023-11-04 00:50:26 -07:00
parent a578ec342f
commit 65c9ba0a86
3 changed files with 5 additions and 3 deletions

View File

@ -1165,7 +1165,7 @@ pub fn keyCallback(
/// if bracketed mode is on this will do a bracketed paste. Otherwise, /// if bracketed mode is on this will do a bracketed paste. Otherwise,
/// this will filter newlines to '\r'. /// this will filter newlines to '\r'.
pub fn textCallback(self: *Surface, text: []const u8) !void { pub fn textCallback(self: *Surface, text: []const u8) !void {
try self.completeClipboardPaste(text, false); try self.completeClipboardPaste(text, true);
} }
pub fn focusCallback(self: *Surface, focused: bool) !void { pub fn focusCallback(self: *Surface, focused: bool) !void {

View File

@ -1360,7 +1360,8 @@ pub const CAPI = struct {
if (str_len == 0) return; if (str_len == 0) return;
const str = str_ptr[0..str_len]; const str = str_ptr[0..str_len];
ptr.core_surface.completeClipboardRequest(state.*, str, false) catch |err| { // TODO: Support sanaization for MacOS (force: false)
ptr.core_surface.completeClipboardRequest(state.*, str, true) catch |err| {
log.err("error completing clipboard request err={}", .{err}); log.err("error completing clipboard request err={}", .{err});
return; return;
}; };

View File

@ -589,7 +589,8 @@ pub const Surface = struct {
}; };
// Complete our request // Complete our request
try self.core_surface.completeClipboardRequest(state, str, false); // TODO: Support sanaization for GLFW (force: false)
try self.core_surface.completeClipboardRequest(state, str, true);
} }
/// Set the clipboard. /// Set the clipboard.