Poly
6d76d1c1a2
[Debug Trait] Comments and Cleanup
...
.
2021-02-22 21:05:00 +01:00
Poly
e9eb698dd0
[Debug Trait] wayland
...
wayland/compositor
wayland/data_device
wayland/dmabuf
wayland/explicit_synchronization
wayland/output
wayland/seat
wayland/shell
wayland/shm
2021-02-22 21:00:49 +01:00
Uli Schlachter
1a2b170606
Make clippy happy
...
This fixes the following clippy warnings:
error: usage of `Rc<T>` when T is a buffer type
--> src/wayland/dmabuf/mod.rs:265:14
|
265 | formats: Rc<Vec<Format>>,
| ^^^^^^^^^^^^^^^ help: try: `Rc<[Format]>`
|
= note: `-D clippy::rc-buffer` implied by `-D warnings`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#rc_buffer
error: usage of `Rc<T>` when T is a buffer type
--> src/wayland/shm/mod.rs:91:14
|
91 | formats: Rc<Vec<wl_shm::Format>>,
| ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Rc<[wl_shm::Format]>`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#rc_buffer
Signed-off-by: Uli Schlachter <psychon@znc.in>
2020-12-29 14:43:56 +01:00
Victor Berger
36e11284c2
New clippy fixes
2020-11-02 10:24:55 +01:00
Jonas Platte
bcc8f13b2b
Fix most rustc & clippy warnings
2020-09-16 12:56:32 +02:00
Jonas Platte
c4f64489e8
Update wayland-rs to 0.28
2020-09-16 12:56:32 +02:00
Mateus Carmo M de F Barbosa
d5931c5957
Add unit tests for SerialCounter
2020-08-27 13:07:01 +02:00
Mateus Carmo M de F Barbosa
2a351d0879
Use Serial type for all serials
2020-08-27 13:07:01 +02:00
Mateus Carmo M de F Barbosa
0a0399a339
Implement Serial type to take wrap-around into account
2020-08-27 13:07:01 +02:00
Victor Berger
1871b5ddae
Make slog-stdlog into an optional dependency
...
slog-stdlog has a significant dependency tree and is basically unsued if
the downstream crate of Smithay always provides a logger (like anvil),
so it is not really needed.
2020-07-12 16:38:05 +02:00
Kirill Chibisov
102f41c1e1
wayland.seat: Send modifiers event right after enter event
...
wl_keyboard.modifiers must be sent after wl_keyboard.enter event,
otherwise it's a protocol violation.
2020-06-14 18:38:08 +02:00
Victor Berger
05992b9d11
wayland.seat: Send key event before modifier event
2020-05-23 21:37:35 +02:00
Victor Berger
548a929d1c
wayland.compositor: Correct frame callback handling
2020-04-22 12:12:57 +02:00
Victor Berger
1736db27b4
anvil: set saner values for key repeat rate
2020-04-21 23:04:23 +02:00
Sergey Smirnykh
a774d8c52e
Implement Error trait for KeyboardError using thiserror
2020-04-21 11:14:59 +02:00
Victor Berger
b54d95c15d
Fix most clippy warnings ( #185 )
...
* Add missing documentation
* Fix most clippy warnings
2020-04-15 09:28:22 +02:00
Victor Brekenfeld
f6b3d630ce
rustfmt
2020-04-10 19:18:58 +02:00
Victor Brekenfeld
e8e8667d89
Upgrade to the upcoming drm-rs 0.4
2020-04-10 16:58:49 +02:00
Jonas Platte
b8c20ebf30
Update wayland-rs to 0.25 ( #171 )
...
Update wayland-rs to 0.25 and calloop to 0.5
Co-authored-by: Victor Berger <victor.berger@m4x.org>
2020-04-05 19:01:08 +02:00
Ivan Molodetskikh
e42ccc8aee
wayland: fix deadlock in SurfaceData::cleanup ( #166 )
2020-02-16 16:38:07 +01:00
Ivan Molodetskikh
097445bc20
shell.xdg: fix two copy-paste errors
2020-02-08 13:51:12 +03:00
Ivan Molodetskikh
9eb51b8439
shell.xdg: add XdgRequest::AckConfigure
...
This will be used for convenient resize state tracking.
2020-02-08 08:47:14 +03:00
Ivan Molodetskikh
33a9e242ed
wayland.shell: implement Clone for toplevels
2020-02-08 08:47:13 +03:00
Ivan Molodetskikh
fab0b7a05f
seat: remove ClickGrab.pending_focus
...
It was unused.
2020-02-03 12:31:39 +03:00
Ivan Molodetskikh
03392bf7d1
seat: add GrabStartData to PointerGrab
...
Stores the data about the event that started the grab. Will be useful
for things like move and resize requests.
2020-02-03 12:31:38 +03:00
Ivan Molodetskikh
ba1396ca8c
seat: add PointerHandle::current_location
2020-02-02 15:37:06 +03:00
Ivan Molodetskikh
9cf5b415c6
compositor: add RegionAttributes::contains
2020-01-22 08:05:15 +03:00
nycex
0140de89fb
fix some clippy warnings ( #147 )
...
This commit removes some clippy warnings (to advance #45 ) by doing the following:
- replace usage of `mem::uninitialized()` with `MaybeUninit`
- replace usage of `nix::libc::{uint64_t, int32_t}` with `{u64, i32}`
- replace functions inside of `Option::ok_or` with `Option::ok_or_else`
- replace functions inside of `Result::unwrap_or` with `Result::unwrap_or_else`
- replace occurrences of pass-by-reference with pass-by-value when
appropriate
- replace unused variables in pattern-matching with wildcards
- replace `match` expressions that have only one case with `if let`
expressions
- replace UpperCamelCase names of consts with SCREAMING_SNAKE_CASE
- remove `clone()` on types that implement Copy
- remove redundant imports
- remove `fn main()` from doctests
- remove let binding for variables that are returned afterwards
2020-01-01 11:43:16 +01:00
Pierre Chevalier
0b2e4b42db
Fix clippy warnings with cargo fix
...
Simply ran:
```
rustup run nightly cargo fix --clippy -Z unstable-options
```
followed by
```
cargo fmt
```
No manual change in this commit.
2019-10-23 14:13:10 +02:00
Victor Berger
1627d51cf6
wayland: introduce explicit-synchronization helpers
2019-06-14 11:16:27 +02:00
Victor Berger
04dc563ea0
wayland.dmabuf: API improvements
2019-05-20 08:59:56 +02:00
Victor Berger
c1f759aa00
wayland.dmabuf: module docs & some logging
2019-05-20 08:59:56 +02:00
Victor Berger
e11c0278dd
Wayland dmabuf handler
2019-05-20 08:59:56 +02:00
Victor Berger
d62fb4c8b5
wayland.shell.xdg: use UserDataMap
2019-04-27 21:38:24 +02:00
Victor Berger
19432460cd
wayland.shell.legacy: remove shell surface data
...
It is now redundant with the wl_surface user_data mechanism.
2019-04-27 21:38:24 +02:00
Victor Berger
c604a48dce
wayland.compositor: user UserDataMap to store per-surface data
2019-04-27 21:38:24 +02:00
Victor Berger
9f9e6d4329
wayland.compositor: rework the subsurface tree
...
Rework the subsurface tree by:
- forbidding subsurface loops
- storing the relative depth of a parent to its children,
finally respecting the wl_subsurface specification.
closes #23
2019-04-22 17:20:46 +02:00
Jonas Platte
c238770a1b
Remove unused imports
2019-02-24 08:23:51 +01:00
Victor Berger
3d8f22c805
Don't promise thread-safety that we can't respect
2019-02-24 08:23:51 +01:00
Victor Berger
3f2857fbf3
Update smithay to wayland-server 0.23
2019-02-24 08:23:51 +01:00
Victor Brekenfeld
cc5d55f535
rustfmt fixes
2018-12-17 16:58:49 +01:00
Victor Brekenfeld
e5f8c351c7
Check for rust_2018_idioms
2018-12-16 19:31:38 +01:00
Victor Brekenfeld
71bd64a6bf
Fix source code for 2018 edition
2018-12-16 19:31:38 +01:00
Victor Brekenfeld
dc97e0ad03
Add reexports module
2018-12-14 14:26:50 +01:00
Victor Brekenfeld
04aee7cbc9
Replace documentation links with intra rustdoc links
2018-12-13 15:14:25 +01:00
Victor Berger
d1d608ab2b
anvil: draw custom cursors and dnd icons
2018-12-11 10:21:59 +01:00
Victor Berger
280decf863
data_device: support for custom DnD icons
2018-12-11 10:21:59 +01:00
Victor Berger
f3a68fb1af
seat: support for curstom cursor images
2018-12-11 10:21:59 +01:00
Victor Brekenfeld
a3acd48cc3
fmt: rust 1.31
2018-12-08 18:31:08 +01:00
Victor Berger
5c8e362a9e
wayland.shell: Fix a leak of surfaces
2018-11-28 23:34:30 +01:00
Victor Berger
ed00fb1d47
data_device: move default_action_chooser into smithay
2018-11-22 15:37:31 +01:00
Victor Berger
cc80233318
data_device: module-level docs
2018-11-22 15:02:01 +01:00
Victor Berger
41f1b37834
data_device: let the compositor generate DnD grabs
2018-11-22 00:29:23 +01:00
Victor Berger
d41517f85b
data_device: let the compositor interact with the selection
2018-11-21 22:24:18 +01:00
Victor Berger
35645596a8
data_device: let the compositor decide the action choice strategy
2018-11-21 16:01:34 +01:00
Victor Berger
81956c8fd0
data_device: basic DnD support
2018-11-21 15:28:41 +01:00
Victor Berger
3e28358668
seat: track pressed buttons for the grab
2018-11-20 23:27:12 +01:00
Victor Berger
0434cbb90d
data_device: basic selection support
2018-11-20 11:56:04 +01:00
Victor Berger
f1251a31e6
seat: user data mechanism for Seat
2018-11-18 23:04:50 +01:00
Victor Berger
5e9ad96b0f
seat: add a keyboard focus hook
2018-11-18 23:04:30 +01:00
Victor Berger
afd92d0a3d
seat: add utilities to Seat
2018-11-17 23:10:48 +01:00
Victor Berger
03cf6ed35f
seat: KeyboardHandle::has_focus
2018-11-17 19:08:47 +01:00
Colin Benner
734d2ce996
Fmt, spelling and capitalisation fixes ( #113 )
...
* Rename priviledged to privileged in backend/drm/mod.rs
* Fix a number of typos in comments
* Fix typos in string literals
* Wrap identifiers with backticks in doc comments
* Spelling and capitalisation in doc comments
* Use XWayland in comments
This seems to be the standard capitalisation, even though the executable
is called `Xwayland`.
* Use Glium instead of glium in comments
* Use DRM and API in comments
* Fix remaining occurrence of 'priviledged'
* Reformat code to appease Travis' rustfmt
2018-10-30 13:56:30 +01:00
Tim
214759aecf
Typo
2018-10-18 10:55:21 +01:00
Victor Berger
f9bd83c3b5
wayland.seat: send keymaps in individual tempfiles
...
Send keymaps to client using a new tempfile for each client, rather than
a single shared tempfile. Doing so prevents a client from tempering with
the contents of the tempfile, which would then cause other clients to
read a corrupted keymap.
See this bug report for details:
https://bugs.freedesktop.org/show_bug.cgi?id=101595
2018-10-08 14:09:58 +02:00
Victor Berger
1618c45d4e
wayland: use AtomicUsize for SerialCounter
2018-10-08 13:55:21 +02:00
Victor Berger
139d0f3992
wayland.seat: Pointer grabbing logic
2018-10-08 13:55:21 +02:00
Victor Berger
1301fb6e62
wayland: global counter for client serials
2018-10-08 13:55:21 +02:00
Jonas Platte
a77e29d9b5
lib: Use nested imports
2018-10-07 22:39:18 +02:00
Jonas Platte
943f02b447
Refactor Seat::add_keyboard
...
With the new XkbConfig struct, it is now easier to just use xkbcommon's
default configuration, by moving the xkbcommon specific options into a
struct with according documentation.
Additionally, anvil now uses xkbcommon's defaults with all backends
(previously, the winit backend had a hardcoded french keyboard layout).
2018-10-02 23:12:35 +02:00
Victor Berger
454f874284
cargo fmt
2018-09-25 00:32:09 +02:00
Victor Berger
605895e30f
update to wayland-rs 0.21
2018-09-25 00:31:58 +02:00
Colin Benner
6d31e9e5ff
address more clippy warnings
...
Not sure how much of an improvement these are.
2018-06-29 12:30:42 +02:00
Colin Benner
4598ba0b48
address a bunch of clippy warnings
2018-06-28 11:33:49 +02:00
Victor Berger
07a98ac5e8
wayland.shm: allow buffer access to return a value
2018-05-19 19:45:04 +02:00
Victor Berger
cba56b0af8
wayland.compositor: CompositorToken is threadsafe
...
Thanks to the refactor of wayland-rs, the CompositorToken can
be make Send/Sync again.
Fixes #66 .
2018-05-13 10:24:24 +02:00
Victor Berger
6ee6fd6890
anvil: factor the input backend code
2018-05-08 12:47:09 +02:00
Victor Berger
6f52f9c75a
re-export crates that are actually part of the public API
2018-05-07 19:55:34 +02:00
Victor Berger
4fda0bef4a
review comments
2018-04-24 11:00:39 +02:00
Victor Berger
048dda59e3
wayland.shell: legacy module for wl_shell
2018-04-23 11:40:41 +02:00
Victor Berger
12e13f863b
wayland.shell.xdg: make names more explicit
2018-04-23 10:49:06 +02:00
Victor Berger
4bd1501b96
wayland.shell: don't access the data of dead surfaces during cleanup
2018-04-22 11:58:18 +02:00
Victor Berger
9c88443706
wayland.shell: clean start for wl_shell
2018-04-19 13:56:13 +02:00
Victor Berger
d97fde32e9
wayland.shell: integrate the stable xdg_shell
2018-04-18 17:44:55 +02:00
Victor Berger
b8d4b17a8a
wayland.shell: split wl and xdg & port xdg
2018-04-18 12:51:08 +02:00
Victor Berger
b80093ffda
backend.session: migrate to wayland_rs-0.20
2018-04-17 18:39:07 +02:00
Victor Berger
6dfcef1f49
Remove unstable rustfmt options
2018-04-17 17:48:20 +02:00
Victor Berger
710d23f51f
wayland.compositor: migrate to wayland_rs-0.20
2018-04-17 11:03:42 +02:00
Victor Berger
e44b0e596e
wayland.seat: migrate to wayland_rs-0.20
2018-04-15 11:55:16 +02:00
Victor Berger
93050e2683
Doc proofreading
2018-04-15 11:44:23 +02:00
Victor Berger
1140b484cd
wayland.output: migrate to wayland_rs-0.20
2018-04-14 12:19:59 +02:00
Victor Berger
b9cac1a373
wayland.shm: migrate to wayland_rs-0.20
2018-04-13 12:45:53 +02:00
Drakulix
7fb89ac924
Derive PartialEq,Eq,Hash for ModifiersState
2018-03-29 17:27:14 +02:00
Victor Berger
cd0c5538d1
shell: add method to send close events
2018-03-23 19:27:46 +01:00
Drakulix
19300f0d54
Add missing documentation for former Drop call
2018-03-22 16:21:40 +01:00
Drakulix
23f8a2c8ee
Reexport PointerAxisHandle
2018-03-22 16:21:27 +01:00
Drakulix
daccddf9b6
Reintroduce wl_seat 4 support
2018-03-22 16:10:32 +01:00
Drakulix
2fb36af926
Upgrade to wl_seat version 5
2018-03-21 16:37:50 +01:00
Victor Berger
d8a5acef77
wayland: introduce Seat::owns
2018-02-26 16:20:33 +01:00
Drakulix
cbee540013
Reexport ModifiersState to make it publically accessible
2018-02-21 07:48:54 +01:00