Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes a Waveshare S3–specific UI regression where the touch navigation bar (H / J / I) becomes invisible or logically misaligned after toggling Flip Orientation.
All reviewer feedback has been fully addressed and incorporated, resulting in a cleaner, safer, and fully aligned implementation.
The solution remains strictly scoped to
CONFIG_BOARD_TYPE_WS_TOUCH_LCD2, ensuring zero impact on all other Jade targets.What’s fixed
Reliable redraw of the touch navbar (H / J / I)
display_touch_navbar_redraw()is now declared unconditionally indisplay.h, as requested.display.c) and gated byCONFIG_BOARD_TYPE_WS_TOUCH_LCD2.On non-Waveshare boards, the function safely compiles to a no-op.
Clean orientation handling without ifdefs in callers
gui_set_flipped_orientation()now follows the reviewer-suggested pattern:display_flip_orientation(flipped_orientation)display_touch_navbar_redraw()unconditionallyThis removes preprocessor conditionals from the call site and keeps control flow clear.
Correct touch hit-zone on Waveshare S3
const uint16_tinside the WS_TOUCH_LCD2 block, as requested.This keeps Prev / OK / Next perfectly aligned with the rendered navbar.
No behavioral change for other devices
y > 200touch logic is preserved for non-Waveshare boardsWhy this is needed
On Waveshare S3, flipping the display orientation correctly rotates the framebuffer, but:
This PR resolves the visual and logical desynchronization between rendering and touch input, while also aligning the implementation with reviewer guidance on structure, visibility, and cleanliness.
Scope & Safety
CONFIG_BOARD_TYPE_WS_TOUCH_LCD2Files changed
main/display.cmain/display.hmain/gui.cmain/input/touchscreen.incExpected behavior
Waveshare ESP32-S3 LCD Touch (WS_TOUCH_LCD2)
All other devices
Notes
All reviewer comments were addressed and implemented in this revision.
The final solution preserves board isolation, improves code clarity, and avoids unnecessary preprocessor usage while fixing the original UI regression safely.
If future boards require similar behavior, they should opt-in via their own board-specific configuration rather than sharing this path implicitly.