Annotation of /trunk/qt4/patches/qt-4.8.7-l-qclipboard_fix_recursive.patch
Parent Directory | Revision Log
Revision 2917 -
(hide annotations)
(download)
Wed May 17 09:04:25 2017 UTC (7 years, 4 months ago) by niro
File size: 4017 byte(s)
Wed May 17 09:04:25 2017 UTC (7 years, 4 months ago) by niro
File size: 4017 byte(s)
-fixed patches
1 | niro | 2917 | --- src/corelib/kernel/qeventdispatcher_glib.cpp.sav 2014-03-28 15:26:37.000000000 +0100 |
2 | +++ src/corelib/kernel/qeventdispatcher_glib.cpp 2014-04-24 09:44:09.358659204 +0200 | ||
3 | @@ -255,22 +255,30 @@ struct GPostEventSource | ||
4 | niro | 2913 | GSource source; |
5 | QAtomicInt serialNumber; | ||
6 | int lastSerialNumber; | ||
7 | niro | 2917 | + QEventLoop::ProcessEventsFlags processEventsFlags; |
8 | niro | 2913 | QEventDispatcherGlibPrivate *d; |
9 | }; | ||
10 | |||
11 | static gboolean postEventSourcePrepare(GSource *s, gint *timeout) | ||
12 | { | ||
13 | niro | 2917 | + GPostEventSource *source = reinterpret_cast<GPostEventSource *>(s); |
14 | niro | 2913 | QThreadData *data = QThreadData::current(); |
15 | if (!data) | ||
16 | return false; | ||
17 | |||
18 | niro | 2917 | + QEventLoop::ProcessEventsFlags excludeAllFlags |
19 | + = QEventLoop::ExcludeUserInputEvents | ||
20 | + | QEventLoop::ExcludeSocketNotifiers | ||
21 | + | QEventLoop::X11ExcludeTimers; | ||
22 | + if ((source->processEventsFlags & excludeAllFlags) == excludeAllFlags) | ||
23 | + return false; | ||
24 | + | ||
25 | niro | 2913 | gint dummy; |
26 | if (!timeout) | ||
27 | niro | 2917 | timeout = &dummy; |
28 | const bool canWait = data->canWaitLocked(); | ||
29 | niro | 2913 | *timeout = canWait ? -1 : 0; |
30 | |||
31 | niro | 2917 | - GPostEventSource *source = reinterpret_cast<GPostEventSource *>(s); |
32 | niro | 2913 | return (!canWait |
33 | niro | 2917 | || (source->serialNumber != source->lastSerialNumber)); |
34 | niro | 2913 | } |
35 | niro | 2917 | @@ -284,8 +292,14 @@ static gboolean postEventSourceDispatch( |
36 | niro | 2913 | { |
37 | niro | 2917 | GPostEventSource *source = reinterpret_cast<GPostEventSource *>(s); |
38 | source->lastSerialNumber = source->serialNumber; | ||
39 | - QCoreApplication::sendPostedEvents(); | ||
40 | - source->d->runTimersOnceWithNormalPriority(); | ||
41 | + QEventLoop::ProcessEventsFlags excludeAllFlags | ||
42 | + = QEventLoop::ExcludeUserInputEvents | ||
43 | + | QEventLoop::ExcludeSocketNotifiers | ||
44 | + | QEventLoop::X11ExcludeTimers; | ||
45 | + if ((source->processEventsFlags & excludeAllFlags) != excludeAllFlags) { | ||
46 | + QCoreApplication::sendPostedEvents(); | ||
47 | + source->d->runTimersOnceWithNormalPriority(); | ||
48 | + } | ||
49 | niro | 2913 | return true; // i dunno, george... |
50 | } | ||
51 | |||
52 | niro | 2917 | @@ -329,6 +343,7 @@ QEventDispatcherGlibPrivate::QEventDispa |
53 | postEventSource = reinterpret_cast<GPostEventSource *>(g_source_new(&postEventSourceFuncs, | ||
54 | niro | 2913 | sizeof(GPostEventSource))); |
55 | niro | 2917 | postEventSource->serialNumber = 1; |
56 | + postEventSource->processEventsFlags = QEventLoop::AllEvents; | ||
57 | postEventSource->d = this; | ||
58 | g_source_set_can_recurse(&postEventSource->source, true); | ||
59 | g_source_attach(&postEventSource->source, mainContext); | ||
60 | @@ -423,6 +438,7 @@ bool QEventDispatcherGlib::processEvents | ||
61 | niro | 2913 | |
62 | // tell postEventSourcePrepare() and timerSource about any new flags | ||
63 | niro | 2917 | QEventLoop::ProcessEventsFlags savedFlags = d->timerSource->processEventsFlags; |
64 | + d->postEventSource->processEventsFlags = flags; | ||
65 | d->timerSource->processEventsFlags = flags; | ||
66 | d->socketNotifierSource->processEventsFlags = flags; | ||
67 | niro | 2913 | |
68 | niro | 2917 | @@ -435,6 +451,7 @@ bool QEventDispatcherGlib::processEvents |
69 | while (!result && canWait) | ||
70 | result = g_main_context_iteration(d->mainContext, canWait); | ||
71 | niro | 2913 | |
72 | niro | 2917 | + d->postEventSource->processEventsFlags = savedFlags; |
73 | d->timerSource->processEventsFlags = savedFlags; | ||
74 | d->socketNotifierSource->processEventsFlags = savedFlags; | ||
75 | niro | 2913 | |
76 | niro | 2917 | --- src/corelib/kernel/qeventdispatcher_unix.cpp.sav 2013-06-07 07:16:52.000000000 +0200 |
77 | +++ src/corelib/kernel/qeventdispatcher_unix.cpp 2014-04-24 09:43:06.927589535 +0200 | ||
78 | @@ -905,7 +905,15 @@ bool QEventDispatcherUNIX::processEvents | ||
79 | niro | 2913 | |
80 | // we are awake, broadcast it | ||
81 | emit awake(); | ||
82 | niro | 2917 | - QCoreApplicationPrivate::sendPostedEvents(0, 0, d->threadData); |
83 | + | ||
84 | + QEventLoop::ProcessEventsFlags excludeAllFlags | ||
85 | + = QEventLoop::ExcludeUserInputEvents | ||
86 | + | QEventLoop::ExcludeSocketNotifiers | ||
87 | + | QEventLoop::X11ExcludeTimers; | ||
88 | + if ((flags & excludeAllFlags) == excludeAllFlags) | ||
89 | + return false; | ||
90 | + if(( flags & excludeAllFlags ) != excludeAllFlags ) | ||
91 | + QCoreApplicationPrivate::sendPostedEvents(0, 0, d->threadData); | ||
92 | niro | 2913 | |
93 | int nevents = 0; | ||
94 | niro | 2917 | const bool canWait = (d->threadData->canWaitLocked() |