help text
This commit is contained in:
+10
-10
@@ -3,7 +3,7 @@
|
||||
//!
|
||||
//! Scaling is the compositor's job. A tile attaches its capture buffer directly
|
||||
//! and wp_viewporter names the rectangle to fit it into, so nothing here touches
|
||||
//! a pixel of window content — only the background, selection and labels.
|
||||
//! a pixel of window content - only the background, selection and labels.
|
||||
|
||||
use std::error::Error;
|
||||
use std::os::fd::AsFd;
|
||||
@@ -139,7 +139,7 @@ impl App {
|
||||
/// Put every visible tile where the viewport says, and unmap the rest.
|
||||
///
|
||||
/// Runs again after each scroll, so a tile scrolled off screen gets a null
|
||||
/// buffer — the way to hide a subsurface — rather than being left behind.
|
||||
/// buffer - the way to hide a subsurface - rather than being left behind.
|
||||
/// Scaling stays the compositor's job: the capture buffer is attached as it
|
||||
/// is, and wp_viewporter names the rectangle to fit it into.
|
||||
pub fn sync_tiles(&mut self, qh: &QueueHandle<Self>) {
|
||||
@@ -164,8 +164,8 @@ impl App {
|
||||
let surface = self.compositor.create_surface(qh, ());
|
||||
let subsurface = self.subcompositor.get_subsurface(&surface, &parent, qh, ());
|
||||
let viewport = self.viewporter.get_viewport(&surface, qh, ());
|
||||
// Tiles change independently of the chrome — a live frame
|
||||
// arrives whenever its window does — so they must not wait on a
|
||||
// Tiles change independently of the chrome - a live frame
|
||||
// arrives whenever its window does - so they must not wait on a
|
||||
// parent commit.
|
||||
subsurface.set_desync();
|
||||
// The capture protocol reports the transform the compositor
|
||||
@@ -239,7 +239,7 @@ impl App {
|
||||
let (cw, ch) = (chrome.w, chrome.h);
|
||||
let mut p = chrome.painter();
|
||||
p.fill(bg);
|
||||
// The selection fills the whole element box, padding included — the same
|
||||
// The selection fills the whole element box, padding included - the same
|
||||
// thing rofi's element background does. It can be scrolled out of sight.
|
||||
if let Some(elem) = elem {
|
||||
p.rect(elem, sel_bg);
|
||||
@@ -293,7 +293,7 @@ impl App {
|
||||
}
|
||||
|
||||
/// The tile under the pointer, if it is over one. A tile's own subsurface
|
||||
/// answers directly; over the parent surface — padding, labels, gaps — the
|
||||
/// answers directly; over the parent surface - padding, labels, gaps - the
|
||||
/// layout is asked instead.
|
||||
fn tile_at_pointer(&self) -> Option<usize> {
|
||||
let hover = self.hover.as_ref()?;
|
||||
@@ -308,8 +308,8 @@ impl App {
|
||||
})
|
||||
}
|
||||
|
||||
/// Press and release on the same tile picks it. Anywhere else — the margin,
|
||||
/// a gap, an empty cell of the last row — does nothing at all.
|
||||
/// Press and release on the same tile picks it. Anywhere else - the margin,
|
||||
/// a gap, an empty cell of the last row - does nothing at all.
|
||||
fn click(&mut self, pressed: bool) {
|
||||
if pressed {
|
||||
self.pressed = self.tile_at_pointer();
|
||||
@@ -523,7 +523,7 @@ impl Dispatch<WlKeyboard, ()> for App {
|
||||
wl_keyboard::Event::Enter { keys, .. } => app.keyboard_enter(keys, qh),
|
||||
wl_keyboard::Event::Leave { .. } => {
|
||||
app.focused = false;
|
||||
// Clear any held repeat — we no longer have the keyboard.
|
||||
// Clear any held repeat - we no longer have the keyboard.
|
||||
app.repeat_key = None;
|
||||
app.repeat_next = None;
|
||||
}
|
||||
@@ -532,7 +532,7 @@ impl Dispatch<WlKeyboard, ()> for App {
|
||||
}
|
||||
}
|
||||
|
||||
/// Hovering does not move the selection — that belongs to the keyboard — so the
|
||||
/// Hovering does not move the selection - that belongs to the keyboard - so the
|
||||
/// pointer only tracks where it is and what it clicked. Scrolling is a
|
||||
/// deliberate gesture, so that does move the selection.
|
||||
impl Dispatch<WlPointer, ()> for App {
|
||||
|
||||
Reference in New Issue
Block a user