Repository: alacritty/alacritty
File: alacritty/src/event.rs (Rust)

Code before:
                window: &mut self.display.window,
                font_size: &mut self.font_size,
                config: &mut self.config,
                urls: &self.display.urls,
                event_loop,
            };
            let mut processor = input::Processor::new(context, &self.display.highlighted_url);

            for event in self.event_queue.drain(..) {
                Processor::handle_event(event, &mut processor);
            }

            // Process DisplayUpdate events
            if !display_update_pending.is_empty() {
                self.display.handle_update(
                    &mut terminal,
                    &mut self.notifier,
                    &self.message_buffer,
                    &self.config,
                    display_update_pending,
                );
            }

            #[cfg(not(any(target_os = "macos", windows)))]
            {
                // Skip rendering on Wayland until we get frame event from compositor
                if event_loop.is_wayland()
                    && !self.display.window.should_draw.load(Ordering::Relaxed)
                {
                    return;
                }
            }

            if terminal.dirty {
                terminal.dirty = false;

                // Request immediate re-draw if visual bell animation is not finished yet
                if !terminal.visual_bell.completed() {
                    self.event_queue.push(GlutinEvent::UserEvent(Event::Wakeup));
                }

                // Redraw screen
                self.display.draw(
                    terminal,
                    &self.message_buffer,
                    &self.config,
                    &self.mouse,
                    self.modifiers,
                );
            }
        });

Review comment (suggestion):
```suggestion
                // Skip rendering on Wayland until we get frame event from compositor.
```

Code after:
                self.display.handle_update(
                    &mut terminal,
                    &mut self.notifier,
                    &self.message_buffer,
                    &self.config,
                    display_update_pending,
                );
            }

            #[cfg(not(any(target_os = "macos", windows)))]
            {
                // Skip rendering on Wayland until we get frame event from compositor.
                if event_loop.is_wayland()
                    && !self.display.window.should_draw.load(Ordering::Relaxed)
                {
                    return;
                }
            }

            if terminal.dirty {
                terminal.dirty = false;

                // Request immediate re-draw if visual bell animation is not finished yet.
                if !terminal.visual_bell.completed() {
                    self.event_queue.push(GlutinEvent::UserEvent(Event::Wakeup));
                }

                // Redraw screen.
                self.display.draw(
                    terminal,
                    &self.message_buffer,
                    &self.config,
                    &self.mouse,
                    self.modifiers,
                );
            }
        });

        // Write ref tests to disk
        self.write_ref_test_results(&terminal.lock());
    }

    /// Handle events from glutin
    ///
    /// Doesn't take self mutably due to borrow checking.
    fn handle_event<T>(
        event: GlutinEvent<Event>,
        processor: &mut input::Processor<T, ActionContext<N, T>>,
    ) where
        T: EventListener,
    {