[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - vcl/unx
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Tue Jun 29 18:21:02 UTC 2021
vcl/unx/gtk3/gtkinst.cxx | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
New commits:
commit 5f9997202c5fc8db3912ccdf852c77a7f27f5a8b
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Jun 28 15:15:05 2021 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Jun 29 20:20:27 2021 +0200
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 at redhat.com>
(cherry picked from commit e82527d1fcee6bfb47b4e2a7bc51a7d097f662b0)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118099
diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 9c3b67f79bdb..a58fd1a295a4 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -432,8 +432,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
@@ -444,7 +446,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);
@@ -457,7 +459,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();
}
More information about the Libreoffice-commits
mailing list