diff options
author | Pranav Kant <pranavk@collabora.co.uk> | 2018-03-06 19:21:48 +0530 |
---|---|---|
committer | pranavk <pranavk@collabora.co.uk> | 2018-03-07 07:50:43 +0100 |
commit | 843f8e43e1e79bbd22cadabb54022c615c7a0d64 (patch) | |
tree | 21dfbe2a1054d9d6163bd11a12d765ec421f8521 | |
parent | 01c71fba5f525b035f8a723215669d499bc27a3f (diff) |
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@libreoffice.org>
Reviewed-by: pranavk <pranavk@collabora.co.uk>
-rw-r--r-- | vcl/source/window/cursor.cxx | 4 |
1 files changed, 1 insertions, 3 deletions
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" ); } } |