D29786: Scripting: Provides methods to create and remove virtual desktops

Vlad Zahorodnii <[email protected]> Tue, 19 May 2020 10:02:19 +0000
Newsgroups gmane.comp.kde.devel.kwin
Message-ID <[email protected]>
zzag added inline comments.

INLINE COMMENTS

> tcorreabr wrote in workspace_wrapper.h:260
> I don't know why but the client.desktop property is not zero based, at least on X11. So in a situation with 2 desktops, the new desktop can be inserted at position 1, 2 or 3.

> I don't know why but the client.desktop property is not zero based

It's not zero-based because of the goddamn X11...

> So in a situation with 2 desktops, the new desktop can be inserted at position 1, 2 or 3.

In order to match what input values VirtualDesktopManager::createVirtualDesktop() expects, I think it's better to keep the position in range [0, count]. We could make client.desktop zero-based in plasma 6.

It's also worth to point out that the client.desktop property is deprecated since a window can be on more than just one virtual desktop.

REPOSITORY
  R108 KWin

REVISION DETAIL
  https://phabricator.kde.org/D29786

To: tcorreabr, #kwin
Cc: zzag, kwin, Orage, cacarry, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, mkulinski, ragreen, jackyalcine, iodelay, crozbo, bwowk, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, hardening, romangg, jensreuterberg, abetts, sebas, apol, ahiemstra, mart