Changeset View
Changeset View
Standalone View
Standalone View
libtaskmanager/virtualdesktopinfo.cpp
Show All 14 Lines | |||||
15 | Lesser General Public License for more details. | 15 | Lesser General Public License for more details. | ||
16 | 16 | | |||
17 | You should have received a copy of the GNU Lesser General Public | 17 | You should have received a copy of the GNU Lesser General Public | ||
18 | License along with this library. If not, see <http://www.gnu.org/licenses/>. | 18 | License along with this library. If not, see <http://www.gnu.org/licenses/>. | ||
19 | *********************************************************************/ | 19 | *********************************************************************/ | ||
20 | 20 | | |||
21 | #include "virtualdesktopinfo.h" | 21 | #include "virtualdesktopinfo.h" | ||
22 | 22 | | |||
23 | #include <KLocalizedString> | ||||
24 | #include <KWayland/Client/connection_thread.h> | ||||
25 | #include <KWayland/Client/plasmavirtualdesktop.h> | ||||
26 | #include <KWayland/Client/registry.h> | ||||
23 | #include <KWindowSystem> | 27 | #include <KWindowSystem> | ||
24 | 28 | | |||
25 | #include <QDBusConnection> | 29 | #include <QDBusConnection> | ||
26 | 30 | | |||
27 | #include <config-X11.h> | 31 | #include <config-X11.h> | ||
28 | 32 | | |||
29 | #if HAVE_X11 | 33 | #if HAVE_X11 | ||
30 | #include <netwm.h> | 34 | #include <netwm.h> | ||
31 | #include <QX11Info> | 35 | #include <QX11Info> | ||
32 | #endif | 36 | #endif | ||
33 | 37 | | |||
34 | namespace TaskManager | 38 | namespace TaskManager | ||
35 | { | 39 | { | ||
40 | class Q_DECL_HIDDEN VirtualDesktopInfo::Private : public QObject | ||||
41 | { | ||||
42 | Q_OBJECT | ||||
36 | 43 | | |||
37 | VirtualDesktopInfo::VirtualDesktopInfo(QObject *parent) : QObject(parent) | 44 | public: | ||
45 | Private(VirtualDesktopInfo *q); | ||||
46 | virtual ~Private() {} | ||||
47 | | ||||
48 | uint refCount = 1; | ||||
49 | | ||||
50 | virtual void init() = 0; | ||||
51 | virtual QVariant currentDesktop() const = 0; | ||||
52 | virtual int numberOfDesktops() const = 0; | ||||
53 | virtual QVariantList desktopIds() const = 0; | ||||
54 | virtual QStringList desktopNames() const = 0; | ||||
55 | virtual quint32 position(const QVariant &desktop) const = 0; | ||||
56 | virtual int desktopLayoutRows() const = 0; | ||||
57 | virtual void requestActivate(const QVariant &desktop) = 0; | ||||
58 | virtual void requestCreateDesktop(quint32 position) = 0; | ||||
59 | virtual void requestRemoveDesktop(quint32 position) = 0; | ||||
60 | | ||||
61 | Q_SIGNALS: | ||||
62 | void currentDesktopChanged() const; | ||||
63 | void numberOfDesktopsChanged() const; | ||||
64 | void desktopIdsChanged() const; | ||||
65 | void desktopNamesChanged() const; | ||||
66 | void desktopLayoutRowsChanged() const; | ||||
67 | | ||||
68 | protected: | ||||
69 | VirtualDesktopInfo *q; | ||||
70 | }; | ||||
71 | | ||||
72 | VirtualDesktopInfo::Private::Private(VirtualDesktopInfo *q) | ||||
73 | : q(q) | ||||
74 | { | ||||
75 | } | ||||
76 | | ||||
77 | #if HAVE_X11 | ||||
78 | class Q_DECL_HIDDEN VirtualDesktopInfo::XWindowPrivate : public VirtualDesktopInfo::Private | ||||
79 | { | ||||
80 | public: | ||||
81 | XWindowPrivate(VirtualDesktopInfo *q); | ||||
82 | | ||||
83 | void init() override; | ||||
84 | QVariant currentDesktop() const override; | ||||
85 | int numberOfDesktops() const override; | ||||
86 | QVariantList desktopIds() const override; | ||||
87 | QStringList desktopNames() const override; | ||||
88 | quint32 position(const QVariant &desktop) const override; | ||||
89 | int desktopLayoutRows() const override; | ||||
90 | void requestActivate(const QVariant &desktop) override; | ||||
91 | void requestCreateDesktop(quint32 position) override; | ||||
92 | void requestRemoveDesktop(quint32 position) override; | ||||
93 | }; | ||||
94 | | ||||
95 | VirtualDesktopInfo::XWindowPrivate::XWindowPrivate(VirtualDesktopInfo *q) | ||||
96 | : VirtualDesktopInfo::Private(q) | ||||
97 | { | ||||
98 | init(); | ||||
99 | } | ||||
100 | | ||||
101 | void VirtualDesktopInfo::XWindowPrivate::init() | ||||
38 | { | 102 | { | ||
39 | connect(KWindowSystem::self(), &KWindowSystem::currentDesktopChanged, | 103 | connect(KWindowSystem::self(), &KWindowSystem::currentDesktopChanged, | ||
40 | this, &VirtualDesktopInfo::currentDesktopChanged); | 104 | this, &VirtualDesktopInfo::XWindowPrivate::currentDesktopChanged); | ||
41 | 105 | | |||
42 | connect(KWindowSystem::self(), &KWindowSystem::numberOfDesktopsChanged, | 106 | connect(KWindowSystem::self(), &KWindowSystem::numberOfDesktopsChanged, | ||
43 | this, &VirtualDesktopInfo::numberOfDesktopsChanged); | 107 | this, &VirtualDesktopInfo::XWindowPrivate::numberOfDesktopsChanged); | ||
44 | 108 | | |||
45 | connect(KWindowSystem::self(), &KWindowSystem::desktopNamesChanged, | 109 | connect(KWindowSystem::self(), &KWindowSystem::desktopNamesChanged, | ||
46 | this, &VirtualDesktopInfo::desktopNamesChanged); | 110 | this, &VirtualDesktopInfo::XWindowPrivate::desktopNamesChanged); | ||
47 | 111 | | |||
48 | #if HAVE_X11 | | |||
49 | if (KWindowSystem::isPlatformX11()) { | | |||
50 | QDBusConnection dbus = QDBusConnection::sessionBus(); | 112 | QDBusConnection dbus = QDBusConnection::sessionBus(); | ||
51 | dbus.connect(QString(), QStringLiteral("/KWin"), QStringLiteral("org.kde.KWin"), QStringLiteral("reloadConfig"), | 113 | dbus.connect(QString(), QStringLiteral("/KWin"), QStringLiteral("org.kde.KWin"), QStringLiteral("reloadConfig"), | ||
52 | this, SIGNAL(desktopLayoutRowsChanged())); | 114 | this, SIGNAL(desktopLayoutRowsChanged())); | ||
53 | } | 115 | } | ||
54 | #endif | | |||
55 | } | | |||
56 | 116 | | |||
57 | VirtualDesktopInfo::~VirtualDesktopInfo() | 117 | QVariant VirtualDesktopInfo::XWindowPrivate::currentDesktop() const | ||
58 | { | 118 | { | ||
119 | return KWindowSystem::currentDesktop(); | ||||
59 | } | 120 | } | ||
60 | 121 | | |||
61 | int VirtualDesktopInfo::currentDesktop() const | 122 | int VirtualDesktopInfo::XWindowPrivate::numberOfDesktops() const | ||
62 | { | 123 | { | ||
63 | return KWindowSystem::currentDesktop(); | 124 | return KWindowSystem::numberOfDesktops(); | ||
64 | } | 125 | } | ||
65 | 126 | | |||
66 | int VirtualDesktopInfo::numberOfDesktops() const | 127 | QVariantList VirtualDesktopInfo::XWindowPrivate::desktopIds() const | ||
67 | { | 128 | { | ||
68 | return KWindowSystem::numberOfDesktops(); | 129 | QVariantList ids; | ||
130 | | ||||
131 | for (int i = 1; i <= KWindowSystem::numberOfDesktops(); ++i) { | ||||
132 | ids << i; | ||||
69 | } | 133 | } | ||
70 | 134 | | |||
71 | QStringList VirtualDesktopInfo::desktopNames() const | 135 | return ids; | ||
zzag: ids.reserve(KWindowSystem::numberOfDesktops()); | |||||
136 | } | ||||
137 | | ||||
138 | QStringList VirtualDesktopInfo::XWindowPrivate::desktopNames() const | ||||
72 | { | 139 | { | ||
73 | QStringList names; | 140 | QStringList names; | ||
74 | 141 | | |||
75 | // Virtual desktop numbers start at 1. | 142 | // Virtual desktop numbers start at 1. | ||
76 | for (int i = 1; i <= KWindowSystem::numberOfDesktops(); ++i) { | 143 | for (int i = 1; i <= KWindowSystem::numberOfDesktops(); ++i) { | ||
77 | names << KWindowSystem::desktopName(i); | 144 | names << KWindowSystem::desktopName(i); | ||
78 | } | 145 | } | ||
79 | 146 | | |||
80 | return names; | 147 | return names; | ||
81 | } | 148 | } | ||
82 | 149 | | |||
83 | int VirtualDesktopInfo::desktopLayoutRows() const | 150 | quint32 VirtualDesktopInfo::XWindowPrivate::position(const QVariant &desktop) const | ||
151 | { | ||||
152 | bool ok = false; | ||||
153 | | ||||
154 | const quint32 desktopNumber = desktop.toUInt(&ok); | ||||
155 | | ||||
156 | if (!ok) { | ||||
157 | return -1; | ||||
158 | } | ||||
159 | | ||||
160 | return desktopNumber; | ||||
161 | } | ||||
162 | | ||||
163 | int VirtualDesktopInfo::XWindowPrivate::desktopLayoutRows() const | ||||
84 | { | 164 | { | ||
85 | #if HAVE_X11 | | |||
86 | if (KWindowSystem::isPlatformX11()) { | | |||
87 | const NETRootInfo info(QX11Info::connection(), NET::NumberOfDesktops | NET::DesktopNames, NET::WM2DesktopLayout); | 165 | const NETRootInfo info(QX11Info::connection(), NET::NumberOfDesktops | NET::DesktopNames, NET::WM2DesktopLayout); | ||
88 | return info.desktopLayoutColumnsRows().height(); | 166 | return info.desktopLayoutColumnsRows().height(); | ||
89 | } | 167 | } | ||
168 | | ||||
169 | void VirtualDesktopInfo::XWindowPrivate::requestActivate(const QVariant &desktop) | ||||
170 | { | ||||
171 | bool ok = false; | ||||
172 | const int desktopNumber = desktop.toInt(&ok); | ||||
173 | | ||||
174 | // Virtual desktop numbers start at 1. | ||||
175 | if (ok && desktopNumber > 0 && desktopNumber <= KWindowSystem::numberOfDesktops()) { | ||||
176 | KWindowSystem::setCurrentDesktop(desktopNumber); | ||||
177 | } | ||||
178 | } | ||||
179 | | ||||
180 | void VirtualDesktopInfo::XWindowPrivate::requestCreateDesktop(quint32 position) | ||||
181 | { | ||||
182 | Q_UNUSED(position) | ||||
183 | | ||||
184 | NETRootInfo info(QX11Info::connection(), NET::NumberOfDesktops); | ||||
185 | info.setNumberOfDesktops(info.numberOfDesktops() + 1); | ||||
186 | } | ||||
187 | | ||||
188 | void VirtualDesktopInfo::XWindowPrivate::requestRemoveDesktop(quint32 position) | ||||
189 | { | ||||
190 | Q_UNUSED(position) | ||||
191 | | ||||
192 | NETRootInfo info(QX11Info::connection(), NET::NumberOfDesktops); | ||||
193 | | ||||
194 | if (info.numberOfDesktops() > 1) { | ||||
195 | info.setNumberOfDesktops(info.numberOfDesktops() - 1); | ||||
196 | } | ||||
197 | } | ||||
90 | #endif | 198 | #endif | ||
91 | 199 | | |||
200 | class Q_DECL_HIDDEN VirtualDesktopInfo::WaylandPrivate : public VirtualDesktopInfo::Private | ||||
201 | { | ||||
202 | public: | ||||
203 | WaylandPrivate(VirtualDesktopInfo *q); | ||||
204 | | ||||
205 | QVariant currentVirtualDesktop; | ||||
206 | QStringList virtualDesktops; | ||||
207 | KWayland::Client::PlasmaVirtualDesktopManagement *virtualDesktopManagement = nullptr; | ||||
208 | | ||||
209 | void init() override; | ||||
210 | void addDesktop(const QString &id, quint32 position); | ||||
211 | QVariant currentDesktop() const override; | ||||
212 | int numberOfDesktops() const override; | ||||
213 | QVariantList desktopIds() const override; | ||||
214 | QStringList desktopNames() const override; | ||||
215 | quint32 position(const QVariant &desktop) const override; | ||||
216 | int desktopLayoutRows() const override; | ||||
217 | void requestActivate(const QVariant &desktop) override; | ||||
218 | void requestCreateDesktop(quint32 position) override; | ||||
219 | void requestRemoveDesktop(quint32 position) override; | ||||
220 | }; | ||||
221 | | ||||
222 | VirtualDesktopInfo::WaylandPrivate::WaylandPrivate(VirtualDesktopInfo *q) | ||||
223 | : VirtualDesktopInfo::Private(q) | ||||
224 | { | ||||
225 | init(); | ||||
226 | } | ||||
227 | | ||||
228 | void VirtualDesktopInfo::WaylandPrivate::init() | ||||
229 | { | ||||
230 | if (!KWindowSystem::isPlatformWayland()) { | ||||
231 | return; | ||||
232 | } | ||||
233 | | ||||
234 | KWayland::Client::ConnectionThread *connection = KWayland::Client::ConnectionThread::fromApplication(q); | ||||
235 | | ||||
236 | if (!connection) { | ||||
237 | return; | ||||
238 | } | ||||
239 | | ||||
240 | KWayland::Client::Registry *registry = new KWayland::Client::Registry(q); | ||||
241 | registry->create(connection); | ||||
242 | | ||||
243 | QObject::connect(registry, &KWayland::Client::Registry::plasmaVirtualDesktopManagementAnnounced, | ||||
244 | [this, registry] (quint32 name, quint32 version) { | ||||
245 | virtualDesktopManagement = registry->createPlasmaVirtualDesktopManagement(name, version, q); | ||||
246 | | ||||
247 | const QList<KWayland::Client::PlasmaVirtualDesktop *> &desktops = virtualDesktopManagement->desktops(); | ||||
248 | | ||||
249 | /* FIXME: PlasmaVirtualDesktopManagement doesn't have this ...? | ||||
250 | QObject::connect(virtualDesktopManagement, &KWayland::Client::PlasmaVirtualDesktopManagement::interfaceAboutToBeReleased, q, | ||||
251 | [this] { | ||||
252 | virtualDesktops.clear(); | ||||
253 | emit numberOfDesktopsChanged(); | ||||
254 | emit currentDesktopChanged(); | ||||
255 | emit desktopIdsChanged(); | ||||
256 | emit desktopNamesChanged(); | ||||
257 | emit desktopLayoutRowsChanged(); | ||||
258 | } | ||||
259 | ); | ||||
260 | */ | ||||
261 | | ||||
262 | QObject::connect(virtualDesktopManagement, &KWayland::Client::PlasmaVirtualDesktopManagement::desktopCreated, q, | ||||
263 | [this](const QString &id, quint32 position) { | ||||
264 | addDesktop(id, position); | ||||
265 | } | ||||
266 | ); | ||||
267 | | ||||
268 | QObject::connect(virtualDesktopManagement, &KWayland::Client::PlasmaVirtualDesktopManagement::desktopRemoved, q, | ||||
269 | [this](const QString &id) { | ||||
270 | virtualDesktops.removeOne(id); | ||||
271 | | ||||
272 | emit numberOfDesktopsChanged(); | ||||
273 | emit desktopIdsChanged(); | ||||
274 | emit desktopNamesChanged(); | ||||
275 | | ||||
276 | if (currentVirtualDesktop == id) { | ||||
277 | currentVirtualDesktop.clear(); | ||||
278 | emit currentDesktopChanged(); | ||||
279 | } | ||||
280 | } | ||||
281 | ); | ||||
282 | } | ||||
283 | ); | ||||
284 | | ||||
285 | registry->setup(); | ||||
286 | } | ||||
287 | | ||||
288 | void VirtualDesktopInfo::WaylandPrivate::addDesktop(const QString &id, quint32 position) | ||||
289 | { | ||||
290 | if (virtualDesktops.indexOf(id) != -1) { | ||||
291 | return; | ||||
292 | } | ||||
293 | | ||||
294 | virtualDesktops.insert(position, id); | ||||
295 | | ||||
296 | emit numberOfDesktopsChanged(); | ||||
297 | emit desktopIdsChanged(); | ||||
298 | emit desktopNamesChanged(); | ||||
299 | | ||||
300 | const KWayland::Client::PlasmaVirtualDesktop *desktop = virtualDesktopManagement->getVirtualDesktop(id); | ||||
301 | | ||||
302 | QObject::connect(desktop, &KWayland::Client::PlasmaVirtualDesktop::activated, q, | ||||
303 | [desktop, this]() { | ||||
304 | currentVirtualDesktop = desktop->id(); | ||||
305 | emit currentDesktopChanged(); | ||||
306 | } | ||||
307 | ); | ||||
308 | | ||||
309 | if (desktop->isActive()) { | ||||
310 | currentVirtualDesktop = id; | ||||
311 | emit currentDesktopChanged(); | ||||
312 | } | ||||
313 | } | ||||
314 | | ||||
315 | QVariant VirtualDesktopInfo::WaylandPrivate::currentDesktop() const | ||||
316 | { | ||||
317 | return currentVirtualDesktop; | ||||
318 | } | ||||
319 | | ||||
320 | int VirtualDesktopInfo::WaylandPrivate::numberOfDesktops() const | ||||
321 | { | ||||
zzag: Call reserve method. Also, why not range based for loop? | |||||
322 | return virtualDesktops.count(); | ||||
323 | } | ||||
324 | | ||||
325 | quint32 VirtualDesktopInfo::WaylandPrivate::position(const QVariant &desktop) const | ||||
326 | { | ||||
327 | return virtualDesktops.indexOf(desktop.toString()); | ||||
328 | } | ||||
329 | | ||||
330 | QVariantList VirtualDesktopInfo::WaylandPrivate::desktopIds() const | ||||
331 | { | ||||
332 | QVariantList ids; | ||||
333 | | ||||
334 | foreach (const QString &id, virtualDesktops) { | ||||
335 | ids << id; | ||||
336 | } | ||||
337 | | ||||
338 | return ids; | ||||
339 | } | ||||
340 | | ||||
341 | QStringList VirtualDesktopInfo::WaylandPrivate::desktopNames() const | ||||
342 | { | ||||
343 | QStringList names; | ||||
344 | | ||||
345 | foreach(const QString &id, virtualDesktops) { | ||||
346 | const KWayland::Client::PlasmaVirtualDesktop *desktop = virtualDesktopManagement->getVirtualDesktop(id); | ||||
347 | | ||||
348 | if (desktop) { | ||||
349 | names << desktop->name(); | ||||
350 | } | ||||
351 | } | ||||
352 | | ||||
353 | return names; | ||||
354 | } | ||||
355 | | ||||
356 | int VirtualDesktopInfo::WaylandPrivate::desktopLayoutRows() const | ||||
357 | { | ||||
358 | // TODO FIXME: We don't have virtual desktop layout information in the Wayland | ||||
359 | // protocol yet. | ||||
92 | return 0; | 360 | return 0; | ||
93 | } | 361 | } | ||
94 | 362 | | |||
363 | void VirtualDesktopInfo::WaylandPrivate::requestActivate(const QVariant &desktop) | ||||
364 | { | ||||
365 | KWayland::Client::PlasmaVirtualDesktop *desktopObj = virtualDesktopManagement->getVirtualDesktop(desktop.toString()); | ||||
366 | | ||||
367 | if (desktopObj) { | ||||
368 | desktopObj->requestActivate(); | ||||
369 | } | ||||
370 | } | ||||
371 | | ||||
372 | void VirtualDesktopInfo::WaylandPrivate::requestCreateDesktop(quint32 position) | ||||
373 | { | ||||
374 | virtualDesktopManagement->requestCreateVirtualDesktop(i18n("New Desktop"), position); | ||||
375 | } | ||||
376 | | ||||
377 | void VirtualDesktopInfo::WaylandPrivate::requestRemoveDesktop(quint32 position) | ||||
378 | { | ||||
379 | if (virtualDesktops.count() == 1) { | ||||
380 | return; | ||||
381 | } | ||||
382 | | ||||
383 | if (position > ((quint32)virtualDesktops.count() - 1)) { | ||||
384 | return; | ||||
385 | } | ||||
386 | | ||||
387 | virtualDesktopManagement->requestRemoveVirtualDesktop(virtualDesktops.at(position)); | ||||
388 | } | ||||
389 | | ||||
390 | VirtualDesktopInfo::Private* VirtualDesktopInfo::d = nullptr; | ||||
391 | | ||||
392 | VirtualDesktopInfo::VirtualDesktopInfo(QObject *parent) : QObject(parent) | ||||
393 | { | ||||
394 | if (!d) { | ||||
395 | #if HAVE_X11 | ||||
396 | if (KWindowSystem::isPlatformX11()) { | ||||
397 | d = new VirtualDesktopInfo::XWindowPrivate(this); | ||||
398 | } else | ||||
399 | #endif | ||||
400 | { | ||||
401 | d = new VirtualDesktopInfo::WaylandPrivate(this); | ||||
95 | } | 402 | } | ||
403 | } else { | ||||
404 | ++d->refCount; | ||||
405 | } | ||||
406 | | ||||
407 | connect(d, &VirtualDesktopInfo::Private::currentDesktopChanged, | ||||
408 | this, &VirtualDesktopInfo::currentDesktopChanged); | ||||
409 | connect(d, &VirtualDesktopInfo::Private::numberOfDesktopsChanged, | ||||
410 | this, &VirtualDesktopInfo::numberOfDesktopsChanged); | ||||
411 | connect(d, &VirtualDesktopInfo::Private::desktopIdsChanged, | ||||
412 | this, &VirtualDesktopInfo::desktopIdsChanged); | ||||
413 | connect(d, &VirtualDesktopInfo::Private::desktopNamesChanged, | ||||
414 | this, &VirtualDesktopInfo::desktopNamesChanged); | ||||
415 | connect(d, &VirtualDesktopInfo::Private::desktopLayoutRowsChanged, | ||||
416 | this, &VirtualDesktopInfo::desktopLayoutRowsChanged); | ||||
417 | } | ||||
418 | | ||||
419 | VirtualDesktopInfo::~VirtualDesktopInfo() | ||||
420 | { | ||||
421 | --d->refCount; | ||||
422 | | ||||
423 | if (!d->refCount) { | ||||
424 | delete d; | ||||
425 | d = nullptr; | ||||
426 | } | ||||
427 | } | ||||
428 | | ||||
429 | QVariant VirtualDesktopInfo::currentDesktop() const | ||||
430 | { | ||||
431 | return d->currentDesktop(); | ||||
432 | } | ||||
433 | | ||||
434 | int VirtualDesktopInfo::numberOfDesktops() const | ||||
435 | { | ||||
436 | return d->numberOfDesktops(); | ||||
437 | } | ||||
438 | | ||||
439 | QVariantList VirtualDesktopInfo::desktopIds() const | ||||
440 | { | ||||
441 | return d->desktopIds(); | ||||
442 | } | ||||
443 | | ||||
444 | QStringList VirtualDesktopInfo::desktopNames() const | ||||
445 | { | ||||
446 | return d->desktopNames(); | ||||
447 | } | ||||
448 | | ||||
449 | quint32 VirtualDesktopInfo::position(const QVariant &desktop) const | ||||
450 | { | ||||
451 | return d->position(desktop); | ||||
452 | } | ||||
453 | | ||||
454 | int VirtualDesktopInfo::desktopLayoutRows() const | ||||
455 | { | ||||
456 | return d->desktopLayoutRows(); | ||||
457 | } | ||||
458 | | ||||
459 | void VirtualDesktopInfo::requestActivate(const QVariant &desktop) | ||||
460 | { | ||||
461 | d->requestActivate(desktop); | ||||
462 | } | ||||
463 | | ||||
464 | void VirtualDesktopInfo::requestCreateDesktop(quint32 position) | ||||
465 | { | ||||
466 | return d->requestCreateDesktop(position); | ||||
467 | } | ||||
468 | | ||||
469 | void VirtualDesktopInfo::requestRemoveDesktop(quint32 position) | ||||
470 | { | ||||
471 | return d->requestRemoveDesktop(position); | ||||
472 | } | ||||
473 | | ||||
474 | } | ||||
475 | | ||||
476 | #include "virtualdesktopinfo.moc" |
ids.reserve(KWindowSystem::numberOfDesktops());