summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-11-23 20:34:08 +0000
committerCaolán McNamara <caolanm@redhat.com>2021-11-24 09:36:10 +0100
commit07941bfa4844f794a1e50a28c3eb28b24ad94a41 (patch)
tree35db544c9ea714c43f25caf05ee3cc39a3e317f4
parenta557a1c4ac0b73668452f80169870bdfb204aeb6 (diff)
gtk[3|4] don't need the ifdefs if only using the dlsymed functions
Change-Id: I2c3b7a19f047d341467f9c66ef93e3185330854d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125744 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--vcl/unx/gtk3/gtkinst.cxx20
1 files changed, 1 insertions, 19 deletions
diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 0d7ff1985619..9b3713f02902 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -6060,13 +6060,9 @@ private:
bool isPositioningAllowed() const
{
- bool bPositioningAllowed = true;
-#if defined(GDK_WINDOWING_WAYLAND)
// no X/Y positioning under Wayland
GdkDisplay *pDisplay = gtk_widget_get_display(m_pWidget);
- bPositioningAllowed = !DLSYM_GDK_IS_WAYLAND_DISPLAY(pDisplay);
-#endif
- return bPositioningAllowed;
+ return !DLSYM_GDK_IS_WAYLAND_DISPLAY(pDisplay);
}
protected:
@@ -6971,18 +6967,14 @@ public:
// calc's insert->function is springing back to its original size if the ref-button
// is used to shrink the dialog down and then the user clicks in the calc area to do
// the selection
-#if defined(GDK_WINDOWING_WAYLAND)
bool bWorkaroundSizeSpringingBack = DLSYM_GDK_IS_WAYLAND_DISPLAY(gtk_widget_get_display(m_pWidget));
if (bWorkaroundSizeSpringingBack)
gtk_widget_unmap(GTK_WIDGET(m_pDialog));
-#endif
resize_to_request();
-#if defined(GDK_WINDOWING_WAYLAND)
if (bWorkaroundSizeSpringingBack)
gtk_widget_map(GTK_WIDGET(m_pDialog));
-#endif
m_pRefEdit = pRefEdit;
}
@@ -10331,7 +10323,6 @@ public:
return;
}
-#if defined(GDK_WINDOWING_X11)
if (!m_pMenuHack)
{
//under wayland a Popover will work to "escape" the parent dialog, not
@@ -10351,7 +10342,6 @@ public:
g_signal_connect(m_pMenuHack, "button-release-event", G_CALLBACK(signalButtonRelease), this);
}
}
-#endif
if (m_pMenuHack)
{
@@ -22113,7 +22103,6 @@ public:
, m_pClosedEvent(nullptr)
{
#if !GTK_CHECK_VERSION(4, 0, 0)
-#if defined(GDK_WINDOWING_X11)
//under wayland a Popover will work to "escape" the parent dialog, not
//so under X, so come up with this hack to use a raw GtkWindow
GdkDisplay *pDisplay = gtk_widget_get_display(GTK_WIDGET(m_pPopover));
@@ -22136,7 +22125,6 @@ public:
}
}
#endif
-#endif
}
virtual void popup_at_rect(weld::Widget* pParent, const tools::Rectangle& rRect, weld::Placement ePlace) override
@@ -22167,7 +22155,6 @@ public:
}
#if !GTK_CHECK_VERSION(4, 0, 0)
-#if defined(GDK_WINDOWING_X11)
//under wayland a Popover will work to "escape" the parent dialog, not
//so under X, so come up with this hack to use a raw GtkWindow
GdkDisplay *pDisplay = gtk_widget_get_display(GTK_WIDGET(m_pPopover));
@@ -22181,13 +22168,11 @@ public:
return;
}
#endif
-#endif
gtk_popover_popup(m_pPopover);
}
#if !GTK_CHECK_VERSION(4, 0, 0)
-#if defined(GDK_WINDOWING_X11)
virtual bool get_visible() const override
{
if (m_pMenuHack)
@@ -22205,12 +22190,10 @@ public:
GtkInstanceContainer::ensureMouseEventWidget();
}
#endif
-#endif
virtual void popdown() override
{
#if !GTK_CHECK_VERSION(4, 0, 0)
-#if defined(GDK_WINDOWING_X11)
//under wayland a Popover will work to "escape" the parent dialog, not
//so under X, so come up with this hack to use a raw GtkWindow
GdkDisplay *pDisplay = gtk_widget_get_display(GTK_WIDGET(m_pPopover));
@@ -22226,7 +22209,6 @@ public:
return;
}
#endif
-#endif
gtk_popover_popdown(m_pPopover);
}