public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] MdeModulePkg/GraphicsConsole: don't draw cursor at 0,0
@ 2022-01-28 21:38 Sean Rhodes
  2022-01-29  0:53 ` [edk2-devel] " Michael D Kinney
  0 siblings, 1 reply; 2+ messages in thread
From: Sean Rhodes @ 2022-01-28 21:38 UTC (permalink / raw)
  To: devel; +Cc: Matt DeVillier

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [edk2-devel] [PATCH] MdeModulePkg/GraphicsConsole: don't draw cursor at 0,0
  2022-01-28 21:38 [PATCH] MdeModulePkg/GraphicsConsole: don't draw cursor at 0,0 Sean Rhodes
@ 2022-01-29  0:53 ` Michael D Kinney
  0 siblings, 0 replies; 2+ messages in thread
From: Michael D Kinney @ 2022-01-29  0:53 UTC (permalink / raw)
  To: devel@edk2.groups.io, Rhodes, Sean, Kinney, Michael D; +Cc: Matt DeVillier

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]
> -=-=-=-=-=-=
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-01-29  0:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-28 21:38 [PATCH] MdeModulePkg/GraphicsConsole: don't draw cursor at 0,0 Sean Rhodes
2022-01-29  0:53 ` [edk2-devel] " Michael D Kinney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox