Create seat before shell surface
This commit is contained in:
+25
-27
@@ -197,11 +197,34 @@ impl App {
|
|||||||
|
|
||||||
let pools = DoubleMemPool::new(&shm, || {}).expect("Failed to create a memory pool !");
|
let pools = DoubleMemPool::new(&shm, || {}).expect("Failed to create a memory pool !");
|
||||||
|
|
||||||
|
//
|
||||||
|
// Get our seat
|
||||||
|
//
|
||||||
|
let seat = manager
|
||||||
|
.instantiate_range(1, 6, NewProxy::implement_dummy)
|
||||||
|
.unwrap();
|
||||||
|
|
||||||
|
//
|
||||||
|
// Keyboard processing
|
||||||
|
//
|
||||||
|
let kbd_clone = cmd_queue.clone();
|
||||||
|
map_keyboard_auto_with_repeat(
|
||||||
|
&seat,
|
||||||
|
KeyRepeatKind::System,
|
||||||
|
move |event: KbEvent, _| match event {
|
||||||
|
KbEvent::Key { keysym, .. } => match keysym {
|
||||||
|
0xFF1B => kbd_clone.lock().unwrap().push_back(Cmd::Exit),
|
||||||
|
_ => (),
|
||||||
|
},
|
||||||
|
_ => (),
|
||||||
|
},
|
||||||
|
|_, _| {},
|
||||||
|
)
|
||||||
|
.expect("Failed to map keyboard");
|
||||||
|
|
||||||
//
|
//
|
||||||
// Prepare shell so that we can create our shell surface
|
// Prepare shell so that we can create our shell surface
|
||||||
//
|
//
|
||||||
|
|
||||||
// shells
|
|
||||||
let shell = if let Ok(layer) = manager.instantiate_exact(
|
let shell = if let Ok(layer) = manager.instantiate_exact(
|
||||||
1,
|
1,
|
||||||
|layer: NewProxy<zwlr_layer_shell_v1::ZwlrLayerShellV1>| {
|
|layer: NewProxy<zwlr_layer_shell_v1::ZwlrLayerShellV1>| {
|
||||||
@@ -250,31 +273,6 @@ impl App {
|
|||||||
surface.commit();
|
surface.commit();
|
||||||
event_queue.sync_roundtrip().unwrap();
|
event_queue.sync_roundtrip().unwrap();
|
||||||
|
|
||||||
//
|
|
||||||
// Get our seat
|
|
||||||
//
|
|
||||||
let seat = manager
|
|
||||||
.instantiate_range(1, 6, NewProxy::implement_dummy)
|
|
||||||
.unwrap();
|
|
||||||
|
|
||||||
//
|
|
||||||
// Keyboard processing
|
|
||||||
//
|
|
||||||
let kbd_clone = cmd_queue.clone();
|
|
||||||
map_keyboard_auto_with_repeat(
|
|
||||||
&seat,
|
|
||||||
KeyRepeatKind::System,
|
|
||||||
move |event: KbEvent, _| match event {
|
|
||||||
KbEvent::Key { keysym, .. } => match keysym {
|
|
||||||
0xFF1B => kbd_clone.lock().unwrap().push_back(Cmd::Exit),
|
|
||||||
_ => (),
|
|
||||||
},
|
|
||||||
_ => (),
|
|
||||||
},
|
|
||||||
|_, _| {},
|
|
||||||
)
|
|
||||||
.expect("Failed to map keyboard");
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Cursor processing
|
// Cursor processing
|
||||||
//
|
//
|
||||||
|
|||||||
Reference in New Issue
Block a user