diff options
author | Juergen Funk <juergen.funk_ml@cib.de> | 2015-12-14 22:42:25 +0100 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-12-16 12:20:12 +0000 |
commit | 04f7270236ddac1d02187d5a8c24ed70000c73a5 (patch) | |
tree | a50544c8c6feb6287ad8880c3f3083f2d033d7ce /vcl/win | |
parent | 3b31d0dc86d75f8283951f3fd6a4f48ff649ed99 (diff) |
tdf#96119 Cannot select item with mouse in any combobox / drop down menu
this commit has make the problem, the removing of the SALEVENT_MOUSEACTIVATE
commit dd351dd728687cffe432ce0ec9367ceb80e097fb
Author: Noel Grandin <noel@peralex.com>
Date: Tue Nov 24 08:50:39 2015 +0200
loplugin:unusedfields in vcl/
and remove the unused SALEVENT_MOUSEACTIVATE stuff
Without of there, when click in the opened list-box it send first the
"PreNotify" with "MouseNotifyEvent::LOSEFOCUS" and that close the listbox.
After that, it send the mouse-event to a closed window, that is the reason
why the Listbox not get the mouse-click.
With this patch, first send the mouse-click and then the "PreNotify"
Change-Id: I5a09b1524335434f043d22bc71f7e38559fb1c0b
Reviewed-on: https://gerrit.libreoffice.org/20708
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/20734
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'vcl/win')
-rw-r--r-- | vcl/win/source/window/salframe.cxx | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx index 763d4430e5b4..4b873a96ec74 100644 --- a/vcl/win/source/window/salframe.cxx +++ b/vcl/win/source/window/salframe.cxx @@ -3183,6 +3183,24 @@ static long ImplHandleMouseMsg( HWND hWnd, UINT nMsg, return nRet; } +static long ImplHandleMouseActivateMsg( HWND hWnd ) +{ + WinSalFrame* pFrame = GetWindowPtr( hWnd ); + if ( !pFrame ) + return 0; + + if ( pFrame->mbFloatWin ) + return TRUE; + + SalMouseActivateEvent aMouseActivateEvt; + POINT aPt; + GetCursorPos( &aPt ); + ScreenToClient( hWnd, &aPt ); + aMouseActivateEvt.mnX = aPt.x; + aMouseActivateEvt.mnY = aPt.y; + return pFrame->CallCallback( SALEVENT_MOUSEACTIVATE, &aMouseActivateEvt ); +} + static long ImplHandleWheelMsg( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam ) { DBG_ASSERT( nMsg == WM_MOUSEWHEEL || @@ -5515,6 +5533,17 @@ LRESULT CALLBACK SalFrameWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lP break; case WM_MOUSEACTIVATE: + if ( LOWORD( lParam ) == HTCLIENT ) + { + ImplSalYieldMutexAcquireWithWait(); + nRet = ImplHandleMouseActivateMsg( hWnd ); + ImplSalYieldMutexRelease(); + if ( nRet ) + { + nRet = MA_NOACTIVATE; + rDef = FALSE; + } + } break; case WM_KEYDOWN: |