summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-06-28 15:15:05 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-06-29 12:13:18 +0200
commite82527d1fcee6bfb47b4e2a7bc51a7d097f662b0 (patch)
tree2f3a3b77eb6e50abde7f46a8bff2934c7980228a /vcl
parent4cc1b2b55bf4efd21530632eccd9c01267a71218 (diff)
gdk_events_pending->gdk_display_has_pending
the latter at least still exists, if mostly private, in GTK4 Change-Id: I0c008b505823d3f2b1ea332a9602399b77fd29c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118050 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/unx/gtk3/gtkinst.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 9e00cd6d62b3..9af25f36e56b 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -433,8 +433,10 @@ bool GtkInstance::AnyInput( VclInputFlags nType )
EnsureInit();
if( (nType & VclInputFlags::TIMER) && IsTimerExpired() )
return true;
+
#if !GTK_CHECK_VERSION(4, 0, 0)
- if (!gdk_events_pending())
+ GdkDisplay* pDisplay = gdk_display_get_default();
+ if (!gdk_display_has_pending(pDisplay))
return false;
#endif
@@ -445,7 +447,7 @@ bool GtkInstance::AnyInput( VclInputFlags nType )
#if !GTK_CHECK_VERSION(4, 0, 0)
std::deque<GdkEvent*> aEvents;
GdkEvent *pEvent = nullptr;
- while ((pEvent = gdk_event_get()))
+ while ((pEvent = gdk_display_get_event(pDisplay)))
{
aEvents.push_back(pEvent);
VclInputFlags nEventType = categorizeEvent(pEvent);
@@ -458,7 +460,7 @@ bool GtkInstance::AnyInput( VclInputFlags nType )
while (!aEvents.empty())
{
pEvent = aEvents.front();
- gdk_event_put(pEvent);
+ gdk_display_put_event(pDisplay, pEvent);
gdk_event_free(pEvent);
aEvents.pop_front();
}