Skip to content

Commit

Permalink
Use popup_output() in commit handler
Browse files Browse the repository at this point in the history
Fixes layer shell popups not causing redraws.
  • Loading branch information
YaLTeR committed Dec 18, 2023
1 parent 887574c commit e16b45b
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/handlers/compositor.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use std::collections::hash_map::Entry;

use smithay::backend::renderer::utils::{on_commit_buffer_handler, with_renderer_surface_state};
use smithay::desktop::find_popup_root_surface;
use smithay::input::pointer::CursorImageStatus;
use smithay::reexports::calloop::Interest;
use smithay::reexports::wayland_server::protocol::wl_buffer;
Expand Down Expand Up @@ -150,11 +149,8 @@ impl CompositorHandler for State {
// This might be a popup.
self.popups_handle_commit(surface);
if let Some(popup) = self.niri.popups.find_popup(surface) {
if let Ok(root) = find_popup_root_surface(&popup) {
let root_window_output = self.niri.layout.find_window_and_output(&root);
if let Some((_window, output)) = root_window_output {
self.niri.queue_redraw(output);
}
if let Some(output) = self.popup_output(&popup) {
self.niri.queue_redraw(output);
}
}

Expand Down

0 comments on commit e16b45b

Please sign in to comment.