Skip to content

Commit

Permalink
Merge pull request #319 from i509VCB/pointer_theme_window
Browse files Browse the repository at this point in the history
fix pointer_theme_window
  • Loading branch information
i509VCB authored Nov 13, 2022
2 parents 5c55b98 + c7d6ddb commit 45a2ea5
Showing 1 changed file with 6 additions and 23 deletions.
29 changes: 6 additions & 23 deletions examples/pointer_theme_window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ use smithay_client_toolkit::{
},
};
use wayland_client::{
globals::{registry_queue_init, GlobalListContents},
protocol::{wl_keyboard, wl_output, wl_pointer, wl_registry, wl_seat, wl_shm, wl_surface},
Connection, Dispatch, QueueHandle,
globals::registry_queue_init,
protocol::{wl_keyboard, wl_output, wl_pointer, wl_seat, wl_shm, wl_surface},
Connection, QueueHandle,
};

fn main() {
Expand All @@ -34,9 +34,9 @@ fn main() {

let (globals, mut event_queue) = registry_queue_init(&conn).unwrap();
let qh = event_queue.handle();
let registry_state = RegistryState::new(&conn, &qh);
let seat_state = SeatState::new();
let output_state = OutputState::new();
let registry_state = RegistryState::new(&globals);
let seat_state = SeatState::new(&globals, &qh);
let output_state = OutputState::new(&globals, &qh);
let compositor_state =
CompositorState::bind(&globals, &qh).expect("wl_compositor not available");
let shm_state = ShmState::bind(&globals, &qh).expect("wl_shm not available");
Expand Down Expand Up @@ -84,10 +84,6 @@ fn main() {
set_cursor: false,
};

while !simple_window.registry_state.ready() {
event_queue.blocking_dispatch(&mut simple_window).unwrap();
}

// We don't draw immediately, the configure will notify us when to first draw.

loop {
Expand Down Expand Up @@ -469,16 +465,3 @@ impl ProvidesRegistryState for SimpleWindow {
}
registry_handlers![OutputState, SeatState,];
}

impl Dispatch<wl_registry::WlRegistry, GlobalListContents> for SimpleWindow {
fn event(
_state: &mut Self,
_registry: &wl_registry::WlRegistry,
_event: wl_registry::Event,
_data: &GlobalListContents,
_conn: &Connection,
_qh: &QueueHandle<Self>,
) {
// We don't need any other globals.
}
}

0 comments on commit 45a2ea5

Please sign in to comment.