summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorMaxim Monastirsky <momonasmon@gmail.com>2017-09-27 17:34:38 +0300
committerMaxim Monastirsky <momonasmon@gmail.com>2017-10-01 01:20:15 +0200
commitcb9970400d0bbd73e508f25a67e1ad2c7dd28eb6 (patch)
tree9f71bb36d6eb300e560170e3bd014f946a7a18a5 /sfx2
parent8b053a3c88c2b3e203856dbd9dabca6c935b0bde (diff)
Wayland: Make various popups work in the overflow toolbar
Were failing to show, with this warning: Gdk-WARNING **: Tried to map a popup with a non-top most parent Change-Id: Ib68b5fc9b3edb3d25a23b66397c13833a4d080ac Reviewed-on: https://gerrit.libreoffice.org/42936 Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com> Tested-by: Maxim Monastirsky <momonasmon@gmail.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/control/charmapcontrol.cxx4
-rw-r--r--sfx2/source/control/emojicontrol.cxx4
-rw-r--r--sfx2/source/control/emojipopup.cxx2
-rw-r--r--sfx2/source/dialog/charmappopup.cxx2
-rw-r--r--sfx2/source/toolbox/tbxitem.cxx16
5 files changed, 8 insertions, 20 deletions
diff --git a/sfx2/source/control/charmapcontrol.cxx b/sfx2/source/control/charmapcontrol.cxx
index 3551a18c9050..e7631351e805 100644
--- a/sfx2/source/control/charmapcontrol.cxx
+++ b/sfx2/source/control/charmapcontrol.cxx
@@ -24,8 +24,8 @@
using namespace css;
-SfxCharmapCtrl::SfxCharmapCtrl(sal_uInt16 nId, const css::uno::Reference< css::frame::XFrame >& rFrame)
- : SfxPopupWindow(nId, "charmapctrl", "sfx/ui/charmapcontrol.ui", rFrame)
+SfxCharmapCtrl::SfxCharmapCtrl(sal_uInt16 nId, vcl::Window* pParent, const css::uno::Reference< css::frame::XFrame >& rFrame)
+ : SfxPopupWindow(nId, pParent, "charmapctrl", "sfx/ui/charmapcontrol.ui", rFrame)
{
get( m_pRecentCharView[0], "viewchar1" );
get( m_pRecentCharView[1], "viewchar2" );
diff --git a/sfx2/source/control/emojicontrol.cxx b/sfx2/source/control/emojicontrol.cxx
index 58650a604983..c8bd584977a9 100644
--- a/sfx2/source/control/emojicontrol.cxx
+++ b/sfx2/source/control/emojicontrol.cxx
@@ -36,8 +36,8 @@ const char FILTER_UNICODE9[] = "unicode9";
using namespace com::sun::star;
-SfxEmojiControl::SfxEmojiControl(sal_uInt16 nId, const css::uno::Reference< css::frame::XFrame >& rFrame)
- : SfxPopupWindow(nId, "emojictrl", "sfx/ui/emojicontrol.ui", rFrame)
+SfxEmojiControl::SfxEmojiControl(sal_uInt16 nId, vcl::Window* pParent, const css::uno::Reference< css::frame::XFrame >& rFrame)
+ : SfxPopupWindow(nId, pParent, "emojictrl", "sfx/ui/emojicontrol.ui", rFrame)
{
get(mpTabControl, "tab_control");
get(mpEmojiView, "emoji_view");
diff --git a/sfx2/source/control/emojipopup.cxx b/sfx2/source/control/emojipopup.cxx
index af864bacff69..1cc35d02b12d 100644
--- a/sfx2/source/control/emojipopup.cxx
+++ b/sfx2/source/control/emojipopup.cxx
@@ -35,7 +35,7 @@ EmojiPopup::~EmojiPopup()
VclPtr<SfxPopupWindow> EmojiPopup::CreatePopupWindow()
{
- VclPtr<SfxEmojiControl> pControl = VclPtr<SfxEmojiControl>::Create(GetSlotId(), m_xFrame);
+ VclPtr<SfxEmojiControl> pControl = VclPtr<SfxEmojiControl>::Create(GetSlotId(), &GetToolBox(), m_xFrame);
pControl->StartPopupMode(&GetToolBox(), FloatWinPopupFlags::GrabFocus);
diff --git a/sfx2/source/dialog/charmappopup.cxx b/sfx2/source/dialog/charmappopup.cxx
index 49c047dc7ee5..cbc62649cbc3 100644
--- a/sfx2/source/dialog/charmappopup.cxx
+++ b/sfx2/source/dialog/charmappopup.cxx
@@ -35,7 +35,7 @@ CharmapPopup::~CharmapPopup()
VclPtr<SfxPopupWindow> CharmapPopup::CreatePopupWindow()
{
- VclPtr<SfxCharmapCtrl> pControl = VclPtr<SfxCharmapCtrl>::Create(GetSlotId(), m_xFrame);
+ VclPtr<SfxCharmapCtrl> pControl = VclPtr<SfxCharmapCtrl>::Create(GetSlotId(), &GetToolBox(), m_xFrame);
pControl->StartPopupMode(&GetToolBox(), FloatWinPopupFlags::GrabFocus);
diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx
index f7252f593320..2ad6897e6f25 100644
--- a/sfx2/source/toolbox/tbxitem.cxx
+++ b/sfx2/source/toolbox/tbxitem.cxx
@@ -710,22 +710,10 @@ void SAL_CALL SfxFrameStatusListener::statusChanged( const css::frame::FeatureSt
SfxPopupWindow::SfxPopupWindow(
sal_uInt16 nId,
+ vcl::Window* pParentWindow,
const Reference< XFrame >& rFrame,
WinBits nBits ) :
- FloatingWindow( SfxGetpApp()->GetTopWindow(), nBits )
- , m_bFloating( false )
- , m_bCascading( false )
- , m_nId( nId )
- , m_xFrame( rFrame )
-{
- vcl::Window* pWindow = GetTopMostParentSystemWindow( this );
- if ( pWindow )
- static_cast<SystemWindow *>(pWindow)->GetTaskPaneList()->AddWindow( this );
-}
-
-SfxPopupWindow::SfxPopupWindow(sal_uInt16 nId, const OString& rID, const OUString& rUIXMLDescription,
- const css::uno::Reference<css::frame::XFrame> &rFrame)
- : FloatingWindow(SfxGetpApp()->GetTopWindow(), rID, rUIXMLDescription, rFrame)
+ FloatingWindow( pParentWindow, nBits )
, m_bFloating( false )
, m_bCascading( false )
, m_nId( nId )