From 7a0de188863d78e6879f679f78d64a774e92dee4 Mon Sep 17 00:00:00 2001 From: Matthew Gapp <61894094+matthewgapp@users.noreply.github.com> Date: Sat, 3 Jun 2023 11:21:59 -0700 Subject: [PATCH 1/2] partially "reverting" PR #1617 --- druid/src/window.rs | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/druid/src/window.rs b/druid/src/window.rs index 5bf7bbbf40..bf6549648d 100644 --- a/druid/src/window.rs +++ b/druid/src/window.rs @@ -445,15 +445,14 @@ impl Window { self.layout(queue, data, env); } + let reset_color = if self.transparent { + Color::TRANSPARENT + } else { + env.get(crate::theme::WINDOW_BACKGROUND_COLOR) + }; + for &r in invalid.rects() { - piet.clear( - Some(r), - if self.transparent { - Color::TRANSPARENT - } else { - env.get(crate::theme::WINDOW_BACKGROUND_COLOR) - }, - ); + piet.fill(r, &reset_color); } self.paint(piet, invalid, queue, data, env); } From 3ea6cf28dad7a906aefaa69d8f1fb62e6e3085b6 Mon Sep 17 00:00:00 2001 From: Matthew Gapp <61894094+matthewgapp@users.noreply.github.com> Date: Sat, 3 Jun 2023 11:34:53 -0700 Subject: [PATCH 2/2] update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1de02589d4..2fdd8e546e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ You can find its changes [documented below](#083---2023-02-28). - `syn` feature `extra-traits` is now always enabled. ([#2375] by [@AtomicGamer9523]) - Title bar color was opposite of the system theme on Windows. ([#2378] by [@Insprill]) +- Input field focus would cause visual artifacts (grey rectangles) to be drawn when focus changed ([#2381] by [@matthewgapp]) ### Visual