Commit Graph

156 Commits

Author SHA1 Message Date
Victor Berger 991eba216d Update most dependencies 2021-02-22 20:27:46 +01:00
Uli Schlachter ff09b8e116 Use the correct position for Xwayland surfaces
Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-02-19 11:38:17 +01:00
Uli Schlachter 3504182a5e Add a new surface role for Xwayland surfaces
Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-02-19 11:38:17 +01:00
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
Uli Schlachter a6c40a002b Add an X11 EventSource to calloop
This commit creates an event source for calloop that receives X11 events
from the X11 server.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-02-19 11:38:17 +01:00
Uli Schlachter df01587459 Become the X11 window manager after Xwayland startup
This commits adds the necessary magic incantations to become the X11 WM
after Xwayland starts.

This uses the pure-Rust implementation from x11rb, but any other X11
crate could be used as well.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-02-19 11:38:17 +01:00
Uli Schlachter 2f0dadd6ca anvil: Add a xwayland feature
This commit adds an xwayland feature to anvil. Right now, this feature
doesn't do much. anvil uses the smithay code to start XWayland, but does
not do anything with it once it is running.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-02-19 11:38:17 +01:00
Victor Berger 36e11284c2 New clippy fixes 2020-11-02 10:24:55 +01:00
Victor Berger 8fde779806 Dependencies updates 2020-11-02 10:24:55 +01:00
Eric Anholt 78d28165c3
Update nix to 0.19 (#237) 2020-10-31 18:33:18 +01:00
Victor Berger d3429fa37d anvil: send frame callback before blocking to draw on winit 2020-10-26 12:52:28 +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 Berger 49dda88c63 backend.input: keep sub-pixel precision in events
libinput provides sub-pixel precision for pointer motion & touch events.
Keep this precision by switching all coordinates values from input
events to f64 (rather than i32 or u32). Otherwise, values are rounded
and part of the movment is lost.

Potentially fixes #224
2020-07-13 17:56:20 +02:00
Victor Brekenfeld 9c3c3d939e cargo fmt & lint 2020-06-28 00:25:15 +02:00
Victor Brekenfeld 3fd336aba5 anvil: GliumDrawer handle hardware cursors and track state 2020-06-28 00:23:24 +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 Brekenfeld f84d6cb180 anvil/udev: do not upload a cursor every frame 2020-06-28 00:23:24 +02:00
Victor Brekenfeld 7e75a68e57 anvil: allow swapping monitors via shortcut 2020-06-28 00:23:24 +02:00
Victor Brekenfeld 33fb393383 anvil: clamp input to current output instead of full hd 2020-06-28 00:23:22 +02:00
Victor Brekenfeld d7f800c76d anvil: create and render to multiple outputs independently 2020-06-28 00:05:01 +02:00
Victor Brekenfeld 9fd8dd9cec anvil: allow draw_windows to take optional output coordinates 2020-06-28 00:05:01 +02:00
Victor Brekenfeld 7b4459f649 drm: Make surfaces `Send` 2020-06-11 18:57:05 +02:00
Victor Brekenfeld cc67764c23 make clippy happy 2020-06-11 12:16:43 +02:00
Victor Berger a717fa36cd backend.session: Migrate to using Signaler
Change the session backend to rely on Signaler to propagate its
signals. Also introduce the Linkable trait to allow generic composition
of objects needing to listen for signals.
2020-05-23 21:37:22 +02:00
Victor Berger c3859d999b backend.session: use pkg-config to find logind lib
Introduce the `backend_session_elogind` cargo feature which pulls
`backend_session_logind` and makes the logind session backend seek
`libelogind.so` instead of `libsystemd.so`.

Fixes #127
2020-05-23 21:37:22 +02:00
Victor Berger b05c2ccbba backend.session: rework as calloop event sources
Rework the Session Notifiers so that they are calloop event sources
by themselves, allowing them to be inserted by the user without the
`bind_session` dance.

Also update the logind backend to use the current dbus-rs API, rather
than the deprecated one.
2020-05-23 21:37:22 +02:00
Victor Brekenfeld 0c19a461b6 anvil: use fallback-device for gbm/nvidia 2020-05-23 00:29:32 +02:00
Victor Brekenfeld 38d3db565a anvil: do not double initialize surfaces with multiple matching encoders 2020-05-23 00:29:32 +02:00
Victor Brekenfeld 64a57a4cc8 downgrade some recoverable errors to warnings 2020-05-12 20:03:03 +02:00
Victor Brekenfeld f1c40f7306 lint: fmt & clippy 2020-05-12 20:03:03 +02:00
Victor Brekenfeld 7518f8c0f7 anvil: retry initial renderings 2020-05-12 19:47:10 +02:00
Victor Berger b708f88da6 anvil: Fuse InputHandler into AnvilState 2020-05-12 08:46:34 +02:00
Victor Berger 8f543eb597 backend.input: rework libinput as a calloop source 2020-05-12 08:46:34 +02:00
Victor Berger 5552c81a32 anvil: Introduce InputInitData to simplify function prototypes 2020-05-02 13:27:35 +02:00
Victor Berger 35d8cea547 anvil: Introduce RenderTextureSpec to simplify render_texture 2020-05-02 13:27:35 +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 Brekenfeld 28166ce002
Merge pull request #206 from Smithay/fix/drm_connector
Fix drm mode and connector handling
2020-05-01 16:46:36 +02:00
Victor Brekenfeld 9300e35093 lint: fmt 2020-04-30 19:03:02 +02:00
Victor Brekenfeld 31b6d84442 WIP: Rework egl and glium errors 2020-04-30 00:24:35 +02:00
Victor Berger 31f1f4f9e0 backend.udev: rework as an event source 2020-04-28 11:13:25 +02:00
Victor Berger 104774eeb0 Minor clippy fixed 2020-04-28 11:13:25 +02:00
Victor Berger b3aae074e4 Update calloop to 0.6 2020-04-28 11:13:25 +02:00
Victor Berger eddbe3c708 Update wayland-rs to 0.26 2020-04-28 11:13:25 +02:00
Victor Berger d2e77dca31 Alphabetically sort dependencies 2020-04-28 11:13:25 +02:00
Victor Brekenfeld d6fa2e96cf drm: Require all surfaces to always have a mode set 2020-04-27 00:45:58 +02:00
Victor Brekenfeld a4203bd216 examples/anvil: add disable_connectors for device creation 2020-04-27 00:45:58 +02:00