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 20:20:27 +0200
commit5f9997202c5fc8db3912ccdf852c77a7f27f5a8b (patch)
tree22106aa9baeeeb9f0558683e63deb08301fb7974 /vcl
parent7078083e31cf54d9b46f4b0dd0c5ca557d08779a (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> (cherry picked from commit e82527d1fcee6bfb47b4e2a7bc51a7d097f662b0) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118099
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 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();
}