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,105 +1,54 @@
|
||||
<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_716)"/>
|
||||
<foreignObject x="-24.3586" y="-18.1622" width="125.458" height="114"><div xmlns="http://www.w3.org/1999/xhtml" style="backdrop-filter:blur(22.5px);clip-path:url(#bgblur_0_4282_716_clip_path);height:100%;width:100%"></div></foreignObject><g filter="url(#filter0_diiii_4282_716)" data-figma-bg-blur-radius="45">
|
||||
<path d="M20.6414 28.8378C20.6414 27.7332 21.5368 26.8378 22.6414 26.8378H46.8237H54.0989C55.2034 26.8378 56.0989 27.7332 56.0989 28.8378V31.8258V48.8378C56.0989 49.9423 55.2034 50.8378 54.0989 50.8378H22.6414C21.5368 50.8378 20.6414 49.9423 20.6414 48.8378V28.8378Z" fill="#FF8A00"/>
|
||||
<path d="M22.6414 27.0878H54.0994C55.0656 27.088 55.8494 27.8714 55.8494 28.8378V48.8378C55.8494 49.8041 55.0656 50.5875 54.0994 50.5878H22.6414C21.6749 50.5878 20.8914 49.8043 20.8914 48.8378V28.8378C20.8914 27.8713 21.6749 27.0878 22.6414 27.0878Z" stroke="url(#paint1_linear_4282_716)" stroke-width="0.5"/>
|
||||
<rect width="72" height="72" rx="36" fill="url(#paint0_slides)"/>
|
||||
<g filter="url(#filter0_diiii_slides)">
|
||||
<path d="M24 18H56C57.1046 18 58 18.8954 58 20V42C58 43.1046 57.1046 44 56 44H24C22.8954 44 22 43.1046 22 42V20C22 18.8954 22.8954 18 24 18Z" fill="#FFD9A0" stroke="url(#paint1_slides)" stroke-width="0.3"/>
|
||||
<path d="M16 26H48C49.1046 26 50 26.8954 50 28V50C50 51.1046 49.1046 52 48 52H16C14.8954 52 14 51.1046 14 50V28C14 26.8954 14.8954 26 16 26Z" fill="#FFA62B" stroke="url(#paint1_slides)" stroke-width="0.3"/>
|
||||
</g>
|
||||
<foreignObject x="-29.0989" y="-22.975" width="125.458" height="114"><div xmlns="http://www.w3.org/1999/xhtml" style="backdrop-filter:blur(22.5px);clip-path:url(#bgblur_1_4282_716_clip_path);height:100%;width:100%"></div></foreignObject><g filter="url(#filter1_diiii_4282_716)" data-figma-bg-blur-radius="45">
|
||||
<path d="M15.9011 24.025C15.9011 22.9205 16.7966 22.025 17.9011 22.025H42.0834H49.3586C50.4632 22.025 51.3586 22.9205 51.3586 24.025V27.0131V44.025C51.3586 45.1296 50.4632 46.025 49.3586 46.025H17.9011C16.7966 46.025 15.9011 45.1296 15.9011 44.025V24.025Z" fill="#FF8A00"/>
|
||||
<path d="M17.9011 22.275H49.3591C50.3254 22.2753 51.1091 23.0587 51.1091 24.025V44.025C51.1091 44.9914 50.3254 45.7748 49.3591 45.775H17.9011C16.9346 45.775 16.1511 44.9915 16.1511 44.025V24.025C16.1511 23.0585 16.9346 22.275 17.9011 22.275Z" stroke="url(#paint2_linear_4282_716)" stroke-width="0.5"/>
|
||||
</g>
|
||||
<rect opacity="0.9" x="19.8997" y="25.7567" width="11.0054" height="9.90234" rx="1" fill="url(#paint3_linear_4282_716)"/>
|
||||
<circle opacity="0.9" cx="37.8562" cy="30.7079" r="4.95117" fill="url(#paint4_linear_4282_716)"/>
|
||||
<rect x="19" y="32" width="10" height="10" rx="1.5" fill="#3A1404"/>
|
||||
<circle cx="39" cy="37" r="5.5" fill="#3A1404"/>
|
||||
<rect x="19" y="45" width="26" height="2.5" rx="1.25" fill="#3A1404"/>
|
||||
<defs>
|
||||
<filter id="filter0_diiii_4282_716" x="-24.3586" y="-18.1622" width="125.458" height="114" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
||||
<filter id="filter0_diiii_slides" 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_716"/>
|
||||
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_4282_716" result="shape"/>
|
||||
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_slides"/>
|
||||
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_slides" 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_716"/>
|
||||
<feBlend mode="plus-lighter" in2="shape" result="effect2_innerShadow_slides"/>
|
||||
<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_716" result="effect3_innerShadow_4282_716"/>
|
||||
<feBlend mode="plus-lighter" in2="effect2_innerShadow_slides" result="effect3_innerShadow_slides"/>
|
||||
<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_716" result="effect4_innerShadow_4282_716"/>
|
||||
<feBlend mode="overlay" in2="effect3_innerShadow_slides" result="effect4_innerShadow_slides"/>
|
||||
<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_716" result="effect5_innerShadow_4282_716"/>
|
||||
<feBlend mode="normal" in2="effect4_innerShadow_slides" result="effect5_innerShadow_slides"/>
|
||||
</filter>
|
||||
<clipPath id="bgblur_0_4282_716_clip_path" transform="translate(24.3586 18.1622)"><path d="M20.6414 28.8378C20.6414 27.7332 21.5368 26.8378 22.6414 26.8378H46.8237H54.0989C55.2034 26.8378 56.0989 27.7332 56.0989 28.8378V31.8258V48.8378C56.0989 49.9423 55.2034 50.8378 54.0989 50.8378H22.6414C21.5368 50.8378 20.6414 49.9423 20.6414 48.8378V28.8378Z"/>
|
||||
</clipPath><filter id="filter1_diiii_4282_716" x="-29.0989" y="-22.975" width="125.458" height="114" 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_716"/>
|
||||
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_4282_716" 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_716"/>
|
||||
<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_716" result="effect3_innerShadow_4282_716"/>
|
||||
<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_716" result="effect4_innerShadow_4282_716"/>
|
||||
<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_716" result="effect5_innerShadow_4282_716"/>
|
||||
</filter>
|
||||
<clipPath id="bgblur_1_4282_716_clip_path" transform="translate(29.0989 22.975)"><path d="M15.9011 24.025C15.9011 22.9205 16.7966 22.025 17.9011 22.025H42.0834H49.3586C50.4632 22.025 51.3586 22.9205 51.3586 24.025V27.0131V44.025C51.3586 45.1296 50.4632 46.025 49.3586 46.025H17.9011C16.7966 46.025 15.9011 45.1296 15.9011 44.025V24.025Z"/>
|
||||
</clipPath><linearGradient id="paint0_linear_4282_716" x1="36" y1="0" x2="36" y2="72" gradientUnits="userSpaceOnUse">
|
||||
<linearGradient id="paint0_slides" x1="36" y1="0" x2="36" y2="72" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#B35A12"/>
|
||||
<stop offset="1" stop-color="#3A1404"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint1_slides" x1="36" y1="18" x2="36" y2="52" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="white"/>
|
||||
<stop offset="1" stop-color="#D1D1D1"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint1_linear_4282_716" x1="38.3701" y1="26.8378" x2="38.3701" y2="50.8378" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="white" stop-opacity="0"/>
|
||||
<stop offset="1" stop-color="white"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint2_linear_4282_716" x1="33.6299" y1="22.025" x2="33.6299" y2="46.025" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="white" stop-opacity="0"/>
|
||||
<stop offset="1" stop-color="white"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint3_linear_4282_716" x1="25.4023" y1="25.7567" x2="25.4023" y2="35.6591" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="white"/>
|
||||
<stop offset="1" stop-color="white" stop-opacity="0.5"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint4_linear_4282_716" x1="37.8562" y1="25.7567" x2="37.8562" y2="35.6591" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="white"/>
|
||||
<stop offset="1" stop-color="white" stop-opacity="0.5"/>
|
||||
<stop offset="1" stop-color="white" stop-opacity="0"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 3.6 KiB |
Reference in New Issue
Block a user