[Concept,08/14] expo: Hide system pointer when entering expo mode

Message ID 20251006205856.2009292-9-sjg@u-boot.org
State New
Headers
Series expo: More mouse development for expo |

Commit Message

Simon Glass Oct. 6, 2025, 8:58 p.m. UTC
  From: Simon Glass <sjg@chromium.org>

When entering expo mode, hide the system mouse pointer so that only the
custom expo pointer is visible. Restore it when exiting expo mode.

This uses the new set_ptr_visible() method if a mouse is enabled.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
---

 boot/expo.c | 4 ++++
 1 file changed, 4 insertions(+)
  

Patch

diff --git a/boot/expo.c b/boot/expo.c
index 99b9ad4d52b..afb09aaf5b5 100644
--- a/boot/expo.c
+++ b/boot/expo.c
@@ -545,11 +545,15 @@  void expo_req_size(struct expo *exp, int width, int height)
 void expo_enter_mode(struct expo *exp)
 {
 	video_manual_sync(exp->display, true);
+	if (IS_ENABLED(CONFIG_MOUSE) && exp->mouse_enabled)
+		mouse_set_ptr_visible(exp->mouse, false);
 }
 
 void expo_exit_mode(struct expo *exp)
 {
 	video_manual_sync(exp->display, false);
+	if (IS_ENABLED(CONFIG_MOUSE) && exp->mouse_enabled)
+		mouse_set_ptr_visible(exp->mouse, true);
 }
 
 void expo_damage_reset(struct expo *exp)