An ltk app pastes what other applications copied, the middle button pastes the selection just made, a browser desktop's applications share the clipboard and the primary selection, and the office icons are drawn like the terminal's
Pasting from other applications. Neither Ctrl+V nor the middle button pasted into an ltk app anything copied in another application; only what was copied within the same process pasted. The Wayland backend bound its `wl_data_device` and its primary-selection device in `SeatHandler::new_seat`, which smithay-client-toolkit calls only for seats announced after start-up: `SeatState::new` binds the seats already in the registry without calling it, and on every compositor the seat is there when the app connects. The app therefore never had either device, the compositor never offered it another client's selection, and what it copied did not reach other applications through the compositor either. A Wayland trace of prompt shows both managers bound and neither `get_data_device` nor `get_device` sent. Both devices are now bound in `new_capability`, which comes for every seat, the first time it does; `new_seat` does nothing. The middle button and a selection just made. A compositor offers the primary selection to the window it gives the keyboard, and gives it on the press, so a middle click on a window that did not have the keyboard arrives together with the offer. ltk reads an offer on a thread of its own and pasted at once what it held, so after selecting in another application an ltk app pasted the selection before that. `Platform::primary_selection_pending` says whether another application's selection is still being read: the Wayland backend counts the reader threads it starts and the selections that arrive (`PrimarySelection::pending`), and the other backends answer `false`. A middle-button paste, into the text field under the pointer (`PrimaryPaste::Field`) or for an app that asked with `SelectionKind::Primary` (`PrimaryPaste::App`), goes through `AppData::paste_primary`, which while a read is pending keeps it in `pending_primary_paste`; `check_primary_paste`, run before every draw, makes it once the selection has arrived or after 500 ms with what there is, and `next_primary_paste_wakeup` wakes the loop every 10 ms meanwhile, since the reading thread does not. A field paste is made only if the field still has the focus. The clipboard and the primary selection in a browser desktop. On a page with forge/web, what an app copies goes to forge/web as a `set_selection` request as well as to the browser's clipboard, and the selection the middle button pastes, which did nothing in a browser, as `set_primary_selection` (`Connection::set_selection`). forge/web's `selection` and `primary_selection` events, which every client hears when one sets them and each hears on connecting, become `PageEvent::Selection` and so `AppData::clipboard` and `AppData::primary_selection`, as another client's selection does on Wayland. Copying, and selecting and pasting with the middle button, thus work between the page's applications whether or not the browser lets a page write its clipboard. A `paste` from the browser still brings what other applications of the computer copied; a browser has no primary selection a page can reach. The office icons. The default theme's word processor, spreadsheet and presentation icons came from Figma with a `foreignObject` backdrop blur that resvg ignores, and showed as flat white discs with pale glyphs. They are drawn again as the terminal's are: a dark gradient disc in each one's colour (blue, green, orange), a bright glyph and the terminal's filter. The doc comment of `ltk::files` links `write()` as a function, since `write` alone was ambiguous with the macro for rustdoc. `CHANGELOG.md` describes the changes.
This commit is contained in:
@@ -1,133 +1,56 @@
|
||||
<svg width="72" height="72" viewBox="0 0 72 72" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="72" height="72" rx="36" fill="url(#paint0_linear_4282_679)"/>
|
||||
<foreignObject x="-25.3956" y="-28.5686" width="122.791" height="130"><div xmlns="http://www.w3.org/1999/xhtml" style="backdrop-filter:blur(22.5px);clip-path:url(#bgblur_0_4282_679_clip_path);height:100%;width:100%"></div></foreignObject><g filter="url(#filter0_diiii_4282_679)" data-figma-bg-blur-radius="45">
|
||||
<path d="M19.6044 18.4314C19.6044 17.3268 20.4998 16.4314 21.6044 16.4314H43.8179L46.7888 19.215L52.3956 24.7448V54.4314C52.3956 55.536 51.5002 56.4314 50.3956 56.4314H21.6044C20.4998 56.4314 19.6044 55.536 19.6044 54.4314V18.4314Z" fill="#1E8FD9"/>
|
||||
<path d="M21.6044 16.6814H43.7196L46.6132 19.3923V19.3933L52.1454 24.8494V54.4314C52.1454 55.3979 51.3619 56.1814 50.3954 56.1814H21.6044C20.6379 56.1814 19.8544 55.3979 19.8544 54.4314V18.4314C19.8544 17.4649 20.6379 16.6814 21.6044 16.6814Z" stroke="url(#paint1_linear_4282_679)" stroke-width="0.5"/>
|
||||
</g>
|
||||
<foreignObject x="-14.1873" y="-12.2935" width="99.268" height="96.7986"><div xmlns="http://www.w3.org/1999/xhtml" style="backdrop-filter:blur(22.5px);clip-path:url(#bgblur_1_4282_679_clip_path);height:100%;width:100%"></div></foreignObject><g filter="url(#filter1_diiii_4282_679)" data-figma-bg-blur-radius="45">
|
||||
<path d="M32.6551 39.4314V34.0147H34.3686V39.4314H32.6551ZM30.8127 34.1989V32.7065H36.211V34.1989H30.8127ZM39.3898 39.5051C38.8371 39.5051 38.3949 39.4375 38.0633 39.3024C37.7378 39.1673 37.5013 38.9432 37.3539 38.6299C37.2065 38.3167 37.1328 37.893 37.1328 37.3587L37.142 33.0198H38.6897L38.6805 37.4047C38.6805 37.632 38.7388 37.807 38.8555 37.9298C38.9783 38.0465 39.1534 38.1049 39.3806 38.1049H40.0807V39.5051H39.3898ZM36.3959 35.5623V34.3463H40.0807V35.5623H36.3959Z" fill="white"/>
|
||||
</g>
|
||||
<foreignObject x="-1.10876" y="-28.5664" width="98.4813" height="98.2194"><div xmlns="http://www.w3.org/1999/xhtml" style="backdrop-filter:blur(22.5px);clip-path:url(#bgblur_2_4282_679_clip_path);height:100%;width:100%"></div></foreignObject><g filter="url(#filter2_diiii_4282_679)" data-figma-bg-blur-radius="45">
|
||||
<path d="M45.8912 24.6529H52.3725L43.8912 16.4336V22.6529C43.8912 23.7575 44.7867 24.6529 45.8912 24.6529Z" fill="white"/>
|
||||
<path d="M51.7565 24.4033H45.8912C44.9249 24.4033 44.1415 23.6196 44.1412 22.6533V17.0234L51.7565 24.4033Z" stroke="url(#paint2_linear_4282_679)" stroke-width="0.5"/>
|
||||
<rect width="72" height="72" rx="36" fill="url(#paint0_wordprocessor)"/>
|
||||
<g filter="url(#filter0_diiii_wordprocessor)">
|
||||
<path d="M23 14H42L52 24V55C52 56.6569 50.6569 58 49 58H23C21.3431 58 20 56.6569 20 55V17C20 15.3431 21.3431 14 23 14Z" fill="#3DB2FF" stroke="url(#paint1_wordprocessor)" stroke-width="0.3"/>
|
||||
</g>
|
||||
<path d="M42 14L52 24H45C43.3431 24 42 22.6569 42 21V14Z" fill="white" fill-opacity="0.55"/>
|
||||
<rect x="25" y="24" width="12" height="3" rx="1.5" fill="#0A1640"/>
|
||||
<rect x="25" y="31" width="22" height="3" rx="1.5" fill="#0A1640"/>
|
||||
<rect x="25" y="37" width="22" height="3" rx="1.5" fill="#0A1640"/>
|
||||
<rect x="25" y="43" width="22" height="3" rx="1.5" fill="#0A1640"/>
|
||||
<rect x="25" y="49" width="14" height="3" rx="1.5" fill="#0A1640"/>
|
||||
<defs>
|
||||
<filter id="filter0_diiii_4282_679" x="-25.3956" y="-28.5686" width="122.791" height="130" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
||||
<filter id="filter0_diiii_wordprocessor" x="-29" y="-22.9081" width="130" height="117.816" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
||||
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
||||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
||||
<feOffset/>
|
||||
<feGaussianBlur stdDeviation="4.5"/>
|
||||
<feComposite in2="hardAlpha" operator="out"/>
|
||||
<feColorMatrix type="matrix" values="0 0 0 0 0.129977 0 0 0 0 0.129977 0 0 0 0 0.129977 0 0 0 0.25 0"/>
|
||||
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_4282_679"/>
|
||||
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_4282_679" result="shape"/>
|
||||
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_wordprocessor"/>
|
||||
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_wordprocessor" result="shape"/>
|
||||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
||||
<feOffset dx="-3.6" dy="-3.6"/>
|
||||
<feGaussianBlur stdDeviation="6.75"/>
|
||||
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
|
||||
<feColorMatrix type="matrix" values="0 0 0 0 0.333333 0 0 0 0 0.333333 0 0 0 0 0.333333 0 0 0 1 0"/>
|
||||
<feBlend mode="plus-lighter" in2="shape" result="effect2_innerShadow_4282_679"/>
|
||||
<feBlend mode="plus-lighter" in2="shape" result="effect2_innerShadow_wordprocessor"/>
|
||||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
||||
<feOffset dx="1.8" dy="1.8"/>
|
||||
<feGaussianBlur stdDeviation="0.9"/>
|
||||
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
|
||||
<feColorMatrix type="matrix" values="0 0 0 0 0.333333 0 0 0 0 0.333333 0 0 0 0 0.333333 0 0 0 1 0"/>
|
||||
<feBlend mode="plus-lighter" in2="effect2_innerShadow_4282_679" result="effect3_innerShadow_4282_679"/>
|
||||
<feBlend mode="plus-lighter" in2="effect2_innerShadow_wordprocessor" result="effect3_innerShadow_wordprocessor"/>
|
||||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
||||
<feOffset dx="0.45" dy="0.45"/>
|
||||
<feGaussianBlur stdDeviation="0.45"/>
|
||||
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
|
||||
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0"/>
|
||||
<feBlend mode="overlay" in2="effect3_innerShadow_4282_679" result="effect4_innerShadow_4282_679"/>
|
||||
<feBlend mode="overlay" in2="effect3_innerShadow_wordprocessor" result="effect4_innerShadow_wordprocessor"/>
|
||||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
||||
<feOffset dx="1.8" dy="1.8"/>
|
||||
<feGaussianBlur stdDeviation="3.6"/>
|
||||
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
|
||||
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.15 0"/>
|
||||
<feBlend mode="normal" in2="effect4_innerShadow_4282_679" result="effect5_innerShadow_4282_679"/>
|
||||
<feBlend mode="normal" in2="effect4_innerShadow_wordprocessor" result="effect5_innerShadow_wordprocessor"/>
|
||||
</filter>
|
||||
<clipPath id="bgblur_0_4282_679_clip_path" transform="translate(25.3956 28.5686)"><path d="M19.6044 18.4314C19.6044 17.3268 20.4998 16.4314 21.6044 16.4314H43.8179L46.7888 19.215L52.3956 24.7448V54.4314C52.3956 55.536 51.5002 56.4314 50.3956 56.4314H21.6044C20.4998 56.4314 19.6044 55.536 19.6044 54.4314V18.4314Z"/>
|
||||
</clipPath><filter id="filter1_diiii_4282_679" x="-14.1873" y="-12.2935" width="99.268" height="96.7986" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
||||
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
||||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
||||
<feOffset/>
|
||||
<feGaussianBlur stdDeviation="4.5"/>
|
||||
<feComposite in2="hardAlpha" operator="out"/>
|
||||
<feColorMatrix type="matrix" values="0 0 0 0 0.129977 0 0 0 0 0.129977 0 0 0 0 0.129977 0 0 0 0.25 0"/>
|
||||
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_4282_679"/>
|
||||
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_4282_679" result="shape"/>
|
||||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
||||
<feOffset dx="-3.6" dy="-3.6"/>
|
||||
<feGaussianBlur stdDeviation="6.75"/>
|
||||
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
|
||||
<feColorMatrix type="matrix" values="0 0 0 0 0.333333 0 0 0 0 0.333333 0 0 0 0 0.333333 0 0 0 1 0"/>
|
||||
<feBlend mode="plus-lighter" in2="shape" result="effect2_innerShadow_4282_679"/>
|
||||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
||||
<feOffset dx="1.8" dy="1.8"/>
|
||||
<feGaussianBlur stdDeviation="0.9"/>
|
||||
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
|
||||
<feColorMatrix type="matrix" values="0 0 0 0 0.333333 0 0 0 0 0.333333 0 0 0 0 0.333333 0 0 0 1 0"/>
|
||||
<feBlend mode="plus-lighter" in2="effect2_innerShadow_4282_679" result="effect3_innerShadow_4282_679"/>
|
||||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
||||
<feOffset dx="0.45" dy="0.45"/>
|
||||
<feGaussianBlur stdDeviation="0.45"/>
|
||||
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
|
||||
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0"/>
|
||||
<feBlend mode="overlay" in2="effect3_innerShadow_4282_679" result="effect4_innerShadow_4282_679"/>
|
||||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
||||
<feOffset dx="1.8" dy="1.8"/>
|
||||
<feGaussianBlur stdDeviation="3.6"/>
|
||||
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
|
||||
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.15 0"/>
|
||||
<feBlend mode="normal" in2="effect4_innerShadow_4282_679" result="effect5_innerShadow_4282_679"/>
|
||||
</filter>
|
||||
<clipPath id="bgblur_1_4282_679_clip_path" transform="translate(14.1873 12.2935)"><path d="M32.6551 39.4314V34.0147H34.3686V39.4314H32.6551ZM30.8127 34.1989V32.7065H36.211V34.1989H30.8127ZM39.3898 39.5051C38.8371 39.5051 38.3949 39.4375 38.0633 39.3024C37.7378 39.1673 37.5013 38.9432 37.3539 38.6299C37.2065 38.3167 37.1328 37.893 37.1328 37.3587L37.142 33.0198H38.6897L38.6805 37.4047C38.6805 37.632 38.7388 37.807 38.8555 37.9298C38.9783 38.0465 39.1534 38.1049 39.3806 38.1049H40.0807V39.5051H39.3898ZM36.3959 35.5623V34.3463H40.0807V35.5623H36.3959Z"/>
|
||||
</clipPath><filter id="filter2_diiii_4282_679" x="-1.10876" y="-28.5664" width="98.4813" height="98.2194" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
||||
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
||||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
||||
<feOffset/>
|
||||
<feGaussianBlur stdDeviation="4.5"/>
|
||||
<feComposite in2="hardAlpha" operator="out"/>
|
||||
<feColorMatrix type="matrix" values="0 0 0 0 0.129977 0 0 0 0 0.129977 0 0 0 0 0.129977 0 0 0 0.25 0"/>
|
||||
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_4282_679"/>
|
||||
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_4282_679" result="shape"/>
|
||||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
||||
<feOffset dx="-3.6" dy="-3.6"/>
|
||||
<feGaussianBlur stdDeviation="6.75"/>
|
||||
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
|
||||
<feColorMatrix type="matrix" values="0 0 0 0 0.333333 0 0 0 0 0.333333 0 0 0 0 0.333333 0 0 0 1 0"/>
|
||||
<feBlend mode="plus-lighter" in2="shape" result="effect2_innerShadow_4282_679"/>
|
||||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
||||
<feOffset dx="1.8" dy="1.8"/>
|
||||
<feGaussianBlur stdDeviation="0.9"/>
|
||||
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
|
||||
<feColorMatrix type="matrix" values="0 0 0 0 0.333333 0 0 0 0 0.333333 0 0 0 0 0.333333 0 0 0 1 0"/>
|
||||
<feBlend mode="plus-lighter" in2="effect2_innerShadow_4282_679" result="effect3_innerShadow_4282_679"/>
|
||||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
||||
<feOffset dx="0.45" dy="0.45"/>
|
||||
<feGaussianBlur stdDeviation="0.45"/>
|
||||
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
|
||||
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0"/>
|
||||
<feBlend mode="overlay" in2="effect3_innerShadow_4282_679" result="effect4_innerShadow_4282_679"/>
|
||||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
||||
<feOffset dx="1.8" dy="1.8"/>
|
||||
<feGaussianBlur stdDeviation="3.6"/>
|
||||
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
|
||||
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.15 0"/>
|
||||
<feBlend mode="normal" in2="effect4_innerShadow_4282_679" result="effect5_innerShadow_4282_679"/>
|
||||
</filter>
|
||||
<clipPath id="bgblur_2_4282_679_clip_path" transform="translate(1.10876 28.5664)"><path d="M45.8912 24.6529H52.3725L43.8912 16.4336V22.6529C43.8912 23.7575 44.7867 24.6529 45.8912 24.6529Z"/>
|
||||
</clipPath><linearGradient id="paint0_linear_4282_679" x1="36" y1="0" x2="36" y2="72" gradientUnits="userSpaceOnUse">
|
||||
<linearGradient id="paint0_wordprocessor" x1="36" y1="0" x2="36" y2="72" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#1D5FA8"/>
|
||||
<stop offset="1" stop-color="#0A1640"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint1_wordprocessor" x1="36" y1="14" x2="36" y2="58" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="white"/>
|
||||
<stop offset="1" stop-color="#D1D1D1"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint1_linear_4282_679" x1="36" y1="16.4314" x2="36" y2="56.4314" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="white" stop-opacity="0"/>
|
||||
<stop offset="1" stop-color="white"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint2_linear_4282_679" x1="48.6577" y1="16.4336" x2="48.6577" y2="24.6531" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="white" stop-opacity="0"/>
|
||||
<stop offset="1" stop-color="white"/>
|
||||
<stop offset="1" stop-color="white" stop-opacity="0"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 3.7 KiB |
Reference in New Issue
Block a user