summaryrefslogtreecommitdiff
path: root/vcl/unx
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/unx
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/unx')
-rw-r--r--vcl/unx/gtk3/gtk3gtkframe.cxx13
1 files changed, 12 insertions, 1 deletions
diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index c27fbc401cbe..966dc8014a48 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -872,6 +872,14 @@ void GtkSalFrame::moveWindow( long nX, long nY )
gtk_window_move( GTK_WINDOW(m_pWindow), nX, nY );
}
+void GtkSalFrame::dragWindowTo(long nX, long nY)
+{
+ if (isChild(false))
+ moveWindow(nX, nY);
+ else
+ gtk_window_begin_move_drag(GTK_WINDOW(m_pWindow), 1, nX, nY, GDK_CURRENT_TIME);
+}
+
void GtkSalFrame::widget_set_size_request(long nWidth, long nHeight)
{
gtk_widget_set_size_request(GTK_WIDGET(m_pFixedContainer), nWidth, nHeight );
@@ -1582,7 +1590,10 @@ void GtkSalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_u
m_bDefaultPos = false;
- moveWindow(nX, nY);
+ if (nFlags & SAL_FRAME_POSSIZE_BYDRAG)
+ dragWindowTo(nX, nY);
+ else
+ moveWindow(nX, nY);
updateScreenNumber();
}