On Wayland, reduce amount of spurious wakeups
Mark it as breaking, since some clients relied on that behavior, simply because dispatching clients queue always woke up a winit, meaning that they won't be able to use user events for this sake.
This commit is contained in:
parent
3c3a863cc9
commit
cad3277550
5 changed files with 155 additions and 95 deletions
|
|
@ -287,10 +287,14 @@ impl Window {
|
|||
|
||||
#[inline]
|
||||
pub fn request_redraw(&self) {
|
||||
self.window_requests
|
||||
if self
|
||||
.window_requests
|
||||
.redraw_requested
|
||||
.store(true, Ordering::Relaxed);
|
||||
self.event_loop_awakener.ping();
|
||||
.compare_exchange(false, true, Ordering::Relaxed, Ordering::Relaxed)
|
||||
.is_ok()
|
||||
{
|
||||
self.event_loop_awakener.ping();
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue