D16704: [wayland] add enter/leave virtual desktop API

David Edmundson <[email protected]>
Newsgroups gmane.comp.kde.devel.kwin
Message-ID <[email protected]>
davidedmundson added inline comments.

INLINE COMMENTS

> zzag wrote in abstract_client.cpp:575
> Noob question: What would happen if the client is already on all desktops and you call enterDesktop for the first desktop?

that works fine

> zzag wrote in abstract_client.cpp:588
> Noob question: Same here, what would happen if the client is already on all desktops?

It currently does nothing. 
Probably it should end up on everything but this one, especially as we have the non-atomic moves in the effects API.

> zzag wrote in effects.cpp:921
> If we pass Deleted, then we don't have to do anything. Also, why not qobject_cast?
> 
> Coding style nitpick:
> 
>   auto client = qobject_cast<AbstractClient *>(static_cast<EffectWindowImpl *>(w)->window());
>   if (!client) {
>       return;
>   }
>   
>   VirtualDesktop *desktop = VirtualDesktopManager::self()->desktopForX11Id(desktop);
>   if (!desktop) {
>       return;
>   }
>   
>   client->enterDesktop(desktop);

> Why not qobject_cast?

Just consistency with the existing code

> zzag wrote in kwineffects.h:946
> What's the difference between windowToDesktop and addWindowToDesktop? Deprecate it?

move rather than adding.

So it's more akin to 
addWindowToDesktop(new) + removeWindowFromDesktop(old)

so it's not entirely useless API.

REPOSITORY
  R108 KWin

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

To: davidedmundson, #kwin
Cc: zzag, anthonyfieroni, kwin, mkulinski, ragreen, jackyalcine, Pitel, iodelay, bwowk, ZrenBot, ngraham, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.