diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-11-10 13:20:34 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-11-11 08:51:10 +0000 |
commit | a6d324f30bd5cfd09d54614d8df67b7857550429 (patch) | |
tree | 2d5d64d2aac6e104ac811cdc7272e43ca29d03d5 /vcl/source/window/event.cxx | |
parent | 39f14ada958ff2cdd4ec5f7454983bfc5c35f89d (diff) |
Resolves: rhbz#1391418 wayland toolbars can't be docked after undocking
see gnome#768128 for extra details
under wayland, given the misery here I'm going to just disable toggling between
docked and undocked under wayland, and throw away user config on toggling
docked/undocked away from the defaults. You can still drag docked things around
to new docking position, but you can't pull them out of the dock to float.
non-wayland is unaffected
Change-Id: Iaa859f3420e6d1b103a8b93d1ad8f82dbffe75d4
Reviewed-on: https://gerrit.libreoffice.org/30752
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/source/window/event.cxx')
-rw-r--r-- | vcl/source/window/event.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/vcl/source/window/event.cxx b/vcl/source/window/event.cxx index ca1439f867a7..8021c074c549 100644 --- a/vcl/source/window/event.cxx +++ b/vcl/source/window/event.cxx @@ -101,15 +101,17 @@ bool Window::Notify( NotifyEvent& rNEvt ) // check for docking window // but do nothing if window is docked and locked ImplDockingWindowWrapper *pWrapper = ImplGetDockingManager()->GetDockingWindowWrapper( this ); - if( pWrapper && !( !pWrapper->IsFloatingMode() && pWrapper->IsLocked() ) ) + if (pWrapper && !( !pWrapper->IsFloatingMode() && pWrapper->IsLocked() )) { + const bool bDockingSupportCrippled = !StyleSettings::GetDockingFloatsSupported(); + if ( rNEvt.GetType() == MouseNotifyEvent::MOUSEBUTTONDOWN ) { const MouseEvent* pMEvt = rNEvt.GetMouseEvent(); bool bHit = pWrapper->GetDragArea().IsInside( pMEvt->GetPosPixel() ); if ( pMEvt->IsLeft() ) { - if ( pMEvt->IsMod1() && (pMEvt->GetClicks() == 2) ) + if (!bDockingSupportCrippled && pMEvt->IsMod1() && (pMEvt->GetClicks() == 2)) { // ctrl double click toggles floating mode pWrapper->SetFloatingMode( !pWrapper->IsFloatingMode() ); @@ -149,8 +151,8 @@ bool Window::Notify( NotifyEvent& rNEvt ) else if( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { const vcl::KeyCode& rKey = rNEvt.GetKeyEvent()->GetKeyCode(); - if( rKey.GetCode() == KEY_F10 && rKey.GetModifier() && - rKey.IsShift() && rKey.IsMod1() ) + if (rKey.GetCode() == KEY_F10 && rKey.GetModifier() && + rKey.IsShift() && rKey.IsMod1() && !bDockingSupportCrippled) { pWrapper->SetFloatingMode( !pWrapper->IsFloatingMode() ); /* At this point the floating toolbar frame does not have the |