summaryrefslogtreecommitdiff
path: root/src/window.rs
diff options
context:
space:
mode:
authorBen Bridle <bridle.benjamin@gmail.com>2024-09-10 12:46:56 +1200
committerBen Bridle <bridle.benjamin@gmail.com>2024-09-10 12:48:13 +1200
commit824483fc95ccbc4627d07371bac8ed4da44c83e7 (patch)
tree3c3ce5a0a32aba61be7dcc3f93e5ebbbc85867e3 /src/window.rs
parentd598b9b0b404b386c460a09933bcfce4683b8f7a (diff)
downloadphosphor-824483fc95ccbc4627d07371bac8ed4da44c83e7.zip
Fix issue with damaged screen not being redrawn
When another window was dragged over a Phosphor window, the Phosphor window would have streaks drawn over it from the dragged window and would need to be redrawn. This was handled by an unrequested render request, where a render request is received that was sent not by the program itself but by Phosphor. These unrequested requests were being ignored due to commit 30c61fd, because of an issue on Windows where programs were receiving upwards of 50 unrequested requests per second for no reason, which was impacting program performance. They have been re-enabled, pending an investigation into the cause of these requests on Windows.
Diffstat (limited to 'src/window.rs')
-rw-r--r--src/window.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/window.rs b/src/window.rs
index 1b602c8..261af36 100644
--- a/src/window.rs
+++ b/src/window.rs
@@ -183,12 +183,12 @@ impl Window {
let physical_dim = self.surface_dimensions;
let logical_dim = self.buffer.dimensions();
- // Return early if this render wasn't requested by us. Unrequested
- // renders have been observed under Windows 10.
if let RenderRequest::Render(hint) = self.render_request {
self.controller.on_render(&mut self.buffer, hint);
} else {
- return;
+ // TODO: Look into the cause of reduntant unrequested render
+ // requests under Windows.
+ self.controller.on_render(&mut self.buffer, RenderHint::Redraw);
}
let buffer = self.buffer.as_u32_slice();