summaryrefslogtreecommitdiffstats
path: root/vcl/source/window/dockwin.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-11-10 13:20:34 +0000
committerCaolán McNamara <caolanm@redhat.com>2016-11-11 08:51:10 +0000
commita6d324f30bd5cfd09d54614d8df67b7857550429 (patch)
tree2d5d64d2aac6e104ac811cdc7272e43ca29d03d5 /vcl/source/window/dockwin.cxx
parentloplugin:redundantcast (diff)
downloadcore-a6d324f30bd5cfd09d54614d8df67b7857550429.tar.gz
core-a6d324f30bd5cfd09d54614d8df67b7857550429.zip
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/dockwin.cxx')
-rw-r--r--vcl/source/window/dockwin.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/vcl/source/window/dockwin.cxx b/vcl/source/window/dockwin.cxx
index 0a2518ee891d..8f63c69e4103 100644
--- a/vcl/source/window/dockwin.cxx
+++ b/vcl/source/window/dockwin.cxx
@@ -530,12 +530,14 @@ bool DockingWindow::Notify( NotifyEvent& rNEvt )
if ( mbDockable )
{
+ const bool bDockingSupportCrippled = !StyleSettings::GetDockingFloatsSupported();
+
if ( rNEvt.GetType() == MouseNotifyEvent::MOUSEBUTTONDOWN )
{
const MouseEvent* pMEvt = rNEvt.GetMouseEvent();
if ( pMEvt->IsLeft() )
{
- if ( pMEvt->IsMod1() && (pMEvt->GetClicks() == 2) )
+ if (!bDockingSupportCrippled && pMEvt->IsMod1() && (pMEvt->GetClicks() == 2) )
{
SetFloatingMode( !IsFloatingMode() );
return true;
@@ -564,7 +566,7 @@ bool DockingWindow::Notify( NotifyEvent& rNEvt )
{
const vcl::KeyCode& rKey = rNEvt.GetKeyEvent()->GetKeyCode();
if( rKey.GetCode() == KEY_F10 && rKey.GetModifier() &&
- rKey.IsShift() && rKey.IsMod1() )
+ rKey.IsShift() && rKey.IsMod1() && !bDockingSupportCrippled )
{
SetFloatingMode( !IsFloatingMode() );
return true;
@@ -587,6 +589,9 @@ bool DockingWindow::Docking( const Point&, Rectangle& )
void DockingWindow::EndDocking( const Rectangle& rRect, bool bFloatMode )
{
+ if (bFloatMode && !StyleSettings::GetDockingFloatsSupported())
+ mbDockCanceled = true;
+
if ( !IsDockingCanceled() )
{
bool bShow = false;