1 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
Author: Jan-Marek Glogowski <glogow@fbihome.de> |
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
|
|
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'> |
|
|
<head> |
|
|
<title>svntogit/packages.git - Git clone of the 'packages' repository |
|
|
</title> |
|
|
<meta name='generator' content='cgit v0.12'/> |
|
|
<meta name='robots' content='index, nofollow'/> |
|
|
<link rel='stylesheet' type='text/css' href='/cgit.css'/> |
|
|
<link rel='shortcut icon' href='/favicon.ico'/> |
|
|
<link rel='alternate' title='Atom feed' href='https://git.archlinux.org/svntogit/packages.git/atom/trunk/glib-honor-ExcludeSocketNotifiers-flag.diff?h=packages/qt4' type='application/atom+xml'/> |
|
|
<link rel='vcs-git' href='https://git.archlinux.org/svntogit/packages.git' title='svntogit/packages.git Git repository'/> |
|
|
<link rel='vcs-git' href='git://git.archlinux.org/svntogit/packages.git' title='svntogit/packages.git Git repository'/> |
|
|
<link rel='vcs-git' href='ssh://git.archlinux.org/srv/git/svntogit/packages.git' title='svntogit/packages.git Git repository'/> |
|
|
</head> |
|
|
<body> |
|
|
<div id="archnavbar"><!-- Arch Linux global navigation bar --> |
|
|
<div id="archnavbarlogo"> |
|
|
<p><a href="http://www.archlinux.org/" title="Arch news, packages, projects and more"></a></p> |
|
|
</div> |
|
|
<div id="archnavbarmenu"> |
|
|
<ul id="archnavbarlist"> |
|
|
<li id="anb-home"><a href="http://www.archlinux.org/" title="Arch news, packages, projects and more">Home</a></li> |
|
|
<li id="anb-packages"><a href="http://www.archlinux.org/packages/" title="Arch Package Database">Packages</a></li> |
|
|
<li id="anb-forums"><a href="https://bbs.archlinux.org/" title="Community forums">Forums</a></li> |
|
|
<li id="anb-wiki"><a href="https://wiki.archlinux.org/" title="Community documentation">Wiki</a></li> |
|
|
<li id="anb-bugs"><a href="https://bugs.archlinux.org/" title="Report and follow bugs">Bugs</a></li> |
|
|
<li id="anb-aur"><a href="https://aur.archlinux.org/" title="Arch Linux User Repository">AUR</a></li> |
|
|
<li id="anb-download"><a href="http://www.archlinux.org/download/" title="Get Arch Linux">Download</a></li> |
|
|
</ul> |
|
|
</div> |
|
|
</div><!-- #archnavbar --> |
|
|
<div id='cgit'><table id='header'> |
|
|
<tr> |
|
|
<td class='main'><a href='/'>index</a> : <a title='svntogit/packages.git' href='/svntogit/packages.git/'>svntogit/packages.git</a></td></tr> |
|
|
<tr><td class='sub'>Git clone of the 'packages' repository |
|
|
</td><td class='sub right'></td></tr></table> |
|
|
<table class='tabs'><tr><td> |
|
|
<a href='/svntogit/packages.git/?h=packages/qt4'>summary</a><a href='/svntogit/packages.git/refs/?h=packages/qt4'>refs</a><a href='/svntogit/packages.git/log/trunk/glib-honor-ExcludeSocketNotifiers-flag.diff?h=packages/qt4'>log</a><a class='active' href='/svntogit/packages.git/tree/trunk/glib-honor-ExcludeSocketNotifiers-flag.diff?h=packages/qt4'>tree</a><a href='/svntogit/packages.git/commit/trunk/glib-honor-ExcludeSocketNotifiers-flag.diff?h=packages/qt4'>commit</a><a href='/svntogit/packages.git/diff/trunk/glib-honor-ExcludeSocketNotifiers-flag.diff?h=packages/qt4'>diff</a><a href='/svntogit/packages.git/stats/trunk/glib-honor-ExcludeSocketNotifiers-flag.diff?h=packages/qt4'>stats</a></td><td class='form'><form class='right' method='get' action='/svntogit/packages.git/log/trunk/glib-honor-ExcludeSocketNotifiers-flag.diff'> |
|
|
<input type='hidden' name='h' value='packages/qt4'/><select name='qt'> |
|
|
<option value='grep'>log msg</option> |
|
|
<option value='author'>author</option> |
|
|
<option value='committer'>committer</option> |
|
|
<option value='range'>range</option> |
|
|
</select> |
|
|
<input class='txt' type='text' size='10' name='q' value=''/> |
|
|
<input type='submit' value='search'/> |
|
|
</form> |
|
|
</td></tr></table> |
|
|
<div class='path'>path: <a href='/svntogit/packages.git/tree/?h=packages/qt4'>root</a>/<a href='/svntogit/packages.git/tree/trunk?h=packages/qt4'>trunk</a>/<a href='/svntogit/packages.git/tree/trunk/glib-honor-ExcludeSocketNotifiers-flag.diff?h=packages/qt4'>glib-honor-ExcludeSocketNotifiers-flag.diff</a></div><div class='content'>blob: 6949bbfef31a28d641006d3d2046a12606d1e932 (<a href='/svntogit/packages.git/plain/trunk/glib-honor-ExcludeSocketNotifiers-flag.diff?h=packages/qt4'>plain</a>) |
|
|
<table summary='blob content' class='blob'> |
|
|
<tr><td class='linenumbers'><pre><a id='n1' href='#n1'>1</a> |
|
|
<a id='n2' href='#n2'>2</a> |
|
|
<a id='n3' href='#n3'>3</a> |
|
|
<a id='n4' href='#n4'>4</a> |
|
|
<a id='n5' href='#n5'>5</a> |
|
|
<a id='n6' href='#n6'>6</a> |
|
|
<a id='n7' href='#n7'>7</a> |
|
|
<a id='n8' href='#n8'>8</a> |
|
|
<a id='n9' href='#n9'>9</a> |
|
|
<a id='n10' href='#n10'>10</a> |
|
|
<a id='n11' href='#n11'>11</a> |
|
|
<a id='n12' href='#n12'>12</a> |
|
|
<a id='n13' href='#n13'>13</a> |
|
|
<a id='n14' href='#n14'>14</a> |
|
|
<a id='n15' href='#n15'>15</a> |
|
|
<a id='n16' href='#n16'>16</a> |
|
|
<a id='n17' href='#n17'>17</a> |
|
|
<a id='n18' href='#n18'>18</a> |
|
|
<a id='n19' href='#n19'>19</a> |
|
|
<a id='n20' href='#n20'>20</a> |
|
|
<a id='n21' href='#n21'>21</a> |
|
|
<a id='n22' href='#n22'>22</a> |
|
|
<a id='n23' href='#n23'>23</a> |
|
|
<a id='n24' href='#n24'>24</a> |
|
|
<a id='n25' href='#n25'>25</a> |
|
|
<a id='n26' href='#n26'>26</a> |
|
|
<a id='n27' href='#n27'>27</a> |
|
|
<a id='n28' href='#n28'>28</a> |
|
|
<a id='n29' href='#n29'>29</a> |
|
|
<a id='n30' href='#n30'>30</a> |
|
|
<a id='n31' href='#n31'>31</a> |
|
|
<a id='n32' href='#n32'>32</a> |
|
|
<a id='n33' href='#n33'>33</a> |
|
|
<a id='n34' href='#n34'>34</a> |
|
|
<a id='n35' href='#n35'>35</a> |
|
|
<a id='n36' href='#n36'>36</a> |
|
|
<a id='n37' href='#n37'>37</a> |
|
|
<a id='n38' href='#n38'>38</a> |
|
|
<a id='n39' href='#n39'>39</a> |
|
|
<a id='n40' href='#n40'>40</a> |
|
|
<a id='n41' href='#n41'>41</a> |
|
|
<a id='n42' href='#n42'>42</a> |
|
|
<a id='n43' href='#n43'>43</a> |
|
|
<a id='n44' href='#n44'>44</a> |
|
|
<a id='n45' href='#n45'>45</a> |
|
|
<a id='n46' href='#n46'>46</a> |
|
|
<a id='n47' href='#n47'>47</a> |
|
|
<a id='n48' href='#n48'>48</a> |
|
|
<a id='n49' href='#n49'>49</a> |
|
|
<a id='n50' href='#n50'>50</a> |
|
|
<a id='n51' href='#n51'>51</a> |
|
|
<a id='n52' href='#n52'>52</a> |
|
|
<a id='n53' href='#n53'>53</a> |
|
|
<a id='n54' href='#n54'>54</a> |
|
|
<a id='n55' href='#n55'>55</a> |
|
|
<a id='n56' href='#n56'>56</a> |
|
|
<a id='n57' href='#n57'>57</a> |
|
|
<a id='n58' href='#n58'>58</a> |
|
|
<a id='n59' href='#n59'>59</a> |
|
|
<a id='n60' href='#n60'>60</a> |
|
|
<a id='n61' href='#n61'>61</a> |
|
|
<a id='n62' href='#n62'>62</a> |
|
|
<a id='n63' href='#n63'>63</a> |
|
|
</pre></td> |
|
|
<td class='lines'><pre><code>Author: Jan-Marek Glogowski <glogow@fbihome.de> |
|
2 |
Date: Thu Mar 06 18:44:43 2014 +0100 |
Date: Thu Mar 06 18:44:43 2014 +0100 |
3 |
|
|
4 |
Honor QEventLoop::ExcludeSocketNotifiers in glib event loop. |
Honor QEventLoop::ExcludeSocketNotifiers in glib event loop. |
7 |
QEventLoop::X11ExcludeTimers is already implemented for the glib |
QEventLoop::X11ExcludeTimers is already implemented for the glib |
8 |
event loop. |
event loop. |
9 |
|
|
10 |
<span class="hl kwb">--- qt4-x11-4.8.1.orig/src/corelib/kernel/qeventdispatcher_glib.cpp</span> |
--- qt4-x11-4.8.1.orig/src/corelib/kernel/qeventdispatcher_glib.cpp |
11 |
<span class="hl kwa">+++ qt4-x11-4.8.1/src/corelib/kernel/qeventdispatcher_glib.cpp</span> |
+++ qt4-x11-4.8.1/src/corelib/kernel/qeventdispatcher_glib.cpp |
12 |
@@ -65,6 +65,7 @@ struct GPollFDWithQSocketNotifier |
@@ -65,6 +65,7 @@ struct GPollFDWithQSocketNotifier |
13 |
struct GSocketNotifierSource |
struct GSocketNotifierSource |
14 |
{ |
{ |
15 |
GSource source; |
GSource source; |
16 |
<span class="hl kwa">+ QEventLoop::ProcessEventsFlags processEventsFlags;</span> |
+ QEventLoop::ProcessEventsFlags processEventsFlags; |
17 |
QList<GPollFDWithQSocketNotifier *> pollfds; |
QList<GPollFDWithQSocketNotifier *> pollfds; |
18 |
}; |
}; |
19 |
|
|
20 |
@@ -80,6 +81,9 @@ static gboolean socketNotifierSourceChec |
@@ -80,6 +81,9 @@ static gboolean socketNotifierSourceChec |
21 |
GSocketNotifierSource *src = reinterpret_cast<GSocketNotifierSource *>(source); |
GSocketNotifierSource *src = reinterpret_cast<GSocketNotifierSource *>(source); |
22 |
|
|
23 |
bool pending = false; |
bool pending = false; |
24 |
<span class="hl kwa">+ if (src->processEventsFlags & QEventLoop::ExcludeSocketNotifiers)</span> |
+ if (src->processEventsFlags & QEventLoop::ExcludeSocketNotifiers) |
25 |
<span class="hl kwa">+ return pending;</span> |
+ return pending; |
26 |
<span class="hl kwa">+</span> |
+ |
27 |
for (int i = 0; !pending && i < src->pollfds.count(); ++i) { |
for (int i = 0; !pending && i < src->pollfds.count(); ++i) { |
28 |
GPollFDWithQSocketNotifier *p = src->pollfds.at(i); |
GPollFDWithQSocketNotifier *p = src->pollfds.at(i); |
29 |
|
|
30 |
@@ -103,6 +107,9 @@ static gboolean socketNotifierSourceDisp |
@@ -103,6 +107,9 @@ static gboolean socketNotifierSourceDisp |
31 |
QEvent event(QEvent::SockAct); |
QEvent event(QEvent::SockAct); |
32 |
|
|
33 |
GSocketNotifierSource *src = reinterpret_cast<GSocketNotifierSource *>(source); |
GSocketNotifierSource *src = reinterpret_cast<GSocketNotifierSource *>(source); |
34 |
<span class="hl kwa">+ if (src->processEventsFlags & QEventLoop::ExcludeSocketNotifiers)</span> |
+ if (src->processEventsFlags & QEventLoop::ExcludeSocketNotifiers) |
35 |
<span class="hl kwa">+ return true;</span> |
+ return true; |
36 |
<span class="hl kwa">+</span> |
+ |
37 |
for (int i = 0; i < src->pollfds.count(); ++i) { |
for (int i = 0; i < src->pollfds.count(); ++i) { |
38 |
GPollFDWithQSocketNotifier *p = src->pollfds.at(i); |
GPollFDWithQSocketNotifier *p = src->pollfds.at(i); |
39 |
|
|
40 |
@@ -330,6 +337,7 @@ QEventDispatcherGlibPrivate::QEventDispa |
@@ -330,6 +337,7 @@ QEventDispatcherGlibPrivate::QEventDispa |
41 |
reinterpret_cast<GSocketNotifierSource *>(g_source_new(&socketNotifierSourceFuncs, |
reinterpret_cast<GSocketNotifierSource *>(g_source_new(&socketNotifierSourceFuncs, |
42 |
sizeof(GSocketNotifierSource))); |
sizeof(GSocketNotifierSource))); |
43 |
(void) new (&socketNotifierSource->pollfds) QList<GPollFDWithQSocketNotifier *>(); |
(void) new (&socketNotifierSource->pollfds) QList<GPollFDWithQSocketNotifier *>(); |
44 |
<span class="hl kwa">+ socketNotifierSource->processEventsFlags = QEventLoop::AllEvents;</span> |
+ socketNotifierSource->processEventsFlags = QEventLoop::AllEvents; |
45 |
g_source_set_can_recurse(&socketNotifierSource->source, true); |
g_source_set_can_recurse(&socketNotifierSource->source, true); |
46 |
g_source_attach(&socketNotifierSource->source, mainContext); |
g_source_attach(&socketNotifierSource->source, mainContext); |
47 |
|
|
48 |
@@ -415,6 +423,7 @@ bool QEventDispatcherGlib::processEvents |
@@ -415,6 +423,7 @@ bool QEventDispatcherGlib::processEvents |
49 |
// tell postEventSourcePrepare() and timerSource about any new flags |
// tell postEventSourcePrepare() and timerSource about any new flags |
50 |
QEventLoop::ProcessEventsFlags savedFlags = d->timerSource->processEventsFlags; |
QEventLoop::ProcessEventsFlags savedFlags = d->timerSource->processEventsFlags; |
51 |
d->timerSource->processEventsFlags = flags; |
d->timerSource->processEventsFlags = flags; |
52 |
<span class="hl kwa">+ d->socketNotifierSource->processEventsFlags = flags;</span> |
+ d->socketNotifierSource->processEventsFlags = flags; |
53 |
|
|
54 |
if (!(flags & QEventLoop::EventLoopExec)) { |
if (!(flags & QEventLoop::EventLoopExec)) { |
55 |
// force timers to be sent at normal priority |
// force timers to be sent at normal priority |
56 |
@@ -426,6 +435,7 @@ bool QEventDispatcherGlib::processEvents |
@@ -426,6 +435,7 @@ bool QEventDispatcherGlib::processEvents |
57 |
result = g_main_context_iteration(d->mainContext, canWait); |
result = g_main_context_iteration(d->mainContext, canWait); |
58 |
|
|
59 |
d->timerSource->processEventsFlags = savedFlags; |
d->timerSource->processEventsFlags = savedFlags; |
60 |
<span class="hl kwa">+ d->socketNotifierSource->processEventsFlags = savedFlags;</span> |
+ d->socketNotifierSource->processEventsFlags = savedFlags; |
61 |
|
|
62 |
if (canWait) |
if (canWait) |
63 |
emit awake(); |
emit awake(); |
|
</code></pre></td></tr></table> |
|
|
</div> <!-- class=content --> |
|
|
<div class="foot" style="padding-left:1em;padding-right:1em;"> |
|
|
<p>Copyright © 2002-2016 <a href="mailto:jvinet@zeroflux.org" |
|
|
title="contact Judd Vinet">Judd Vinet</a> and <a href="mailto:aaron@archlinux.org" |
|
|
title="contact Aaron Griffin">Aaron Griffin</a>. The Arch Linux name and logo |
|
|
are recognized trademarks. Some rights reserved. The registered trademark |
|
|
Linux® is used pursuant to a sublicense from LMI, the exclusive licensee |
|
|
of Linus Torvalds, owner of the mark on a world-wide basis.</p> |
|
|
</div> |
|
|
</div> <!-- id=cgit --> |
|
|
</body> |
|
|
</html> |
|