File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -52,6 +52,22 @@ use tauri::Manager;
5252use window_vibrancy:: { apply_vibrancy, NSVisualEffectMaterial } ;
5353
5454fn main ( ) {
55+ // Apply Linux/Wayland workarounds for WebKitGTK GBM buffer issues (especially on NVIDIA)
56+ // This must be done before any GTK/WebKit initialization
57+ #[ cfg( target_os = "linux" ) ]
58+ {
59+ use std:: env;
60+ // Only apply fix for Wayland sessions where GBM buffer issues occur
61+ let is_wayland = env:: var ( "WAYLAND_DISPLAY" ) . is_ok ( )
62+ || env:: var ( "XDG_SESSION_TYPE" )
63+ . map ( |v| v == "wayland" )
64+ . unwrap_or ( false ) ;
65+
66+ if is_wayland && env:: var ( "WEBKIT_DISABLE_DMABUF_RENDERER" ) . is_err ( ) {
67+ env:: set_var ( "WEBKIT_DISABLE_DMABUF_RENDERER" , "1" ) ;
68+ }
69+ }
70+
5571 // Initialize logger
5672 env_logger:: init ( ) ;
5773
Original file line number Diff line number Diff line change @@ -233,17 +233,17 @@ async fn resume_claude_code() -> Json<ApiResponse<serde_json::Value>> {
233233}
234234
235235/// Cancel Claude execution
236- async fn cancel_claude_execution ( Path ( sessionId ) : Path < String > ) -> Json < ApiResponse < ( ) > > {
236+ async fn cancel_claude_execution ( Path ( session_id ) : Path < String > ) -> Json < ApiResponse < ( ) > > {
237237 // In web mode, we don't have a way to cancel the subprocess cleanly
238238 // The WebSocket closing should handle cleanup
239- println ! ( "[TRACE] Cancel request for session: {}" , sessionId ) ;
239+ println ! ( "[TRACE] Cancel request for session: {}" , session_id ) ;
240240 Json ( ApiResponse :: success ( ( ) ) )
241241}
242242
243243/// Get Claude session output
244- async fn get_claude_session_output ( Path ( sessionId ) : Path < String > ) -> Json < ApiResponse < String > > {
244+ async fn get_claude_session_output ( Path ( session_id ) : Path < String > ) -> Json < ApiResponse < String > > {
245245 // In web mode, output is streamed via WebSocket, not stored
246- println ! ( "[TRACE] Output request for session: {}" , sessionId ) ;
246+ println ! ( "[TRACE] Output request for session: {}" , session_id ) ;
247247 Json ( ApiResponse :: success (
248248 "Output available via WebSocket only" . to_string ( ) ,
249249 ) )
You can’t perform that action at this time.
0 commit comments