Skip to content

Commit 07deba4

Browse files
elinorbgrvberger
authored andcommitted
Documentation fixes in preparation for release
1 parent 3387957 commit 07deba4

File tree

8 files changed

+34
-23
lines changed

8 files changed

+34
-23
lines changed

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
uses: actions-rs/cargo@v1
3434
with:
3535
command: doc
36-
args: --no-deps --features "test_all_features" -p smithay -p calloop:0.9.0 -p dbus -p drm -p gbm -p input -p nix:0.20.0 -p udev -p slog -p wayland-server -p wayland-commons -p wayland-protocols -p winit
36+
args: --no-deps --features "test_all_features" -p smithay -p calloop:0.9.0 -p dbus -p drm -p gbm -p input -p nix:0.20.0 -p udev -p slog -p wayland-server -p wayland-commons:0.29.0 -p wayland-protocols:0.29.0 -p winit
3737

3838
- name: Setup index
3939
run: cp ./doc_index.html ./target/doc/index.html

Cargo.toml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ license = "MIT"
66
description = "Smithay is a library for writing wayland compositors."
77
repository = "https://github.com/Smithay/smithay"
88
edition = "2018"
9+
readme = "README.md"
10+
homepage = "https://smithay.github.io/"
11+
keywords = ["wayland", "compositor", "graphics", "server"]
12+
categories = ["gui"]
13+
14+
[package.metadata.docs.rs]
15+
features = ["test_all_features"]
916

1017
[workspace]
1118
members = [ "anvil", "wlcs_anvil" ]
@@ -64,7 +71,7 @@ renderer_gl = ["gl_generator", "backend_egl"]
6471
use_system_lib = ["wayland_frontend", "wayland-sys", "wayland-server/use_system_lib"]
6572
wayland_frontend = ["wayland-server", "wayland-commons", "wayland-protocols", "tempfile"]
6673
xwayland = ["wayland_frontend"]
67-
test_all_features = ["default"]
74+
test_all_features = ["default", "use_system_lib", "wayland-server/dlopen"]
6875

6976
[[example]]
7077
name = "raw_drm"

src/backend/drm/surface/gbm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ where
184184

