diff options
author | Pranav Kant <pranavk@collabora.co.uk> | 2018-03-06 19:21:48 +0530 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2018-03-13 13:09:00 +0100 |
commit | 641d763caeb1c6c554569927f245261e0c6c7a06 (patch) | |
tree | fa8e7cc59059533b0b0eec4300b0a001bd241627 /vcl | |
parent | 03534050753b81f3e68da7e0dede987cbe4fe0fa (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/50833
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'vcl')
-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 079d039a2f21..228272909e5e 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.SetTimeoutHdl( 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" ); } } |