D26609: [kstyle] Port to KWindowSystem shadows API

David Edmundson noreply at phabricator.kde.org
Wed Jan 15 16:42:25 GMT 2020


davidedmundson added inline comments.

INLINE COMMENTS

> oxygenshadowhelper.cpp:291
>          #if OXYGEN_HAVE_KWAYLAND
> -        if( widget->windowHandle()->parent() ) return false;
> -        if( !_shadowManager || !_shmPool ) return false;
> -
> -        const bool isDockWidget( this->isDockWidget( widget ) || this->isToolBar( widget ) );
> -        const TileSet &tiles = isDockWidget ? _dockTiles : _tiles;
> -
> -        if( !tiles.isValid() ) return false;
> -
> -        // create shadow
> -        using namespace KWayland::Client;
> -        auto s = Surface::fromWindow( widget->windowHandle() );
> -        if( !s ) return false;
> -
> -        auto shadow = _shadowManager->createShadow( s, widget );
> -        if( !shadow->isValid() ) return false;
> -
> -        // add the shadow elements
> -        shadow->attachTop( _shmPool->createBuffer( tiles.pixmap( 1 ).toImage() ) );
> -        shadow->attachTopRight( _shmPool->createBuffer( tiles.pixmap( 2 ).toImage() ) );
> -        shadow->attachRight( _shmPool->createBuffer( tiles.pixmap( 5 ).toImage() ) );
> -        shadow->attachBottomRight( _shmPool->createBuffer( tiles.pixmap( 8 ).toImage() ) );
> -        shadow->attachBottom( _shmPool->createBuffer( tiles.pixmap( 7 ).toImage() ) );
> -        shadow->attachBottomLeft( _shmPool->createBuffer( tiles.pixmap( 6 ).toImage() ) );
> -        shadow->attachLeft( _shmPool->createBuffer( tiles.pixmap( 3 ).toImage() ) );
> -        shadow->attachTopLeft( _shmPool->createBuffer( tiles.pixmap( 0 ).toImage() ) );
> -
> -        shadow->setOffsets( shadowMargins( widget ) );
> -        shadow->commit();
> -        s->commit( Surface::CommitFlag::None );
> -
> -        return true;
> -        #else
> -        Q_UNUSED( widget );
> +        if( widget->windowHandle()->parent() ) return;
>          #endif

I don't understand what this line is trying to do

REPOSITORY
  R113 Oxygen Theme

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

To: zzag, #kwin, #plasma
Cc: davidedmundson, plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, zachus, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20200115/0205dc83/attachment.html>


More information about the Plasma-devel mailing list