[Libreoffice-commits] core.git: vcl/source

Pranav Kant pranavk at collabora.co.uk
Wed Mar 7 06:51:10 UTC 2018


 vcl/source/window/cursor.cxx |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

New commits:
commit 843f8e43e1e79bbd22cadabb54022c615c7a0d64
Author: Pranav Kant <pranavk at collabora.co.uk>
Date:   Tue Mar 6 19:21:48 2018 +0530

    lokdialog: Fix cursor invalidates for some vcl controls
    
    ... like TextEdit, etc. The problem was that the code assumed that there
    would be a mpData->mpWindow whenever a new cursor position is set. While
    that's the case with most views, some controls set the position when
    there's no window set.
    
    With this patch, we send the cursor_invalidate just before we make the
    cursor visible; by that time, we already have a valid mpWindow set in
    the ImplCursorData.
    
    Change-Id: I2cb40ae150e4d7555f17ebbb8e08c04fc05f447b
    Reviewed-on: https://gerrit.libreoffice.org/50834
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: pranavk <pranavk at collabora.co.uk>

diff --git a/vcl/source/window/cursor.cxx b/vcl/source/window/cursor.cxx
index 2da864f9bcd2..0da13be25d16 100644
--- a/vcl/source/window/cursor.cxx
+++ b/vcl/source/window/cursor.cxx
@@ -189,9 +189,6 @@ void vcl::Cursor::ImplDoShow( bool bDrawDirect, bool bRestore )
                 mpData->mbCurVisible = false;
                 mpData->maTimer.SetInvokeHandler( LINK( this, Cursor, ImplTimerHdl ) );
                 mpData->maTimer.SetDebugName( "vcl ImplCursorData maTimer" );
-
-                // tell about "initial" coordinates
-                LOKNotify( pWindow, "cursor_invalidate" );
             }
 
             mpData->mpWindow    = pWindow;
@@ -206,6 +203,7 @@ void vcl::Cursor::ImplDoShow( bool bDrawDirect, bool bRestore )
                     mpData->maTimer.Start();
                 else if ( !mpData->mbCurVisible )
                     ImplDraw();
+                LOKNotify( pWindow, "cursor_invalidate" );
                 LOKNotify( pWindow, "cursor_visible" );
             }
         }


More information about the Libreoffice-commits mailing list