From 03e1ed04d7a06d039e5dc317638aa5a6b4773f8c Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Sat, 24 Jan 2015 19:37:30 +0100 Subject: Add support for Qt4 applications to dock to the Plasma 5 systray. qt-4.8.6: added dep; compared to the Slackware original, I have applied several patches to impement qsystemtrayicon support. sni-qt: added dep; this application actually provides the systray support for Qt4 apps in Plasma 5. --- deps/qt/qt.qclipboard_fix_recursive.patch | 94 +++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 deps/qt/qt.qclipboard_fix_recursive.patch (limited to 'deps/qt/qt.qclipboard_fix_recursive.patch') diff --git a/deps/qt/qt.qclipboard_fix_recursive.patch b/deps/qt/qt.qclipboard_fix_recursive.patch new file mode 100644 index 0000000..d9fe24b --- /dev/null +++ b/deps/qt/qt.qclipboard_fix_recursive.patch @@ -0,0 +1,94 @@ +--- a/src/corelib/kernel/qeventdispatcher_glib.cpp.sav 2014-03-28 15:26:37.000000000 +0100 ++++ b/src/corelib/kernel/qeventdispatcher_glib.cpp 2014-04-24 09:44:09.358659204 +0200 +@@ -255,22 +255,30 @@ struct GPostEventSource + GSource source; + QAtomicInt serialNumber; + int lastSerialNumber; ++ QEventLoop::ProcessEventsFlags processEventsFlags; + QEventDispatcherGlibPrivate *d; + }; + + static gboolean postEventSourcePrepare(GSource *s, gint *timeout) + { ++ GPostEventSource *source = reinterpret_cast(s); + QThreadData *data = QThreadData::current(); + if (!data) + return false; + ++ QEventLoop::ProcessEventsFlags excludeAllFlags ++ = QEventLoop::ExcludeUserInputEvents ++ | QEventLoop::ExcludeSocketNotifiers ++ | QEventLoop::X11ExcludeTimers; ++ if ((source->processEventsFlags & excludeAllFlags) == excludeAllFlags) ++ return false; ++ + gint dummy; + if (!timeout) + timeout = &dummy; + const bool canWait = data->canWaitLocked(); + *timeout = canWait ? -1 : 0; + +- GPostEventSource *source = reinterpret_cast(s); + return (!canWait + || (source->serialNumber != source->lastSerialNumber)); + } +@@ -284,8 +292,14 @@ static gboolean postEventSourceDispatch( + { + GPostEventSource *source = reinterpret_cast(s); + source->lastSerialNumber = source->serialNumber; +- QCoreApplication::sendPostedEvents(); +- source->d->runTimersOnceWithNormalPriority(); ++ QEventLoop::ProcessEventsFlags excludeAllFlags ++ = QEventLoop::ExcludeUserInputEvents ++ | QEventLoop::ExcludeSocketNotifiers ++ | QEventLoop::X11ExcludeTimers; ++ if ((source->processEventsFlags & excludeAllFlags) != excludeAllFlags) { ++ QCoreApplication::sendPostedEvents(); ++ source->d->runTimersOnceWithNormalPriority(); ++ } + return true; // i dunno, george... + } + +@@ -329,6 +343,7 @@ QEventDispatcherGlibPrivate::QEventDispa + postEventSource = reinterpret_cast(g_source_new(&postEventSourceFuncs, + sizeof(GPostEventSource))); + postEventSource->serialNumber = 1; ++ postEventSource->processEventsFlags = QEventLoop::AllEvents; + postEventSource->d = this; + g_source_set_can_recurse(&postEventSource->source, true); + g_source_attach(&postEventSource->source, mainContext); +@@ -423,6 +438,7 @@ bool QEventDispatcherGlib::processEvents + + // tell postEventSourcePrepare() and timerSource about any new flags + QEventLoop::ProcessEventsFlags savedFlags = d->timerSource->processEventsFlags; ++ d->postEventSource->processEventsFlags = flags; + d->timerSource->processEventsFlags = flags; + d->socketNotifierSource->processEventsFlags = flags; + +@@ -435,6 +451,7 @@ bool QEventDispatcherGlib::processEvents + while (!result && canWait) + result = g_main_context_iteration(d->mainContext, canWait); + ++ d->postEventSource->processEventsFlags = savedFlags; + d->timerSource->processEventsFlags = savedFlags; + d->socketNotifierSource->processEventsFlags = savedFlags; + +--- a/src/corelib/kernel/qeventdispatcher_unix.cpp.sav 2013-06-07 07:16:52.000000000 +0200 ++++ b/src/corelib/kernel/qeventdispatcher_unix.cpp 2014-04-24 09:43:06.927589535 +0200 +@@ -905,7 +905,15 @@ bool QEventDispatcherUNIX::processEvents + + // we are awake, broadcast it + emit awake(); +- QCoreApplicationPrivate::sendPostedEvents(0, 0, d->threadData); ++ ++ QEventLoop::ProcessEventsFlags excludeAllFlags ++ = QEventLoop::ExcludeUserInputEvents ++ | QEventLoop::ExcludeSocketNotifiers ++ | QEventLoop::X11ExcludeTimers; ++ if ((flags & excludeAllFlags) == excludeAllFlags) ++ return false; ++ if(( flags & excludeAllFlags ) != excludeAllFlags ) ++ QCoreApplicationPrivate::sendPostedEvents(0, 0, d->threadData); + + int nevents = 0; + const bool canWait = (d->threadData->canWaitLocked() -- cgit v1.2.3