Skip to content

Fix widget rendering issue on Raspberry Pi OS startup - #856

Open
jendrikseipp with Copilot wants to merge 1 commit into
masterfrom
copilot/fix-829-2
Open

Fix widget rendering issue on Raspberry Pi OS startup#856
jendrikseipp with Copilot wants to merge 1 commit into
masterfrom
copilot/fix-829-2

Conversation

Copilot AI commented Aug 28, 2025

Copy link
Copy Markdown
Contributor

This PR fixes a display issue where RedNotebook shows garbled or corrupted text on startup when running on Raspberry Pi OS 64-bit. The text becomes readable only after manually resizing the window.

Garbled text display on Pi OS startup

Root Cause

The issue is caused by a GTK widget layout/rendering timing problem specific to Raspberry Pi hardware. On startup, the widgets are not properly refreshed after the window is shown, leading to corrupted display until a resize event forces a layout recalculation.

Solution

The fix implements a platform-specific workaround that:

  1. Detects Raspberry Pi OS by checking /etc/os-release for Pi-specific identifiers and validating ARM architecture
  2. Forces widget refresh after window show using GTK's queue_resize() and queue_draw() methods
  3. Uses proper timing with GLib.idle_add() to defer the refresh until the main loop starts
  4. Applies safely with exception handling and debug logging
# Only runs on detected Pi systems
if _is_raspberry_pi_os():
    logging.info("Applying Raspberry Pi OS widget rendering fix")
    _fix_pi_widget_rendering(self.main_frame, self.text_vbox)

Key Features

  • Platform-specific: Only affects Raspberry Pi OS systems, zero impact on other platforms
  • Minimal footprint: Only 63 lines of code added, following existing codebase patterns
  • Safe implementation: Comprehensive error handling and fallback behavior
  • Automatic: No user intervention required, works transparently

The implementation follows the same pattern as the existing KDE WebKit compositing fix, ensuring consistency with the codebase architecture.

Fixes #829.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • esm.ubuntu.com
    • Triggering command: /usr/lib/apt/methods/https (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot AI changed the title [WIP] Rednote start up on Pi os64 requires window resize to display text acceptably. Fix widget rendering issue on Raspberry Pi OS startup Aug 28, 2025
Copilot AI requested a review from jendrikseipp August 28, 2025 08:46
@jendrikseipp
jendrikseipp marked this pull request as ready for review August 29, 2025 12:11
Co-authored-by: jendrikseipp <213955+jendrikseipp@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rednote start up on Pi os64 requires window resize to display text acceptably.

2 participants