summaryrefslogtreecommitdiff
path: root/vcl/source/window
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-12-15 14:24:35 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-12-15 14:38:23 +0000
commite2ea766b2c3a72974fa4b80f0b74675be9196691 (patch)
tree20577b607bcf3635342d484bc78d678a8c8a3b8a /vcl/source/window
parenta6b9d0e2f3508d8ac52f46a7aacec2e3043fec8e (diff)
gtk3+wayland: enable manual movement of toolbars
via gtk_window_begin_move_drag so add some BYDRAG/ByDrag hints to select mechanism to move window by Change-Id: Icc58653dff752a6d4ee49446647d7ede2af9dd9b (cherry picked from commit ea4c75dcc9c3e53e7ef40bd273ea18a48ea9b18d)
Diffstat (limited to 'vcl/source/window')
-rw-r--r--vcl/source/window/brdwin.cxx7
-rw-r--r--vcl/source/window/window.cxx2
2 files changed, 8 insertions, 1 deletions
diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx
index d46ad02ffdee..1d79dd082393 100644
--- a/vcl/source/window/brdwin.cxx
+++ b/vcl/source/window/brdwin.cxx
@@ -1243,7 +1243,7 @@ bool ImplStdBorderWindowView::Tracking( const TrackingEvent& rTEvt )
aPos.Y() += aMousePos.Y();
if ( maFrameData.mbDragFull )
{
- pBorderWindow->SetPosPixel( aPos );
+ pBorderWindow->MoveToByDrag(aPos);
pBorderWindow->ImplUpdateAll();
pBorderWindow->ImplGetFrameWindow()->ImplUpdateAll();
}
@@ -2179,6 +2179,11 @@ Rectangle ImplBorderWindow::GetMenuRect() const
return mpBorderView->GetMenuRect();
}
+void ImplBorderWindow::MoveToByDrag(const Point& rNewPos)
+{
+ setPosSizePixel(rNewPos.X(), rNewPos.Y(), 0, 0, PosSizeFlags::Pos | PosSizeFlags::ByDrag);
+}
+
Size ImplBorderWindow::GetOptimalSize() const
{
const vcl::Window* pClientWindow = ImplGetClientWindow();
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 48be7171a994..a064650f40bb 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -2902,6 +2902,8 @@ void Window::setPosSizePixel( long nX, long nY,
nSysFlags |= SAL_FRAME_POSSIZE_WIDTH;
if( nFlags & PosSizeFlags::Height )
nSysFlags |= SAL_FRAME_POSSIZE_HEIGHT;
+ if( nFlags & PosSizeFlags::ByDrag )
+ nSysFlags |= SAL_FRAME_POSSIZE_BYDRAG;
if( nFlags & PosSizeFlags::X )
{
nSysFlags |= SAL_FRAME_POSSIZE_X;