Uli Schlachter
734b541ecd
Map between X11 Windows and WlSurfaces
...
Xwayland gives us a mapping between X11 window and WlSurface IDs via
special WL_SURFACE_ID messages. This commit uses these messages to find
the corresponding WlSurface. For this, the new client.get_resource API
from wayland-server is needed.
Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-02-19 11:38:17 +01:00
Victor Berger
5421b9675c
anvil: send millisecond time in frame callback
...
This is what the protocol requires, and apps rely on it to figure
out how long time elapsed between draws.
2020-10-26 12:52:28 +01:00
Jonas Platte
bcc8f13b2b
Fix most rustc & clippy warnings
2020-09-16 12:56:32 +02:00
Mateus Carmo M de F Barbosa
2a351d0879
Use Serial type for all serials
2020-08-27 13:07:01 +02:00
Victor Brekenfeld
bf011e8071
anvil: Introduce BufferTextures
2020-06-28 00:23:24 +02:00
Victor Brekenfeld
4930e7e8b2
anvil: create a texture per backend
2020-06-28 00:23:24 +02:00
Victor Berger
64aedce01f
anvil: Introduce ShellHandle type to simply return values
2020-05-02 13:27:35 +02:00
Victor Berger
743a80c004
anvil: remove unused imports
2020-05-02 13:27:35 +02:00
Victor Berger
104774eeb0
Minor clippy fixed
2020-04-28 11:13:25 +02:00
Victor Berger
d48c04fd7b
anvil: Implement subsurface state caching
2020-04-22 12:12:57 +02:00
Victor Berger
315797ff43
anvil: bulk-send frame events after each page flip
2020-04-22 12:12:57 +02:00
Victor Berger
548a929d1c
wayland.compositor: Correct frame callback handling
2020-04-22 12:12:57 +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
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
Victor Berger
a60e1cd7fd
Merge pull request #156 from YaLTeR/resize
...
anvil: implement the Resize request
2020-02-12 22:57:32 +01:00
Ivan Molodetskikh
e1396d2e1a
anvil.shell: add our own ResizeEdge
...
It mirrors the one in wl_shell_surface and lets us not depend on it.
2020-02-11 11:06:36 +03:00
Ivan Molodetskikh
c0d0d0d2b8
anvil.shell: respect min and max size in resize
2020-02-08 18:36:09 +03:00
Ivan Molodetskikh
e76f9f14ed
anvil.shell: store min_size and max_size
2020-02-08 13:51:12 +03:00
Ivan Molodetskikh
adbab32bd8
anvil.shell: update location on top-left resizing
2020-02-08 13:51:11 +03:00
Ivan Molodetskikh
60ca2f9c88
anvil.shell: don't send first configure to WlShell
...
It doesn't need it, and it also takes the (0, 0) size literally, which
makes everything try to be the smallest size possible initially.
2020-02-08 09:53:50 +03:00
Ivan Molodetskikh
09d7f597d4
anvil.shell: refresh toplevels on commit
...
This updates the toplevel state in the WindowMap as soon as it's
committed. It will be used to update the toplevel location on top-left
resize, but this is a better approach in general than the current
update-every-drawn-frame. I think we should update the WindowMap state
as soon as possible, and only when necessary.
2020-02-08 08:47:14 +03:00
Ivan Molodetskikh
ca7e91a98c
anvil.shell: implement the Resize request
...
Currently doesn't move the window when resizing left or top.
2020-02-08 08:47:13 +03:00
Ivan Molodetskikh
9fd9db82ae
anvil.shell: store geometry in SurfaceData
2020-02-03 16:54:11 +03:00
Ivan Molodetskikh
ebb3a05502
anvil: make get_size and contains_point methods
...
This removes the need to store them as generic members, and will ease
the addition of new methods.
2020-02-03 16:54:11 +03:00
Victor Berger
7fa7fe03be
Merge pull request #155 from YaLTeR/fix-dimensions
...
anvil: retrieve buffer dimensions on commit
2020-02-03 14:53:35 +01:00
Ivan Molodetskikh
a224f774ee
anvil: store buffer dimensions separately
...
Before this change, the texture size was used for the dimensions.
However, the texture is not created until the next rendered frame, which
means that frequently size was returned as zero, resulting in pointer
focus artifacts. With this change, the dimensions are retrieved
immediately on surface commit.
2020-02-03 12:56:59 +03:00
Ivan Molodetskikh
32613f3cd6
anvil.shell: check that grab is correct in Move
...
Check that the grab had a focus and it was the same client as this
surface.
2020-02-03 12:31:39 +03:00
Ivan Molodetskikh
d8495d81f2
anvil.shell: check that there's a grab before Move
...
If there's no click grab then the request is invalid.
2020-02-03 12:31:38 +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
24af494cbf
anvil.shell: implement the Move request
2020-02-03 07:51:05 +03:00
Ivan Molodetskikh
13cac4f693
anvil.shell: use correct region in contains_point
...
The one in SurfaceAttributes has potentially not been committed yet, and
the one in SurfaceData is the most up-to-date committed one.
2020-02-02 12:45:35 +03:00
Ivan Molodetskikh
fac4ca260e
anvil.shell: store input_region in SurfaceData
...
This is the most up-to-date committed input region.
2020-02-02 12:45:35 +03:00
Ivan Molodetskikh
fd50b45e61
anvil: implement input region check
2020-01-22 08:06:15 +03:00
Ivan Molodetskikh
aa65f3608d
anvil: add a contains_point fn for Window.matching
...
Currently implemented to be equivalent to the previous size-based check.
This will allow implementing an input-region-aware check.
2020-01-22 07:46:26 +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
Victor Brekenfeld
056a86ad30
anvil: release old buffers on commit
2019-08-23 15:16:18 +02:00
Victor Berger
d62fb4c8b5
wayland.shell.xdg: use UserDataMap
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
5768e1fd87
Upgrade dependencies
2019-02-24 11:23:11 +01:00
Jonas Platte
f34cf4b068
Upgrade anvil 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 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 Berger
81956c8fd0
data_device: basic DnD support
2018-11-21 15:28:41 +01:00
Jonas Platte
850ff6983a
anvil: Use nested imports
2018-10-07 22:39:18 +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