185185
/// Marks the current frame as submitted.
186186
///
187-
/// *Note*: Needs to be called, after the vblank event of the matching [`DrmDevice`](super::DrmDevice)
187+
/// *Note*: Needs to be called, after the vblank event of the matching [`DrmDevice`](super::super::DrmDevice)
188188
/// was received after calling [`GbmBufferedSurface::queue_buffer`] on this surface.
189189
/// Otherwise the underlying swapchain will run out of buffers eventually.
190190
pub fn frame_submitted(&mut self) -> Result<(), Error> {

src/backend/egl/ffi.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ extern "system" fn egl_debug_log(
4646
}
4747

4848
/// Loads libEGL symbols, if not loaded already.
49-
/// This normally happens automatically during [`EGLDisplay`] initialization.
49+
/// This normally happens automatically during [`EGLDisplay`](super::EGLDisplay) initialization.
5050
pub fn make_sure_egl_is_loaded() -> Result<Vec<String>, Error> {
5151
use std::{
5252
ffi::{CStr, CString},

src/backend/egl/mod.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,16 @@
77
//! - Import/Export external resources to/from OpenGL
88
//!
99
//! To use this module, you first need to create a [`EGLDisplay`] through a supported EGL platform
10-
//! as indicated by an implementation of the `native::EGLNativeDisplay` trait.
10+
//! as indicated by an implementation of the [`native::EGLNativeDisplay`] trait.
1111
//!
1212
//! You may bind the [`EGLDisplay`], that shall be used by clients for rendering (so pick one initialized by a fast platform)
1313
//! to the [`wayland_server::Display`] of your compositor. Note only one backend may be bound to any [`Display`](wayland_server::Display) at any time.
1414
//!
1515
//! You may then use the resulting [`display::EGLBufferReader`] to receive [`EGLBuffer`]
1616
//! of an EGL-based [`WlBuffer`](wayland_server::protocol::wl_buffer::WlBuffer) for rendering.
17-
//! Renderers implementing the [`ImportEGL`](crate::backend::renderer::ImportEGL)-trait can manage the buffer reader for you.
17+
//! Renderers implementing the [`ImportEgl`](crate::backend::renderer::ImportEgl)-trait can manage the buffer reader for you.
18+
//!
19+
//! **Note:** The support for binding the [`EGLDisplay`] for use by clients requires the `use_system_lib` cargo feature on Smithay.
1820
//!
1921
//! To create OpenGL contexts you may create [`EGLContext`]s from the display and if the context is initialized with a config
2022
//! it may also be used to initialize an [`EGLSurface`], which can be [bound](crate::backend::renderer::Bind) to some renderers.

src/backend/input/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ pub trait KeyboardKeyEvent<B: InputBackend>: Event<B> {
9191
fn key_code(&self) -> u32;
9292
/// State of the key
9393
fn state(&self) -> KeyState;
94-
/// Total number of keys pressed on all devices on the associated [`Seat`]
94+
/// Total number of keys pressed on all devices on the associated [`Seat`](crate::wayland::seat::Seat)
9595
fn count(&self) -> u32;
9696
}
9797

src/backend/renderer/mod.rs

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -98,19 +98,20 @@ impl Transform {
9898
}
9999
}
100100

101-
#[cfg(feature = "wayland-frontend")]
101+
#[cfg(feature = "wayland_frontend")]
102102
impl From<wayland_server::protocol::wl_output::Transform> for Transform {
103103
fn from(transform: wayland_server::protocol::wl_output::Transform) -> Transform {
104-
use wayland_server::protocol::wl_output::Transform::*;
104+
use wayland_server::protocol::wl_output::Transform as WlTransform;
105105
match transform {
106-
Normal => Transform::Normal,
107-
_90 => Transform::_90,
108-
_180 => Transform::_180,
109-
_270 => Transform::_270,
110-
Flipped => Transform::Flipped,
111-
Flipped90 => Transform::Flipped90,
112-
Flipped180 => Transform::Flipped180,
113-
Flipped270 => Transform::Flipped270,
106+
WlTransform::Normal => Transform::Normal,
107+
WlTransform::_90 => Transform::_90,
108+
WlTransform::_180 => Transform::_180,
109+
WlTransform::_270 => Transform::_270,
110+
WlTransform::Flipped => Transform::Flipped,
111+
WlTransform::Flipped90 => Transform::Flipped90,
112+
WlTransform::Flipped180 => Transform::Flipped180,
113+
WlTransform::Flipped270 => Transform::Flipped270,
114+
_ => Transform::Normal,
114115
}
115116
}
116117
}
@@ -319,11 +320,12 @@ pub trait ImportEgl: Renderer {
319320
///
320321
/// ## Errors
321322
///
322-
/// This might return [`EglExtensionNotSupported`](Error::EglExtensionNotSupported)
323+
/// This might return [`EglExtensionNotSupported`](super::egl::Error::EglExtensionNotSupported)
323324
/// if binding is not supported by the EGL implementation.
324325
///
325-
/// This might return [`OtherEGLDisplayAlreadyBound`](Error::OtherEGLDisplayAlreadyBound)
326-
/// if called for the same [`Display`] multiple times, as only one egl display may be bound at any given time.
326+
/// This might return [`OtherEGLDisplayAlreadyBound`](super::egl::Error::OtherEGLDisplayAlreadyBound)
327+
/// if called for the same [`Display`](wayland_server::Display) multiple times, as only one egl
328+
/// display may be bound at any given time.
327329
fn bind_wl_display(&mut self, display: &wayland_server::Display) -> Result<(), EglError>;
328330

329331
/// Unbinds a previously bound egl display, if existing.
@@ -336,8 +338,8 @@ pub trait ImportEgl: Renderer {
336338
///
337339
/// The primary use for this is calling [`buffer_dimensions`] or [`buffer_type`].
338340
///
339-
/// Returns `None` if no [`Display`] was previously bound to the underlying [`EGLDisplay`]
340-
/// (see [`ImportEgl::bind_wl_display`]).
341+
/// Returns `None` if no [`Display`](wayland_server::Display) was previously bound to the underlying
342+
/// [`EGLDisplay`](super::egl::EGLDisplay) (see [`ImportEgl::bind_wl_display`]).
341343
fn egl_reader(&self) -> Option<&EGLBufferReader>;
342344

343345
/// Import a given wl_drm-based buffer into the renderer (see [`buffer_type`]).

src/wayland/shell/xdg/zxdgv6_handlers.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ use super::{
2222
};
2323

2424
static ZXDG_TOPLEVEL_ROLE: &str = "zxdg_toplevel";
25-
static ZXDG_POPUP_ROLE: &str = "zxdg_toplevel";
25+
static ZXDG_POPUP_ROLE: &str = "zxdg_popup";
2626

2727
pub(crate) fn implement_shell(
2828
shell: Main<zxdg_shell_v6::ZxdgShellV6>,

0 commit comments

Comments
 (0)