[edk2-devel] [PATCH] MdeModulePkg/GraphicsConsole: don't draw cursor at 0,0

Sean Rhodes posted 1 patch 2 years, 3 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/edk2 tags/patchew/b9883d307288c0217526f1e4722e9ef824c90ddc.1643405868.git.sean@starlabs.systems
.../Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c     | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
[edk2-devel] [PATCH] MdeModulePkg/GraphicsConsole: don't draw cursor at 0,0
Posted by Sean Rhodes 2 years, 3 months ago
From: Matt DeVillier <matt.devillier@gmail.com>

Prevents cursor from flashing on screen when
changing modes or clearing the screen.

Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
---
 .../Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c     | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c
index 8f0cba9fcd..c803813a66 100644
--- a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c
+++ b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c
@@ -1940,7 +1940,8 @@ FlushCursor (
 
   CurrentMode = This->Mode;
 
-  if (!CurrentMode->CursorVisible) {
+  if (!CurrentMode->CursorVisible ||
+      (CurrentMode->CursorColumn == 0 && CurrentMode->CursorRow == 0 )) {
     return EFI_SUCCESS;
   }
 
-- 
2.32.0



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#86188): https://edk2.groups.io/g/devel/message/86188
Mute This Topic: https://groups.io/mt/88757874/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [edk2-devel] [PATCH] MdeModulePkg/GraphicsConsole: don't draw cursor at 0,0
Posted by Michael D Kinney 2 years, 3 months ago
Hi Sean,

Is this conformant with UEFI Spec on the meaning
of CursorVisible?

You should be able to remove the cursor by not making
the GOP device a Text Output Console so the GraphicsConsole
driver does not connect to the GOP device.  Screen can be
cleared using GOP services.

Mike

> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Sean Rhodes
> Sent: Friday, January 28, 2022 1:38 PM
> To: devel@edk2.groups.io
> Cc: Matt DeVillier <matt.devillier@gmail.com>
> Subject: [edk2-devel] [PATCH] MdeModulePkg/GraphicsConsole: don't draw cursor at 0,0
> 
> From: Matt DeVillier <matt.devillier@gmail.com>
> 
> Prevents cursor from flashing on screen when
> changing modes or clearing the screen.
> 
> Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
> ---
>  .../Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c     | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c
> b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c
> index 8f0cba9fcd..c803813a66 100644
> --- a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c
> +++ b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c
> @@ -1940,7 +1940,8 @@ FlushCursor (
> 
> 
>    CurrentMode = This->Mode;
> 
> 
> 
> -  if (!CurrentMode->CursorVisible) {
> 
> +  if (!CurrentMode->CursorVisible ||
> 
> +      (CurrentMode->CursorColumn == 0 && CurrentMode->CursorRow == 0 )) {
> 
>      return EFI_SUCCESS;
> 
>    }
> 
> 
> 
> --
> 2.32.0
> 
> 
> 
> -=-=-=-=-=-=
> Groups.io Links: You receive all messages sent to this group.
> View/Reply Online (#86188): https://edk2.groups.io/g/devel/message/86188
> Mute This Topic: https://groups.io/mt/88757874/1643496
> Group Owner: devel+owner@edk2.groups.io
> Unsubscribe: https://edk2.groups.io/g/devel/unsub [michael.d.kinney@intel.com]
> -=-=-=-=-=-=
> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#86193): https://edk2.groups.io/g/devel/message/86193
Mute This Topic: https://groups.io/mt/88757874/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-