BlueGit

ict rusty-teams

fix(calls): call, mini and gallery windows show up in screenshots again

- Only the share bar and share border use WDA_EXCLUDEFROMCAPTURE, like Teams
- The call window no longer drops out of captures during a screen share, so Snipping Tool sees it
- GUARDRAILS "Call windows" names the rule

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

metis Daniel Däschle · pushed by metis

Authored 2026-11-12 · 2 weeks ago

Hash
f441fa0c981ed5af49127a935a63221adff745a9
Parent
9739f09f
5 files changed +31 −67
GUARDRAILS.md +1 −1
@@ -24,7 +24,7 @@ Rules for every change, by people and by agents. If a rule here and a habit else
24 24 | Local bugs | Fix Teams bugs that are purely local (rendering, scroll, focus). Anything touching server data or other people stays as Teams does it. |
25 25 | Performance | Faster, less memory, offline reading from the cache. |
26 26 | Platform | OS-native toasts, tray, title bar and sounds. |
27 | Call windows | Like Teams (Daniel 2026-11-11, replaces the 2026-10-17 deviation): a call or meeting opens in its own window, the main window stays free for chats; a window share minimizes the call window like Teams. Layout and gallery behaviour match Teams. |
27 | Call windows | Like Teams (Daniel 2026-11-11, replaces the 2026-10-17 deviation): a call or meeting opens in its own window, the main window stays free for chats; a window share minimizes the call window like Teams. Layout and gallery behaviour match Teams. Only the share bar and the share border stay out of captures; call, mini and gallery windows show up in screenshots like in Teams (Daniel 2026-11-12). |
28 28 | Own features | MCP, agents, session inbox: allowed when nobody else can tell. Nothing sent automatically unless the user turned review off (Settings > MCP) or granted a time window; no own message formats. |
29 29 | Own settings | Settings Teams does not know stay in the local DB, never in Teams account properties. |
30 30
@@ -24,7 +24,7 @@ Rules for every change, by people and by agents. If a rule here and a habit else
24| Local bugs | Fix Teams bugs that are purely local (rendering, scroll, focus). Anything touching server data or other people stays as Teams does it. |
24| Local bugs | Fix Teams bugs that are purely local (rendering, scroll, focus). Anything touching server data or other people stays as Teams does it. |
25| Performance | Faster, less memory, offline reading from the cache. |
25| Performance | Faster, less memory, offline reading from the cache. |
26| Platform | OS-native toasts, tray, title bar and sounds. |
26| Platform | OS-native toasts, tray, title bar and sounds. |
27| Call windows | Like Teams (Daniel 2026-11-11, replaces the 2026-10-17 deviation): a call or meeting opens in its own window, the main window stays free for chats; a window share minimizes the call window like Teams. Layout and gallery behaviour match Teams. |
27| Call windows | Like Teams (Daniel 2026-11-11, replaces the 2026-10-17 deviation): a call or meeting opens in its own window, the main window stays free for chats; a window share minimizes the call window like Teams. Layout and gallery behaviour match Teams. Only the share bar and the share border stay out of captures; call, mini and gallery windows show up in screenshots like in Teams (Daniel 2026-11-12). |
28| Own features | MCP, agents, session inbox: allowed when nobody else can tell. Nothing sent automatically unless the user turned review off (Settings > MCP) or granted a time window; no own message formats. |
28| Own features | MCP, agents, session inbox: allowed when nobody else can tell. Nothing sent automatically unless the user turned review off (Settings > MCP) or granted a time window; no own message formats. |
29| Own settings | Settings Teams does not know stay in the local DB, never in Teams account properties. |
29| Own settings | Settings Teams does not know stay in the local DB, never in Teams account properties. |
30
30
crates/app-base/src/notify/platform/stub.rs +0 −2
@@ -34,8 +34,6 @@ pub fn show_window_inactive(_handle: NativeHandle) {}
34 34
35 35 pub fn exclude_from_capture(_handle: NativeHandle) {}
36 36
37 pub fn include_in_capture(_handle: NativeHandle) {}
38
39 37 #[cfg(target_os = "linux")]
40 38 pub fn make_window_click_through(window: &Window) {
41 39 super::x11_input::make_input_transparent(window);
@@ -34,8 +34,6 @@ pub fn show_window_inactive(_handle: NativeHandle) {}
34
34
35pub fn exclude_from_capture(_handle: NativeHandle) {}
35pub fn exclude_from_capture(_handle: NativeHandle) {}
36
36
37pub fn include_in_capture(_handle: NativeHandle) {}
38
39#[cfg(target_os = "linux")]
37#[cfg(target_os = "linux")]
40pub fn make_window_click_through(window: &Window) {
38pub fn make_window_click_through(window: &Window) {
41 super::x11_input::make_input_transparent(window);
39 super::x11_input::make_input_transparent(window);
crates/app-base/src/notify/platform/windows_impl.rs +1 −7
@@ -36,7 +36,7 @@ use windows::Win32::UI::WindowsAndMessaging::{
36 36 SW_SHOWNOACTIVATE, SWP_FRAMECHANGED, SWP_NOACTIVATE, SWP_NOMOVE, SWP_NOOWNERZORDER, SWP_NOSIZE,
37 37 SWP_NOZORDER, SYSTEM_PARAMETERS_INFO_UPDATE_FLAGS, SendMessageW, SetForegroundWindow,
38 38 SetLayeredWindowAttributes, SetWindowDisplayAffinity, SetWindowLongPtrW, SetWindowPos,
39 ShowWindow, SystemParametersInfoW, WDA_EXCLUDEFROMCAPTURE, WDA_NONE, WM_SETICON, WS_CAPTION,
39 ShowWindow, SystemParametersInfoW, WDA_EXCLUDEFROMCAPTURE, WM_SETICON, WS_CAPTION,
40 40 WS_EX_LAYERED, WS_EX_NOACTIVATE, WS_EX_TOPMOST, WS_EX_TRANSPARENT, WS_POPUP, WS_THICKFRAME,
41 41 };
42 42 use windows::core::{BOOL, PCWSTR, w};
@@ -274,12 +274,6 @@ pub fn exclude_from_capture(handle: NativeHandle) {
274 274 }
275 275 }
276 276
277 pub fn include_in_capture(handle: NativeHandle) {
278 unsafe {
279 let _ = SetWindowDisplayAffinity(hwnd(handle), WDA_NONE);
280 }
281 }
282
283 277 pub fn make_window_click_through(window: &Window) {
284 278 if let Some(handle) = native_handle(window) {
285 279 make_click_through(handle);
@@ -36,7 +36,7 @@ use windows::Win32::UI::WindowsAndMessaging::{
36 SW_SHOWNOACTIVATE, SWP_FRAMECHANGED, SWP_NOACTIVATE, SWP_NOMOVE, SWP_NOOWNERZORDER, SWP_NOSIZE,
36 SW_SHOWNOACTIVATE, SWP_FRAMECHANGED, SWP_NOACTIVATE, SWP_NOMOVE, SWP_NOOWNERZORDER, SWP_NOSIZE,
37 SWP_NOZORDER, SYSTEM_PARAMETERS_INFO_UPDATE_FLAGS, SendMessageW, SetForegroundWindow,
37 SWP_NOZORDER, SYSTEM_PARAMETERS_INFO_UPDATE_FLAGS, SendMessageW, SetForegroundWindow,
38 SetLayeredWindowAttributes, SetWindowDisplayAffinity, SetWindowLongPtrW, SetWindowPos,
38 SetLayeredWindowAttributes, SetWindowDisplayAffinity, SetWindowLongPtrW, SetWindowPos,
39 ShowWindow, SystemParametersInfoW, WDA_EXCLUDEFROMCAPTURE, WDA_NONE, WM_SETICON, WS_CAPTION,
39 ShowWindow, SystemParametersInfoW, WDA_EXCLUDEFROMCAPTURE, WM_SETICON, WS_CAPTION,
40 WS_EX_LAYERED, WS_EX_NOACTIVATE, WS_EX_TOPMOST, WS_EX_TRANSPARENT, WS_POPUP, WS_THICKFRAME,
40 WS_EX_LAYERED, WS_EX_NOACTIVATE, WS_EX_TOPMOST, WS_EX_TRANSPARENT, WS_POPUP, WS_THICKFRAME,
41};
41};
42use windows::core::{BOOL, PCWSTR, w};
42use windows::core::{BOOL, PCWSTR, w};
@@ -274,12 +274,6 @@ pub fn exclude_from_capture(handle: NativeHandle) {
274 }
274 }
275}
275}
276
276
277pub fn include_in_capture(handle: NativeHandle) {
278 unsafe {
279 let _ = SetWindowDisplayAffinity(hwnd(handle), WDA_NONE);
280 }
281}
282
283pub fn make_window_click_through(window: &Window) {
277pub fn make_window_click_through(window: &Window) {
284 if let Some(handle) = native_handle(window) {
278 if let Some(handle) = native_handle(window) {
285 make_click_through(handle);
279 make_click_through(handle);
crates/app-state/src/call/share_overlay.rs +15 −35
@@ -41,7 +41,6 @@ pub enum Monitor {
41 41
42 42 #[derive(Debug, Clone, Copy, PartialEq, Eq)]
43 43 pub enum Surface {
44 Main,
45 44 ShareBar,
46 45 Border,
47 46 Mini,
@@ -52,7 +51,6 @@ pub enum Surface {
52 51 pub struct OverlayPlan {
53 52 pub monitor: Monitor,
54 53 pub share_bar: bool,
55 pub exclude_main: bool,
56 54 }
57 55
58 56 pub fn overlay_plan(
@@ -70,15 +68,11 @@ pub fn overlay_plan(
70 68 OverlayPlan {
71 69 monitor,
72 70 share_bar: in_call && share != LocalShare::None,
73 exclude_main: excluded_from_capture(Surface::Main, share),
74 71 }
75 72 }
76 73
77 pub fn excluded_from_capture(surface: Surface, share: LocalShare) -> bool {
78 match surface {
79 Surface::Main => share == LocalShare::Screen,
80 Surface::ShareBar | Surface::Border | Surface::Mini | Surface::Gallery => true,
81 }
74 pub fn excluded_from_capture(surface: Surface) -> bool {
75 matches!(surface, Surface::ShareBar | Surface::Border)
82 76 }
83 77
84 78 fn overlap_area(first: ScreenRect, second: ScreenRect) -> i64 {
@@ -217,21 +211,17 @@ mod tests {
217 211 use LocalShare::*;
218 212 use Monitor as M;
219 213 let rows = [
220 (None, false, M::None, false, false),
221 (None, true, M::Mini, false, false),
222 (Screen, false, M::None, true, true),
223 (Screen, true, M::Gallery, true, true),
224 (Window, false, M::None, true, false),
225 (Window, true, M::Gallery, true, false),
214 (None, false, M::None, false),
215 (None, true, M::Mini, false),
216 (Screen, false, M::None, true),
217 (Screen, true, M::Gallery, true),
218 (Window, false, M::None, true),
219 (Window, true, M::Gallery, true),
226 220 ];
227 for (share, minimized, monitor, share_bar, exclude_main) in rows {
221 for (share, minimized, monitor, share_bar) in rows {
228 222 assert_eq!(
229 223 overlay_plan(true, share, minimized, false),
230 OverlayPlan {
231 monitor,
232 share_bar,
233 exclude_main
234 },
224 OverlayPlan { monitor, share_bar },
235 225 "{share:?} minimized={minimized}"
236 226 );
237 227 }
@@ -241,7 +231,6 @@ mod tests {
241 231 fn speaker_only_swaps_the_gallery_for_the_mini_tile() {
242 232 let plan = overlay_plan(true, LocalShare::Screen, true, true);
243 233 assert_eq!(plan.monitor, Monitor::Mini);
244 assert!(plan.exclude_main);
245 234 assert_eq!(
246 235 overlay_plan(true, LocalShare::None, true, true).monitor,
247 236 Monitor::Mini
@@ -256,20 +245,11 @@ mod tests {
256 245 }
257 246
258 247 #[test]
259 fn overlays_are_always_excluded_and_main_only_for_a_screen() {
260 for share in [LocalShare::None, LocalShare::Screen, LocalShare::Window] {
261 for surface in [
262 Surface::ShareBar,
263 Surface::Border,
264 Surface::Mini,
265 Surface::Gallery,
266 ] {
267 assert!(excluded_from_capture(surface, share));
268 }
269 }
270 assert!(excluded_from_capture(Surface::Main, LocalShare::Screen));
271 assert!(!excluded_from_capture(Surface::Main, LocalShare::Window));
272 assert!(!excluded_from_capture(Surface::Main, LocalShare::None));
248 fn only_the_share_chrome_stays_out_of_screenshots() {
249 assert!(excluded_from_capture(Surface::ShareBar));
250 assert!(excluded_from_capture(Surface::Border));
251 assert!(!excluded_from_capture(Surface::Mini));
252 assert!(!excluded_from_capture(Surface::Gallery));
273 253 }
274 254
275 255 #[test]
@@ -41,7 +41,6 @@ pub enum Monitor {
41
41
42#[derive(Debug, Clone, Copy, PartialEq, Eq)]
42#[derive(Debug, Clone, Copy, PartialEq, Eq)]
43pub enum Surface {
43pub enum Surface {
44 Main,
45 ShareBar,
44 ShareBar,
46 Border,
45 Border,
47 Mini,
46 Mini,
@@ -52,7 +51,6 @@ pub enum Surface {
52pub struct OverlayPlan {
51pub struct OverlayPlan {
53 pub monitor: Monitor,
52 pub monitor: Monitor,
54 pub share_bar: bool,
53 pub share_bar: bool,
55 pub exclude_main: bool,
56}
54}
57
55
58pub fn overlay_plan(
56pub fn overlay_plan(
@@ -70,15 +68,11 @@ pub fn overlay_plan(
70 OverlayPlan {
68 OverlayPlan {
71 monitor,
69 monitor,
72 share_bar: in_call && share != LocalShare::None,
70 share_bar: in_call && share != LocalShare::None,
73 exclude_main: excluded_from_capture(Surface::Main, share),
74 }
71 }
75}
72}
76
73
77pub fn excluded_from_capture(surface: Surface, share: LocalShare) -> bool {
74pub fn excluded_from_capture(surface: Surface) -> bool {
78 match surface {
75 matches!(surface, Surface::ShareBar | Surface::Border)
79 Surface::Main => share == LocalShare::Screen,
80 Surface::ShareBar | Surface::Border | Surface::Mini | Surface::Gallery => true,
81 }
82}
76}
83
77
84fn overlap_area(first: ScreenRect, second: ScreenRect) -> i64 {
78fn overlap_area(first: ScreenRect, second: ScreenRect) -> i64 {
@@ -217,21 +211,17 @@ mod tests {
217 use LocalShare::*;
211 use LocalShare::*;
218 use Monitor as M;
212 use Monitor as M;
219 let rows = [
213 let rows = [
220 (None, false, M::None, false, false),
214 (None, false, M::None, false),
221 (None, true, M::Mini, false, false),
215 (None, true, M::Mini, false),
222 (Screen, false, M::None, true, true),
216 (Screen, false, M::None, true),
223 (Screen, true, M::Gallery, true, true),
217 (Screen, true, M::Gallery, true),
224 (Window, false, M::None, true, false),
218 (Window, false, M::None, true),
225 (Window, true, M::Gallery, true, false),
219 (Window, true, M::Gallery, true),
226 ];
220 ];
227 for (share, minimized, monitor, share_bar, exclude_main) in rows {
221 for (share, minimized, monitor, share_bar) in rows {
228 assert_eq!(
222 assert_eq!(
229 overlay_plan(true, share, minimized, false),
223 overlay_plan(true, share, minimized, false),
230 OverlayPlan {
224 OverlayPlan { monitor, share_bar },
231 monitor,
232 share_bar,
233 exclude_main
234 },
235 "{share:?} minimized={minimized}"
225 "{share:?} minimized={minimized}"
236 );
226 );
237 }
227 }
@@ -241,7 +231,6 @@ mod tests {
241 fn speaker_only_swaps_the_gallery_for_the_mini_tile() {
231 fn speaker_only_swaps_the_gallery_for_the_mini_tile() {
242 let plan = overlay_plan(true, LocalShare::Screen, true, true);
232 let plan = overlay_plan(true, LocalShare::Screen, true, true);
243 assert_eq!(plan.monitor, Monitor::Mini);
233 assert_eq!(plan.monitor, Monitor::Mini);
244 assert!(plan.exclude_main);
245 assert_eq!(
234 assert_eq!(
246 overlay_plan(true, LocalShare::None, true, true).monitor,
235 overlay_plan(true, LocalShare::None, true, true).monitor,
247 Monitor::Mini
236 Monitor::Mini
@@ -256,20 +245,11 @@ mod tests {
256 }
245 }
257
246
258 #[test]
247 #[test]
259 fn overlays_are_always_excluded_and_main_only_for_a_screen() {
248 fn only_the_share_chrome_stays_out_of_screenshots() {
260 for share in [LocalShare::None, LocalShare::Screen, LocalShare::Window] {
249 assert!(excluded_from_capture(Surface::ShareBar));
261 for surface in [
250 assert!(excluded_from_capture(Surface::Border));
262 Surface::ShareBar,
251 assert!(!excluded_from_capture(Surface::Mini));
263 Surface::Border,
252 assert!(!excluded_from_capture(Surface::Gallery));
264 Surface::Mini,
265 Surface::Gallery,
266 ] {
267 assert!(excluded_from_capture(surface, share));
268 }
269 }
270 assert!(excluded_from_capture(Surface::Main, LocalShare::Screen));
271 assert!(!excluded_from_capture(Surface::Main, LocalShare::Window));
272 assert!(!excluded_from_capture(Surface::Main, LocalShare::None));
273 }
253 }
274
254
275 #[test]
255 #[test]
crates/app/src/call/overlay.rs +14 −22
@@ -37,6 +37,17 @@ enum Role {
37 37 Border(usize),
38 38 }
39 39
40 impl Role {
41 fn surface(self) -> Surface {
42 match self {
43 Role::Bar => Surface::ShareBar,
44 Role::Mini => Surface::Mini,
45 Role::Gallery => Surface::Gallery,
46 Role::Border(_) => Surface::Border,
47 }
48 }
49 }
50
40 51 struct Placed {
41 52 handle: AnyWindowHandle,
42 53 native: Option<NativeHandle>,
@@ -114,7 +125,6 @@ pub struct CallWindows {
114 125 gallery_seen: Option<(i32, i32)>,
115 126 gallery_layout: GalleryLayout,
116 127 speaker_only: bool,
117 main_excluded: bool,
118 128 minimized_for_share: bool,
119 129 ticks: u32,
120 130 }
@@ -194,7 +204,6 @@ impl CallWindows {
194 204 gallery_seen: None,
195 205 gallery_layout: gallery_layout(0, true, f32::MAX),
196 206 speaker_only: false,
197 main_excluded: false,
198 207 minimized_for_share: false,
199 208 ticks: 0,
200 209 };
@@ -315,7 +324,6 @@ impl CallWindows {
315 324 self.stage_native = None;
316 325 self.minimized = false;
317 326 self.minimized_for_share = false;
318 self.main_excluded = false;
319 327 self.seen_viewing = None;
320 328 }
321 329
@@ -389,7 +397,6 @@ impl CallWindows {
389 397 && self.share.is_none()
390 398 && self.windows.is_empty()
391 399 && self.opening.is_empty()
392 && !self.main_excluded
393 400 }
394 401
395 402 fn tick(&mut self, cx: &mut Context<Self>) -> Duration {
@@ -402,7 +409,6 @@ impl CallWindows {
402 409 self.refresh_stage_window();
403 410 self.sync_viewing(cx);
404 411 self.sync_share(slow, cx);
405 self.sync_capture_exclusion();
406 412 self.sync_pop_out(cx);
407 413 self.sync_monitor(cx);
408 414 if slow {
@@ -543,22 +549,6 @@ impl CallWindows {
543 549 }
544 550 }
545 551
546 fn sync_capture_exclusion(&mut self) {
547 let Some(native) = self.stage_native else {
548 return;
549 };
550 let wanted = excluded_from_capture(Surface::Main, self.local_share_mode());
551 if wanted == self.main_excluded {
552 return;
553 }
554 self.main_excluded = wanted;
555 if wanted {
556 platform::exclude_from_capture(native);
557 } else {
558 platform::include_in_capture(native);
559 }
560 }
561
562 552 fn end_share(&mut self, cx: &mut Context<Self>) {
563 553 if self.share.take().is_none() {
564 554 return;
@@ -787,7 +777,9 @@ impl CallWindows {
787 777 .flatten();
788 778 if let Some(native) = native {
789 779 platform::prepare_toast_window(native);
790 platform::exclude_from_capture(native);
780 if excluded_from_capture(role.surface()) {
781 platform::exclude_from_capture(native);
782 }
791 783 }
792 784 if matches!(role, Role::Border(_)) {
793 785 handle
@@ -37,6 +37,17 @@ enum Role {
37 Border(usize),
37 Border(usize),
38}
38}
39
39
40impl Role {
41 fn surface(self) -> Surface {
42 match self {
43 Role::Bar => Surface::ShareBar,
44 Role::Mini => Surface::Mini,
45 Role::Gallery => Surface::Gallery,
46 Role::Border(_) => Surface::Border,
47 }
48 }
49}
50
40struct Placed {
51struct Placed {
41 handle: AnyWindowHandle,
52 handle: AnyWindowHandle,
42 native: Option<NativeHandle>,
53 native: Option<NativeHandle>,
@@ -114,7 +125,6 @@ pub struct CallWindows {
114 gallery_seen: Option<(i32, i32)>,
125 gallery_seen: Option<(i32, i32)>,
115 gallery_layout: GalleryLayout,
126 gallery_layout: GalleryLayout,
116 speaker_only: bool,
127 speaker_only: bool,
117 main_excluded: bool,
118 minimized_for_share: bool,
128 minimized_for_share: bool,
119 ticks: u32,
129 ticks: u32,
120}
130}
@@ -194,7 +204,6 @@ impl CallWindows {
194 gallery_seen: None,
204 gallery_seen: None,
195 gallery_layout: gallery_layout(0, true, f32::MAX),
205 gallery_layout: gallery_layout(0, true, f32::MAX),
196 speaker_only: false,
206 speaker_only: false,
197 main_excluded: false,
198 minimized_for_share: false,
207 minimized_for_share: false,
199 ticks: 0,
208 ticks: 0,
200 };
209 };
@@ -315,7 +324,6 @@ impl CallWindows {
315 self.stage_native = None;
324 self.stage_native = None;
316 self.minimized = false;
325 self.minimized = false;
317 self.minimized_for_share = false;
326 self.minimized_for_share = false;
318 self.main_excluded = false;
319 self.seen_viewing = None;
327 self.seen_viewing = None;
320 }
328 }
321
329
@@ -389,7 +397,6 @@ impl CallWindows {
389 && self.share.is_none()
397 && self.share.is_none()
390 && self.windows.is_empty()
398 && self.windows.is_empty()
391 && self.opening.is_empty()
399 && self.opening.is_empty()
392 && !self.main_excluded
393 }
400 }
394
401
395 fn tick(&mut self, cx: &mut Context<Self>) -> Duration {
402 fn tick(&mut self, cx: &mut Context<Self>) -> Duration {
@@ -402,7 +409,6 @@ impl CallWindows {
402 self.refresh_stage_window();
409 self.refresh_stage_window();
403 self.sync_viewing(cx);
410 self.sync_viewing(cx);
404 self.sync_share(slow, cx);
411 self.sync_share(slow, cx);
405 self.sync_capture_exclusion();
406 self.sync_pop_out(cx);
412 self.sync_pop_out(cx);
407 self.sync_monitor(cx);
413 self.sync_monitor(cx);
408 if slow {
414 if slow {
@@ -543,22 +549,6 @@ impl CallWindows {
543 }
549 }
544 }
550 }
545
551
546 fn sync_capture_exclusion(&mut self) {
547 let Some(native) = self.stage_native else {
548 return;
549 };
550 let wanted = excluded_from_capture(Surface::Main, self.local_share_mode());
551 if wanted == self.main_excluded {
552 return;
553 }
554 self.main_excluded = wanted;
555 if wanted {
556 platform::exclude_from_capture(native);
557 } else {
558 platform::include_in_capture(native);
559 }
560 }
561
562 fn end_share(&mut self, cx: &mut Context<Self>) {
552 fn end_share(&mut self, cx: &mut Context<Self>) {
563 if self.share.take().is_none() {
553 if self.share.take().is_none() {
564 return;
554 return;
@@ -787,7 +777,9 @@ impl CallWindows {
787 .flatten();
777 .flatten();
788 if let Some(native) = native {
778 if let Some(native) = native {
789 platform::prepare_toast_window(native);
779 platform::prepare_toast_window(native);
790 platform::exclude_from_capture(native);
780 if excluded_from_capture(role.surface()) {
781 platform::exclude_from_capture(native);
782 }
791 }
783 }
792 if matches!(role, Role::Border(_)) {
784 if matches!(role, Role::Border(_)) {
793 handle
785 handle