From e82527d1fcee6bfb47b4e2a7bc51a7d097f662b0 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 28 Jun 2021 15:15:05 +0100 Subject: gdk_events_pending->gdk_display_has_pending MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- vcl/unx/gtk3/gtkinst.cxx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'vcl') 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 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(); } -- cgit