From 7d60f7ed9c7f1cca1f55c1c96b97b026af119527 Mon Sep 17 00:00:00 2001 From: Duncan Tourolle Date: Sun, 23 Aug 2026 08:46:01 +0200 Subject: [PATCH] fix(android): a Linux gate that outlived its caller broke the build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `set_current_item` was `#[cfg(target_os = "linux")]` from when its caller was a `#[cfg]` branch too. d3ecd8ee correctly replaced that branch with a runtime question — "does this renderer draw the picture?" — which means the `else` arm is now compiled on every platform, including ones where it never runs. The gate stayed, so the Android build stopped compiling at that commit. It went unnoticed because nothing built for Android afterwards. CI's Android `cargo check` would have caught it; this branch has never been pushed. Also adds the widget's allocation origin to the video-surface log. A GtkBox is a no-window widget, so `widget.window()` is the parent's GdkWindow and the box sits at an offset inside it; if `draw_from_gl` does not honour the cairo translation GTK applied, the picture lands at the window origin instead of the widget's — misaligned by exactly that offset, which is the shape of a letterbox that does not line up. Logging the origin says whether that is what is happening before anyone changes the geometry. --- src-tauri/src/player/mod.rs | 7 ++++++- src-tauri/src/player/video_surface.rs | 14 +++++++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/src-tauri/src/player/mod.rs b/src-tauri/src/player/mod.rs index cbca0101..7bac5371 100644 --- a/src-tauri/src/player/mod.rs +++ b/src-tauri/src/player/mod.rs @@ -519,7 +519,12 @@ impl PlayerController { /// Used on platforms where video is rendered outside the native backend /// (Linux WebKitGTK HTML5