summaryrefslogtreecommitdiffstats
path: root/patches/source/qt/qt.glib-honor-ExcludeSocketNotifiers-flag.diff
diff options
context:
space:
mode:
author Patrick J Volkerding <volkerdi@slackware.com>2018-05-25 23:29:36 +0000
committer Eric Hameleers <alien@slackware.com>2018-05-31 15:18:32 -0700
commit8ff4f2f51a6cf07fc33742ce3bee81328896e49b (patch)
tree4a166b8389404be98a6c098babaa444e2dec8f48 /patches/source/qt/qt.glib-honor-ExcludeSocketNotifiers-flag.diff
parent76fc4757ac91ac7947a01fb7b53dddf9a78a01d1 (diff)
downloadcurrent-14.1.tar.gz
current-14.1.tar.xz
Fri May 25 23:29:36 UTC 201814.1
patches/packages/glibc-zoneinfo-2018e-noarch-2_slack14.1.txz: Rebuilt. Handle removal of US/Pacific-New timezone. If we see that the machine is using this, it will be automatically switched to US/Pacific.
Diffstat (limited to 'patches/source/qt/qt.glib-honor-ExcludeSocketNotifiers-flag.diff')
-rw-r--r--patches/source/qt/qt.glib-honor-ExcludeSocketNotifiers-flag.diff63
1 files changed, 63 insertions, 0 deletions
diff --git a/patches/source/qt/qt.glib-honor-ExcludeSocketNotifiers-flag.diff b/patches/source/qt/qt.glib-honor-ExcludeSocketNotifiers-flag.diff
new file mode 100644
index 000000000..6949bbfef
--- /dev/null
+++ b/patches/source/qt/qt.glib-honor-ExcludeSocketNotifiers-flag.diff
@@ -0,0 +1,63 @@
+Author: Jan-Marek Glogowski <glogow@fbihome.de>
+Date: Thu Mar 06 18:44:43 2014 +0100
+
+ Honor QEventLoop::ExcludeSocketNotifiers in glib event loop.
+
+ Implements QEventLoop::ExcludeSocketNotifiers in the same way
+ QEventLoop::X11ExcludeTimers is already implemented for the glib
+ event loop.
+
+--- qt4-x11-4.8.1.orig/src/corelib/kernel/qeventdispatcher_glib.cpp
++++ qt4-x11-4.8.1/src/corelib/kernel/qeventdispatcher_glib.cpp
+@@ -65,6 +65,7 @@ struct GPollFDWithQSocketNotifier
+ struct GSocketNotifierSource
+ {
+ GSource source;
++ QEventLoop::ProcessEventsFlags processEventsFlags;
+ QList<GPollFDWithQSocketNotifier *> pollfds;
+ };
+
+@@ -80,6 +81,9 @@ static gboolean socketNotifierSourceChec
+ GSocketNotifierSource *src = reinterpret_cast<GSocketNotifierSource *>(source);
+
+ bool pending = false;
++ if (src->processEventsFlags & QEventLoop::ExcludeSocketNotifiers)
++ return pending;
++
+ for (int i = 0; !pending && i < src->pollfds.count(); ++i) {
+ GPollFDWithQSocketNotifier *p = src->pollfds.at(i);
+
+@@ -103,6 +107,9 @@ static gboolean socketNotifierSourceDisp
+ QEvent event(QEvent::SockAct);
+
+ GSocketNotifierSource *src = reinterpret_cast<GSocketNotifierSource *>(source);
++ if (src->processEventsFlags & QEventLoop::ExcludeSocketNotifiers)
++ return true;
++
+ for (int i = 0; i < src->pollfds.count(); ++i) {
+ GPollFDWithQSocketNotifier *p = src->pollfds.at(i);
+
+@@ -330,6 +337,7 @@ QEventDispatcherGlibPrivate::QEventDispa
+ reinterpret_cast<GSocketNotifierSource *>(g_source_new(&socketNotifierSourceFuncs,
+ sizeof(GSocketNotifierSource)));
+ (void) new (&socketNotifierSource->pollfds) QList<GPollFDWithQSocketNotifier *>();
++ socketNotifierSource->processEventsFlags = QEventLoop::AllEvents;
+ g_source_set_can_recurse(&socketNotifierSource->source, true);
+ g_source_attach(&socketNotifierSource->source, mainContext);
+
+@@ -415,6 +423,7 @@ bool QEventDispatcherGlib::processEvents
+ // tell postEventSourcePrepare() and timerSource about any new flags
+ QEventLoop::ProcessEventsFlags savedFlags = d->timerSource->processEventsFlags;
+ d->timerSource->processEventsFlags = flags;
++ d->socketNotifierSource->processEventsFlags = flags;
+
+ if (!(flags & QEventLoop::EventLoopExec)) {
+ // force timers to be sent at normal priority
+@@ -426,6 +435,7 @@ bool QEventDispatcherGlib::processEvents
+ result = g_main_context_iteration(d->mainContext, canWait);
+
+ d->timerSource->processEventsFlags = savedFlags;
++ d->socketNotifierSource->processEventsFlags = savedFlags;
+
+ if (canWait)
+ emit awake();