[Libreoffice-commits] core.git: 2 commits - include/vcl vcl/source

Caolán McNamara caolanm at redhat.com
Thu Mar 26 11:59:50 PDT 2015


 include/vcl/floatwin.hxx      |    9 ++++-----
 vcl/source/window/menu.cxx    |    3 ---
 vcl/source/window/winproc.cxx |    5 +----
 3 files changed, 5 insertions(+), 12 deletions(-)

New commits:
commit a62d7f3b08b413d17e650279110ab8a48c419b18
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Mar 26 16:35:24 2015 +0000

    remove the gap now to pretend it was never there
    
    Change-Id: I234defd865e6bf5d9d9eccc85cde7e69c0549c3f

diff --git a/include/vcl/floatwin.hxx b/include/vcl/floatwin.hxx
index 6f230e8..60bc992 100644
--- a/include/vcl/floatwin.hxx
+++ b/include/vcl/floatwin.hxx
@@ -44,10 +44,10 @@ class ToolBox;
 #define FLOATWIN_POPUPMODE_NOMOUSERECTCLOSE     ((sal_uLong)0x00000800)
 #define FLOATWIN_POPUPMODE_ALLMOUSEBUTTONCLOSE  ((sal_uLong)0x00001000)
 #define FLOATWIN_POPUPMODE_NOAPPFOCUSCLOSE      ((sal_uLong)0x00002000)
-#define FLOATWIN_POPUPMODE_NEWLEVEL             ((sal_uLong)0x00008000)
-#define FLOATWIN_POPUPMODE_NOMOUSEUPCLOSE       ((sal_uLong)0x00010000)
-#define FLOATWIN_POPUPMODE_GRABFOCUS            ((sal_uLong)0x00020000)
-#define FLOATWIN_POPUPMODE_NOHORZPLACEMENT      ((sal_uLong)0x00040000)
+#define FLOATWIN_POPUPMODE_NEWLEVEL             ((sal_uLong)0x00004000)
+#define FLOATWIN_POPUPMODE_NOMOUSEUPCLOSE       ((sal_uLong)0x00008000)
+#define FLOATWIN_POPUPMODE_GRABFOCUS            ((sal_uLong)0x00010000)
+#define FLOATWIN_POPUPMODE_NOHORZPLACEMENT      ((sal_uLong)0x00020000)
 
 #define FLOATWIN_POPUPMODEEND_CANCEL            ((sal_uInt16)0x0001)
 #define FLOATWIN_POPUPMODEEND_TEAROFF           ((sal_uInt16)0x0002)
commit a8f9dd59de4e655bc77fa0546b81440aee46b837
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Mar 26 16:32:59 2015 +0000

    why would we ever want FLOATWIN_POPUPMODE_PATHMOUSECANCELCLICK
    
    if we're from the menubar we never set it, but if we are
    a submenu from a menu in the menubar we set it.
    
    with it set, and on right click, the right click is passed
    through to what ever is underneath the pointer
    
    I don't see why we want to do that, especially the inconsistency
    from e.g. the File menu, vs the "File->New" menu
    
    Change-Id: I548f5c95e2511b5e921e8b74600f65eecdd8f498

diff --git a/include/vcl/floatwin.hxx b/include/vcl/floatwin.hxx
index d017b21..6f230e8 100644
--- a/include/vcl/floatwin.hxx
+++ b/include/vcl/floatwin.hxx
@@ -44,7 +44,6 @@ class ToolBox;
 #define FLOATWIN_POPUPMODE_NOMOUSERECTCLOSE     ((sal_uLong)0x00000800)
 #define FLOATWIN_POPUPMODE_ALLMOUSEBUTTONCLOSE  ((sal_uLong)0x00001000)
 #define FLOATWIN_POPUPMODE_NOAPPFOCUSCLOSE      ((sal_uLong)0x00002000)
-#define FLOATWIN_POPUPMODE_PATHMOUSECANCELCLICK ((sal_uLong)0x00004000)
 #define FLOATWIN_POPUPMODE_NEWLEVEL             ((sal_uLong)0x00008000)
 #define FLOATWIN_POPUPMODE_NOMOUSEUPCLOSE       ((sal_uLong)0x00010000)
 #define FLOATWIN_POPUPMODE_GRABFOCUS            ((sal_uLong)0x00020000)
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 2890efb..f719d27 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -2870,9 +2870,6 @@ sal_uInt16 PopupMenu::ImplExecute( vcl::Window* pW, const Rectangle& rRect, sal_
     WinBits nStyle = WB_BORDER;
     if (bRealExecute)
         nPopupModeFlags |= FLOATWIN_POPUPMODE_NEWLEVEL;
-    if (!pStartedFrom || !pStartedFrom->IsMenuBar())
-        nPopupModeFlags |= FLOATWIN_POPUPMODE_PATHMOUSECANCELCLICK;
-
     nPopupModeFlags |= FLOATWIN_POPUPMODE_NOKEYCLOSE | FLOATWIN_POPUPMODE_ALLMOUSEBUTTONCLOSE;
 
     // could be useful during debugging.
diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx
index 83dc516..cb0f3e7 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -145,10 +145,7 @@ static bool ImplHandleMouseFloatMode( vcl::Window* pChild, const Point& rMousePo
                              (nSVEvent == MouseNotifyEvent::MOUSEBUTTONUP) )
                             return true;
                         pLastLevelFloat->EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL | FLOATWIN_POPUPMODEEND_CLOSEALL );
-                        if ( nPopupFlags & FLOATWIN_POPUPMODE_PATHMOUSECANCELCLICK )
-                            return false;
-                        else
-                            return true;
+                        return true;
                     }
                     else
                         return true;


More information about the Libreoffice-commits mailing list