[Libreoffice-commits] .: svx/source

Thorsten Behrens thorsten at kemper.freedesktop.org
Tue Jul 24 04:32:46 PDT 2012


 svx/source/tbxctrls/linectrl.cxx |    5 ++++-
 svx/source/tbxctrls/tbcontrl.cxx |   18 ++++++++++++------
 2 files changed, 16 insertions(+), 7 deletions(-)

New commits:
commit 67e3e8bdb42603261de7b9e4b21dd0846d6ae6d5
Author: Thorsten Behrens <tbehrens at suse.com>
Date:   Tue Jul 24 12:32:56 2012 +0200

    Fix fdo#51943 - prevent lose focus event to close popup.
    
    This is a follow-up bandaid for fdo#48096 side-effects, which in
    turn was a band-aid for side-effects caused by ooo-build's
    toolbar-decorations-svx.diff.
    
    Fix instructs vcl to not auto-close the floater on losefocus events,
    which at least on OSX comes _before_ we even see the mouse button
    down event.
    
    Change-Id: I21896c4169addffdf2af920a37e0e3786438cc4e

diff --git a/svx/source/tbxctrls/linectrl.cxx b/svx/source/tbxctrls/linectrl.cxx
index 114a956..5a74176 100644
--- a/svx/source/tbxctrls/linectrl.cxx
+++ b/svx/source/tbxctrls/linectrl.cxx
@@ -741,7 +741,10 @@ SfxPopupWindow* SvxLineEndToolBoxControl::CreatePopupWindow()
 {
     SvxLineEndWindow* pLineEndWin =
         new SvxLineEndWindow( GetId(), m_xFrame, &GetToolBox(), SVX_RESSTR( RID_SVXSTR_LINEEND ) );
-    pLineEndWin->StartPopupMode( &GetToolBox(), FLOATWIN_POPUPMODE_GRABFOCUS | FLOATWIN_POPUPMODE_ALLOWTEAROFF );
+    pLineEndWin->StartPopupMode( &GetToolBox(),
+                                 FLOATWIN_POPUPMODE_GRABFOCUS |
+                                 FLOATWIN_POPUPMODE_ALLOWTEAROFF |
+                                 FLOATWIN_POPUPMODE_NOAPPFOCUSCLOSE );
     pLineEndWin->StartSelection();
     SetPopupWindow( pLineEndWin );
     return pLineEndWin;
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 90b12da..0ec964b 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -2118,7 +2118,7 @@ SfxPopupWindow* SvxFontColorToolBoxControl::CreatePopupWindow()
                 mLastColor);
 
     pColorWin->StartPopupMode( &GetToolBox(),
-        FLOATWIN_POPUPMODE_GRABFOCUS|FLOATWIN_POPUPMODE_ALLOWTEAROFF );
+        FLOATWIN_POPUPMODE_GRABFOCUS|FLOATWIN_POPUPMODE_ALLOWTEAROFF|FLOATWIN_POPUPMODE_NOAPPFOCUSCLOSE );
     pColorWin->StartSelection();
     SetPopupWindow( pColorWin );
     return pColorWin;
@@ -2194,7 +2194,7 @@ SfxPopupWindow* SvxColorToolBoxControl::CreatePopupWindow()
                                     mLastColor);
 
     pColorWin->StartPopupMode( &GetToolBox(),
-        FLOATWIN_POPUPMODE_GRABFOCUS|FLOATWIN_POPUPMODE_ALLOWTEAROFF );
+        FLOATWIN_POPUPMODE_GRABFOCUS|FLOATWIN_POPUPMODE_ALLOWTEAROFF|FLOATWIN_POPUPMODE_NOAPPFOCUSCLOSE );
     pColorWin->StartSelection();
     SetPopupWindow( pColorWin );
     return pColorWin;
@@ -2322,7 +2322,7 @@ SfxPopupWindow* SvxColorExtToolBoxControl::CreatePopupWindow()
     }
 
     pColorWin->StartPopupMode( &GetToolBox(),
-        FLOATWIN_POPUPMODE_GRABFOCUS|FLOATWIN_POPUPMODE_ALLOWTEAROFF );
+        FLOATWIN_POPUPMODE_GRABFOCUS|FLOATWIN_POPUPMODE_ALLOWTEAROFF|FLOATWIN_POPUPMODE_NOAPPFOCUSCLOSE );
     pColorWin->StartSelection();
     SetPopupWindow( pColorWin );
     bChoiceFromPalette = sal_True;
@@ -2450,7 +2450,10 @@ SfxPopupWindow* SvxFrameToolBoxControl::CreatePopupWindow()
     SvxFrameWindow_Impl* pFrameWin = new SvxFrameWindow_Impl(
                                         GetSlotId(), m_xFrame, &GetToolBox() );
 
-    pFrameWin->StartPopupMode( &GetToolBox(), FLOATWIN_POPUPMODE_GRABFOCUS | FLOATWIN_POPUPMODE_ALLOWTEAROFF );
+    pFrameWin->StartPopupMode( &GetToolBox(),
+                               FLOATWIN_POPUPMODE_GRABFOCUS |
+                               FLOATWIN_POPUPMODE_ALLOWTEAROFF |
+                               FLOATWIN_POPUPMODE_NOAPPFOCUSCLOSE );
     pFrameWin->StartSelection();
     SetPopupWindow( pFrameWin );
 
@@ -2499,7 +2502,10 @@ SfxPopupWindowType SvxFrameLineStyleToolBoxControl::GetPopupWindowType() const
 SfxPopupWindow* SvxFrameLineStyleToolBoxControl::CreatePopupWindow()
 {
     SvxLineWindow_Impl* pLineWin = new SvxLineWindow_Impl( GetSlotId(), m_xFrame, &GetToolBox() );
-    pLineWin->StartPopupMode( &GetToolBox(), FLOATWIN_POPUPMODE_GRABFOCUS | FLOATWIN_POPUPMODE_ALLOWTEAROFF );
+    pLineWin->StartPopupMode( &GetToolBox(),
+                              FLOATWIN_POPUPMODE_GRABFOCUS |
+                              FLOATWIN_POPUPMODE_ALLOWTEAROFF |
+                              FLOATWIN_POPUPMODE_NOAPPFOCUSCLOSE );
     SetPopupWindow( pLineWin );
 
     return pLineWin;
@@ -2564,7 +2570,7 @@ SfxPopupWindow* SvxFrameLineColorToolBoxControl::CreatePopupWindow()
                                         mLastColor);
 
     pColorWin->StartPopupMode( &GetToolBox(),
-        FLOATWIN_POPUPMODE_GRABFOCUS|FLOATWIN_POPUPMODE_ALLOWTEAROFF );
+        FLOATWIN_POPUPMODE_GRABFOCUS|FLOATWIN_POPUPMODE_ALLOWTEAROFF|FLOATWIN_POPUPMODE_NOAPPFOCUSCLOSE );
     pColorWin->StartSelection();
     SetPopupWindow( pColorWin );
     return pColorWin;


More information about the Libreoffice-commits mailing list