Skip to content

Conversation

@Spokplacenta
Copy link

This PR introduces several improvements to the Flutter RFB client:

  • Adapt Flutter widget for ZRLE: Updates the RemoteFrameBufferWidget so it can properly handle the ZRLE encoding, making the viewer compatible with more VNC servers and improving rendering robustness.
  • Fix gesture detector stability: Prevents Infinity/NaN errors in the gesture detector, which previously could cause crashes or erratic behavior under certain input conditions.
  • Improve mouse coordinate mapping and size tracking: Adjusts how mouse coordinates are translated and adds more reliable child/widget size tracking so pointer events are aligned with what the user actually sees on screen.
  • Project configuration & AppDelegate cleanup: Refreshes some project configuration and improves the iOS AppDelegate setup to better integrate with the updated Flutter/RFB behavior.

Overall, these changes make the VNC client more stable and accurate in handling user input and improve compatibility with servers using ZRLE encoding.

- Add defensive checks for Infinity/NaN values in coordinate calculations
- Add _hasValidSize check to prevent errors when widget or image size is invalid
- Extract coordinate conversion to helper methods with proper validation
- Fix coordinate calculation to account for BoxFit.contain scaling and centering offsets
- Handle different aspect ratios correctly by calculating actual scale and offsets
- Fix widget size tracking to update correctly when window is resized
- Use ValueListenableBuilder to react to size changes in real-time
- Improve SizeTrackingWidget to use LayoutBuilder for accurate size updates
- Update .gitignore to include new build-related directories
- Change AppDelegate annotation from @NSApplicationMain to @main
- Increment object version and last upgrade check in project.pbxproj
- Update MACOSX_DEPLOYMENT_TARGET to 10.15 in project settings
- Add GPU validation mode in Runner.xcscheme
Spokplacenta and others added 7 commits January 7, 2026 18:22
- Extract _toRemoteX and _toRemoteY methods to CoordinateConversion extension on double
- Improve code readability by using extension methods instead of private methods
- Make coordinate conversion logic reusable across the codebase
Co-authored-by: Goddchen <goddchen@googlemail.com>
Co-authored-by: Goddchen <goddchen@googlemail.com>
Co-authored-by: Goddchen <goddchen@googlemail.com>
Co-authored-by: Goddchen <goddchen@googlemail.com>
json_annotation is already provided as a transitive dependency by freezed_annotation, so it doesn't need to be declared explicitly.
Co-authored-by: Goddchen <goddchen@googlemail.com>
@Spokplacenta
Copy link
Author

Spokplacenta commented Jan 12, 2026

Hi @Goddchen , I think all points have been resolved on this request.

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.

2 participants