D17122: Add option to use wl_display_add_socket_auto
Roman Gilg
noreply at phabricator.kde.org
Fri Jan 25 12:24:30 GMT 2019
romangg added inline comments.
INLINE COMMENTS
> fvogt wrote in test_display.cpp:223
> That won't work reliably either though - if wayland-0 is free, but wayland-1 is used, it would pick wayland-0 and wayland-2. Maybe it should just check that starting both displays at the same time succeeds and that their socket names are not equal.
That's why I said "do it one more time from there until you find the second wayland-y".
For example (semi-pseudo):
QString name1, name2;
int cnt = -1;
while(true) {
cnt++;
const QString name = "wayland-" + str(cnt);
if (!runtimeDir.exists(name)) {
name1 = name;
break;
}
}
while(true) {
cnt++;
const QString name = "wayland-" + str(cnt);
if (!runtimeDir.exists(name)) {
name2 = name;
break;
}
}
David's solution is nicer though.
REPOSITORY
R127 KWayland
REVISION DETAIL
https://phabricator.kde.org/D17122
To: fvogt, #kwin, #plasma, romangg
Cc: davidedmundson, zzag, romangg, kde-frameworks-devel, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190125/980aae8e/attachment.html>
More information about the Kde-frameworks-devel
mailing list