Remove unnecessary focus_invalidated field (#7320)

I believe at some point this was used for tests but it doesn't seem
necessary anymore.

Release Notes:

- N/A
This commit is contained in:
Antonio Scandurra 2024-02-03 05:41:58 -07:00 committed by GitHub
parent c906fd232d
commit 54aecd21ec
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 1 additions and 18 deletions

View file

@ -658,7 +658,7 @@ impl AppContext {
.values()
.filter_map(|window| {
let window = window.as_ref()?;
(window.dirty.get() || window.focus_invalidated).then_some(window.handle)
window.dirty.get().then_some(window.handle)
})
.collect::<Vec<_>>()
{

View file

@ -280,9 +280,6 @@ pub struct Window {
pub(crate) focus: Option<FocusId>,
focus_enabled: bool,
pending_input: Option<PendingInput>,
#[cfg(any(test, feature = "test-support"))]
pub(crate) focus_invalidated: bool,
}
#[derive(Default, Debug)]
@ -451,9 +448,6 @@ impl Window {
focus: None,
focus_enabled: true,
pending_input: None,
#[cfg(any(test, feature = "test-support"))]
focus_invalidated: false,
}
}
}
@ -538,12 +532,6 @@ impl<'a> WindowContext<'a> {
.rendered_frame
.dispatch_tree
.clear_pending_keystrokes();
#[cfg(any(test, feature = "test-support"))]
{
self.window.focus_invalidated = true;
}
self.refresh();
}
@ -985,11 +973,6 @@ impl<'a> WindowContext<'a> {
self.window.dirty.set(false);
self.window.drawing = true;
#[cfg(any(test, feature = "test-support"))]
{
self.window.focus_invalidated = false;
}
if let Some(requested_handler) = self.window.rendered_frame.requested_input_handler.as_mut()
{
let input_handler = self.window.platform_window.take_input_handler();