summaryrefslogtreecommitdiffstats
path: root/vcl/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-03-10 10:33:56 +0000
committerCaolán McNamara <caolanm@redhat.com>2016-03-10 10:41:38 +0000
commit51d1fca2041ba4478c5abae59b1ed4fee37ea1ee (patch)
treeeccae16d5e06a8c05d4cc7ddf1951ac90246dc52 /vcl/source
parenttdf#89927: PPTX import: Incorrect inheritance of text run fill properties (diff)
downloadcore-51d1fca2041ba4478c5abae59b1ed4fee37ea1ee.tar.gz
core-51d1fca2041ba4478c5abae59b1ed4fee37ea1ee.zip
Related: tdf#98419 gtk3: reimplement passing window move control to wm...
for wayland Dragging toolbars around to move them (starting with an undocked toolbar, not the moving outline fake thing) doesn't work under wayland (as far as I can see) without using gtk_window_begin_move_drag i.e. gtk_window_move doesn't work. But this is supposed to be used from the initial mouse click (while it works under wayland from a move, it doesn't work under X from a move) so rework the last attempt to occur right at the initial click to drag. Change-Id: I612f188b3e8482307bc816f5aa775530e6092eda
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/window/brdwin.cxx12
-rw-r--r--vcl/source/window/window.cxx2
-rw-r--r--vcl/source/window/window2.cxx6
3 files changed, 11 insertions, 9 deletions
diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx
index dc925985ab84..da14e99ec75f 100644
--- a/vcl/source/window/brdwin.cxx
+++ b/vcl/source/window/brdwin.cxx
@@ -925,7 +925,10 @@ bool ImplStdBorderWindowView::MouseButtonDown( const MouseEvent& rMEvt )
maFrameData.mbDragFull = false;
if ( nDragFullTest != DragFullOptions::NONE )
maFrameData.mbDragFull = true; // always fulldrag for proper docking, ignore system settings
- pBorderWindow->StartTracking();
+ StartTrackingFlags eFlags = maFrameData.mbDragFull ?
+ StartTrackingFlags::UseToolKitDrag :
+ StartTrackingFlags::NONE;
+ pBorderWindow->StartTracking(eFlags);
}
else if ( bHitTest )
maFrameData.mnHitTest = 0;
@@ -1242,7 +1245,7 @@ bool ImplStdBorderWindowView::Tracking( const TrackingEvent& rTEvt )
aPos.Y() += aMousePos.Y();
if ( maFrameData.mbDragFull )
{
- pBorderWindow->MoveToByDrag(aPos);
+ pBorderWindow->SetPosPixel( aPos );
pBorderWindow->ImplUpdateAll();
pBorderWindow->ImplGetFrameWindow()->ImplUpdateAll();
}
@@ -2203,11 +2206,6 @@ 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 9f1e38cef4e4..2e5419429d42 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -2767,8 +2767,6 @@ 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;
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index 9f988fd4cb3e..4c424472c06a 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -326,6 +326,12 @@ void Window::StartTracking( StartTrackingFlags nFlags )
pSVData->maWinData.mpTrackWin = this;
pSVData->maWinData.mnTrackFlags = nFlags;
CaptureMouse();
+
+ if (nFlags & StartTrackingFlags::UseToolKitDrag)
+ {
+ SalFrame* pFrame = mpWindowImpl->mpFrame;
+ pFrame->StartToolKitMoveBy();
+ }
}
void Window::EndTracking( TrackingEventFlags nFlags )