<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://git.reviewboard.kde.org/r/122270/">https://git.reviewboard.kde.org/r/122270/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On Januar 27th, 2015, 6:59 vorm. UTC, <b>Martin Gräßlin</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
<thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
<a href="https://git.reviewboard.kde.org/r/122270/diff/1/?file=345342#file345342line250" style="color: black; font-weight: bold; text-decoration: underline;">startkde/kcminit/main.cpp</a>
<span style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
<tr>
<td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">extern "C" Q_DECL_EXPORT int kdemain(int argc, char *argv[])</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">245</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">KCMInit</span> <span class="nf">kcminit</span><span class="p">(</span> <span class="n">KCmdLineArgs</span><span class="o">::</span><span class="n">parsedArgs</span><span class="p">());</span></pre></td>
<th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">237</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="cp">#ifdef HAVE_X11</span></pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">238</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">QGuiApplication</span> <span class="nf">app</span><span class="p">(</span><span class="n">argc</span><span class="p">,</span> <span class="n">argv</span><span class="p">);</span> <span class="c1">//for multihead disabling only</span></pre></td>
</tr>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">239</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="cp">#else</span></pre></td>
</tr>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">240</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">QCoreApplication</span> <span class="nf">app</span><span class="p">(</span><span class="n">argc</span><span class="p">,</span> <span class="n">argv</span><span class="p">);</span></pre></td>
</tr>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">241</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="cp">#endif</span></pre></td>
</tr>
</tbody>
</table>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I do not like this. If the only need is to check whether it's X11 multi-head, it should open an xcb_connection_t - if that fails we don't have an X-Server. If it succeeds we can check the number of screens.</p></pre>
</blockquote>
<p>On Januar 27th, 2015, 7:10 nachm. UTC, <b>Nick Shaforostoff</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">understood, but the question remains: is kcminit the best place to do multihead-related stuff?</p></pre>
</blockquote>
<p>On Januar 28th, 2015, 1:32 vorm. UTC, <b>Thomas Lübking</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">It's required by KApplication and while that's in kde4support, it's still there (as well as KDE4 clients)
So "yes, we need that everywhere" - for now.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Clients seem to default the env to false, so uncoditionally setting it true is wrong for sure.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">It'd rather be "multihead = (screenCount > 1);" (ignoring the ini) what however would be a feature loss.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">=> Proposal
users should be able to pre-control the variable in eg. ~/.kde/env (or wherever the Plasma 2 equivalent is)
If the variable is set to false, it remains like that.
If not (ie. it's not set or set true resp. anything but 0/false) it becomes true if the screen count > 1</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Spares the ini lookup, but I don't think you get around </p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">xcb_connection_t *c;
int screen_count = xcb_setup_roots_length(xcb_get_setup(c));</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">without risking to really break stuff (the suggested approach still causes a transitional break)</p></pre>
</blockquote>
<p>On Januar 28th, 2015, 3:24 vorm. UTC, <b>Nick Shaforostoff</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">reading ini file is not more than 0.5 second with 'cold cache'. getting rid of kdelibs4support for kcminit is 2 seconds gain.
direct xcb request would require copying some 30 lines of code from xcp qpa plugin (= a no go).</p></pre>
</blockquote>
<p>On Januar 28th, 2015, 8:01 vorm. UTC, <b>Martin Gräßlin</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><blockquote style="text-rendering: inherit;padding: 0 0 0 1em;border-left: 1px solid #bbb;white-space: normal;margin: 0 0 0 0.5em;line-height: inherit;">
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">direct xcb request would require copying some 30 lines of code from xcp qpa plugin</p>
</blockquote>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">that should be less and can be done without copying code form xcb qpa. Feel free to look at kwin/main_x11.cpp to see how it can be done. As I did the port to xcb I can safely grant a relicense if that's needed.</p></pre>
</blockquote>
<p>On Januar 28th, 2015, 11:27 vorm. UTC, <b>Nick Shaforostoff</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">aree you talking about this code?
int primaryScreen = 0;
xcb_connection_t *c = xcb_connect(nullptr, &primaryScreen);
const int number_of_screens = xcb_setup_roots_length(xcb_get_setup(c));
xcb_connect(c);</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">its results differ from QGuiApplication::screens().size().</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">for me it still returns 1 when i have external monitor connected to my laptop. see
void QXcbConnection::updateScreens()
in src/plugins/platforms/xcb/qxcbconnection.cpp</p></pre>
</blockquote>
<p>On Januar 28th, 2015, 11:46 vorm. UTC, <b>Thomas Lübking</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">unless my memory is really broken, qga::screens returns a list of "panels", ie. also for the normal xrandr setup.
on your multiscreen setup, does the running kwin operate on both screens and eg. allow you to move a window from one screen to another?</p></pre>
</blockquote>
<p>On Januar 28th, 2015, 11:51 vorm. UTC, <b>Martin Gräßlin</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">If you want to test a multi-head system try using Xephyr:</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Xephyr -screen 1024x768x24 -screen 1024x768x24 :99</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">in that case you should get number_of_screens to be 2. I'm quite sure about it as I used it this week to test multi-head related changes in kwin and got the correct number of kwin instances running.</p></pre>
</blockquote>
<p>On Januar 28th, 2015, 10:54 nachm. UTC, <b>Nick Shaforostoff</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Thomas Lübking: "on your multiscreen setup, does the running kwin operate on both screens and eg. allow you to move a window from one screen to another?"</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">in kde5, when i connect external monitor, it has black background (in kde4 it immediately gets background image), immediately everything becomes slow: at first top shows that 4 'migration' processes are taking cpu time, then after a while kded5 eats 100% cpu time (it goes crazy with PowerDevilUPowerBackend::brightnessValueMax() and PowerDevilUPowerBackend::brightnessValue()) -- see bug 337674.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">so, in kde5, when i move a window to external monitor, only then it gets background image.</p></pre>
</blockquote>
<p>On Januar 29th, 2015, 1:18 vorm. UTC, <b>Nick Shaforostoff</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">update: after i connect external monitor, migration/0..3 processes start taking cpu time permanently, only until I drag konsole window onto external motinor. after this the perceived slowness disappears, but kded5 starts using 100% cpu (the reported bug)</p></pre>
</blockquote>
</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I canno really say anything about the kded5 behaviour or why plasma does not add/extend a desktop, but - staying on topic - the ability to "drag konsole window onto external monitor" is a clear indication that this is NOT a zaphod mode - the only valid value for "multihead" in that setup is "false".</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">To create a zaphod/multihead setup, you'll have to configure xorg.conf or - simpler - use xephyr w/t the command Martin posted.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">FYI: the zaphod mode is the "original", pre-xinerama, pre-xrandr, multiscreen setup.
Each screen has a root window of its own, thus needs a WM for its own and it's not possible to move windows around.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">In theory you could run KDE on the one screen and gnome on the other (it's not really possbible because of dbus, we're talking of 20 year old tech here) and operate them with the same keyboard and mouse (or use seperate input devices and have tow workplaces on the same machine)</p></pre>
<br />
<p>- Thomas</p>
<br />
<p>On Januar 29th, 2015, 1:19 vorm. UTC, Nick Shaforostoff wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: 1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tr>
<td>
<div>Review request for kde-workspace, Aleix Pol Gonzalez, Martin Gräßlin, and Lukáš Tinkl.</div>
<div>By Nick Shaforostoff.</div>
<p style="color: grey;"><i>Updated Jan. 29, 2015, 1:19 vorm.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
plasma-workspace
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Now kcminit is linked with less libraries -> startup time improved</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I also suggest always setting KDE_MULTIHEAD=true to eliminate ini file access during startup and to be able to stop linking against QtGui</p></pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">compiled, ran 'kcminit --list' and kcminit AAA</p></pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>startkde/kcminit/CMakeLists.txt <span style="color: grey">(ffae38c)</span></li>
<li>startkde/kcminit/main.h <span style="color: grey">(1140b77)</span></li>
<li>startkde/kcminit/main.cpp <span style="color: grey">(4724323)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/122270/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>