Bug 397444

Summary: Image Copy to Clipboard does not work on Wayland
Product: [Applications] okular Reporter: avin3sh
Component: generalAssignee: Okular developers <okular-devel>
Status: REPORTED ---    
Severity: normal CC: aacid, anakin.cs, kde, putr4.s
Priority: NOR    
Version First Reported In: 1.4.2   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description avin3sh 2018-08-14 12:20:52 UTC
In context menu, Okular provides two "Copy to Clipboard" option, one preceded with "file" icon and one with "picture" icon.

Copy to Clipboard for text works but Copy to Clipboard for image does not work. This happens only when using Wayland.
Comment 1 Albert Astals Cid 2018-08-14 12:51:43 UTC
I don't see how this can be an Okular problem.

The only thing we do is

                    QClipboard *cb = QApplication::clipboard();
                    cb->setPixmap( pixmap, QClipboard::Clipboard );

So if it does not work in Wayland that's either a problem in Qt or in whicever wayland server/platform/something that you are using.

Are you using KWin? Which version? And which version of Qt?
Comment 2 avin3sh 2018-08-14 13:02:45 UTC
(In reply to Albert Astals Cid from comment #1)
> I don't see how this can be an Okular problem.
> 
> The only thing we do is
> 
>                     QClipboard *cb = QApplication::clipboard();
>                     cb->setPixmap( pixmap, QClipboard::Clipboard );
> 
> So if it does not work in Wayland that's either a problem in Qt or in
> whicever wayland server/platform/something that you are using.
> 
> Are you using KWin? Which version? And which version of Qt?

I apologize if its upstream issue. I did not know the right place to submit it.

I am using KDE Neon and have made no changes in source. The kwin version is 5.13.4 and Qt 5.11.1
Comment 3 Albert Astals Cid 2018-08-14 13:24:37 UTC
ok, tx, i'll try to figure out who's at fault.