summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-12-01 14:14:36 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-12-02 12:49:16 +0100
commite90f86db77476f16a28c44c96771c925c6172d6d (patch)
tree17a0a0e08a60e0d68e8aa44e3b8dc006b578f53d /vcl
parent1cbee4822ab3b018c22111e6314f23add02b5521 (diff)
require at least gtk3 3.10.0 to build gtk vclplug
Change-Id: I4ca34184237d05b999c92648494c306a1f1371cd Reviewed-on: https://gerrit.libreoffice.org/45668 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/unx/gtk3/gtk3gtkdata.cxx6
-rw-r--r--vcl/unx/gtk3/gtk3gtkframe.cxx15
2 files changed, 1 insertions, 20 deletions
diff --git a/vcl/unx/gtk3/gtk3gtkdata.cxx b/vcl/unx/gtk3/gtk3gtkdata.cxx
index ee95314c350e..1c6e8e2c5e11 100644
--- a/vcl/unx/gtk3/gtk3gtkdata.cxx
+++ b/vcl/unx/gtk3/gtk3gtkdata.cxx
@@ -200,13 +200,7 @@ GdkCursor* GtkSalDisplay::getFromXBM( const unsigned char *pBitmap,
cairo_surface_destroy(source);
cairo_destroy(cr);
-#if GTK_CHECK_VERSION(3,10,0)
GdkCursor *cursor = gdk_cursor_new_from_surface(m_pGdkDisplay, s, nXHot, nYHot);
-#else
- GdkPixbuf *pixbuf = gdk_pixbuf_get_from_surface(s, 0, 0, nWidth, nHeight);
- GdkCursor *cursor = gdk_cursor_new_from_pixbuf(m_pGdkDisplay, pixbuf, nXHot, nYHot);
- g_object_unref(pixbuf);
-#endif
cairo_surface_destroy(s);
diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index 725c64594d92..25be18c60384 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -1386,11 +1386,9 @@ void GtkSalFrame::Center()
Size GtkSalFrame::calcDefaultSize()
{
Size aScreenSize(getDisplay()->GetScreenSize(GetDisplayScreen()));
-#if GTK_CHECK_VERSION(3,10,0)
int scale = gtk_widget_get_scale_factor(m_pWindow);
aScreenSize.Width() /= scale;
aScreenSize.Height() /= scale;
-#endif
return bestmaxFrameSizeForScreenSize(aScreenSize);
}
@@ -1895,10 +1893,9 @@ void GtkSalFrame::SetScreen( unsigned int nNewScreen, SetType eType, tools::Rect
gtk_window_move(GTK_WINDOW(m_pWindow), nX, nY);
-#if GTK_CHECK_VERSION(3,8,0)
gdk_window_set_fullscreen_mode( widget_get_window(m_pWindow), m_bSpanMonitorsWhenFullscreen
? GDK_FULLSCREEN_ON_ALL_MONITORS : GDK_FULLSCREEN_ON_CURRENT_MONITOR );
-#endif
+
GtkWidget* pMenuBarContainerWidget = m_pSalMenu ? m_pSalMenu->GetMenuBarContainerWidget() : nullptr;
if( eType == SetType::Fullscreen )
{
@@ -4250,7 +4247,6 @@ void GtkSalFrame::startDrag(gint nButton, gint nDragOriginX, gint nDragOriginY,
GdkDeviceManager* pDeviceManager = gdk_display_get_device_manager(getGdkDisplay());
aFakeEvent.button.device = gdk_device_manager_get_client_pointer(pDeviceManager);
-#if GTK_CHECK_VERSION(3,10,0)
GdkDragContext *pContext = gtk_drag_begin_with_coordinates(getMouseEventWidget(),
pTargetList,
sourceActions,
@@ -4258,15 +4254,6 @@ void GtkSalFrame::startDrag(gint nButton, gint nDragOriginX, gint nDragOriginY,
&aFakeEvent,
nDragOriginX,
nDragOriginY);
-#else
- GdkDragContext *pContext = gtk_drag_begin(getMouseEventWidget(),
- pTargetList,
- sourceActions,
- nButton,
- &aFakeEvent);
- (void)nDragOriginX;
- (void)nDragOriginY;
-#endif
if (!pContext)
m_pDragSource->dragFailed();