Commit Graph

708 Commits

Author SHA1 Message Date
Victor Berger e60374a459 Fix unused imports 2021-07-13 14:23:21 +02:00
Victor Berger 0bad0a4a62 move input.rs to input/mod.rs, same for libinput.rs 2021-07-13 14:23:21 +02:00
Victor Berger 54ea0d3a74 Introduce Logical/Physical Point/Rectangle 2021-07-13 13:58:06 +02:00
Victor Brekenfeld 510c0a5400 egl: Add debug logging
Add debug logging to egl via the `EGL_KHR_debug` extension similar to our
support for `GL_KHR_debug`. Sadly unlike the GL-extensions the EGL-extension
does not let us provide any user-data for the callback, so we fall back to
using `slog-stdlog`, when available.

Since we only want to initialize this once, when libEGL gets loaded and
not per display, but we need to query the list of supported extensions
first, some initialization steps where moved around.
2021-07-10 20:07:12 +02:00
Victor Brekenfeld 3e2f2afa28 egl: Let the native surface handle attributes
The required surface attributes for egl surface creation might be very
dependent on the used egl platform. Therefor let the native surface type
handle the attributes instead of deriving them from a set of properties.
2021-07-10 20:05:08 +02:00
Victor Brekenfeld d97a9f9970 egl: Fix egl display handle visibility
Currently there is no way to get the raw handle of an `EGLDisplay`, but
this can be necessary for implementing additional egl platforms out-of-tree.
2021-07-10 19:48:00 +02:00
Poly 07743faad2 Apply suggestions from code review & Rebase 2021-07-05 23:57:28 +02:00
Poly 90a62aeae7 wayland.tablet: Add tablet manager protocol 2021-07-05 22:36:32 +02:00
Poly 1c9e3fe903 input: Add tablet events 2021-07-05 22:36:32 +02:00
Victor Berger 1cdb55aee6 backend.session: review docs 2021-07-05 22:34:54 +02:00
Victor Berger e17bbe590a backend.winit: review docs 2021-07-05 22:34:54 +02:00
Victor Berger 1c59625a06 backend.udev: review docs 2021-07-05 22:34:54 +02:00
Victor Berger 468a3bb8dc doc: expand root documentation 2021-07-05 22:34:54 +02:00
Victor Berger 89079d6dd3 Fix unused import warning 2021-07-05 22:34:54 +02:00
Victor Berger d5b033f5b5 move signaling to utils::signaling 2021-07-05 22:34:54 +02:00
Victor Berger 0ac045eb17 wayland.data_device: review docs & API 2021-07-05 22:34:54 +02:00
Victor Berger 6454ebecf0 wayland.dmabuf: review docs & API 2021-07-05 22:34:54 +02:00
Victor Berger 694666b31f wayland.seat: review docs & API 2021-07-05 22:34:54 +02:00
Victor Berger e96272cae5 wayland.shell.xdg: review docs & API 2021-07-05 22:34:54 +02:00
Victor Berger ba6bef3e85 wayland.shell.legacy: review docs & API 2021-07-05 22:34:54 +02:00
Victor Berger 4214cb9fc5 wayland.shm: review docs 2021-07-05 22:34:54 +02:00
Victor Berger 7b3585ad36 xwayland: review documentation 2021-07-05 22:34:54 +02:00
Victor Berger 811df39214 Add all missing Debug implementations
Fixes #258
2021-07-05 21:40:50 +02:00
Victor Berger b1b025992f Update calloop to 0.9 2021-07-05 21:40:50 +02:00
i509VCB fb11dcb251
Winit: Share the resized size instead of using egl display field (#328) 2021-07-04 23:39:01 +02:00
Victor Berger f27658b759
Merge pull request #306 from cmeissl/feature/surface-enter-leave 2021-07-03 17:01:13 +02:00
Christian Meissl 6b2273235a fix popup geometry calculation and relative
placement to parent geometry
2021-07-01 23:52:40 +02:00
Poly c2457db8d1 Fix libseat build 2021-07-01 23:51:50 +02:00
Christian Meissl df208fa6c8 clamp cursor with current output height
move fullscreen output geometry calculation to
a helper function

rename with_outputs to with_client_outputs and
take client instead of generic resource
2021-06-30 23:56:01 +02:00
Christian Meissl 0d88a392fa add an output_map which handles...
the positioning of outputs, tracks
the surfaces on the outputs and
sends enter/leave for the surfaces

Additionally the output_map will
handle re-location of windows if
a output mode is changed, an output is
added or removed.

The shell has been updated to use the
primary output for the initial placement.
The fullscreen/maximize requests will now
handle the shell part correctly. For real
fullscreen output the rendering has to be
changed.

The output name is considered unique
and an output can be retrieved from
the map by location, output or name.
This can be used as the base for HiDPI
handling.
2021-06-30 18:24:51 +02:00
Victor Brekenfeld 616bacdff2
Merge pull request #318 from Smithay/refactor/input_backend
Rework `InputBackend` abstractions to track individual devices
2021-06-30 00:14:20 +02:00
Victor Brekenfeld 50741bc7bb Rework `InputBackend` abstractions to track individual devices
Removes the notion of Seats from `InputBackend` and replaces it with
`DeviceAdded` and `DeviceRemoved` events allowing compositors to
descriminate between single devices.

A new abstraction to model multiple seats on a single input backend
may be be added separately at a later time.
2021-06-30 00:06:59 +02:00
Victor Berger 3a0c631edd Rudimentary xdg_popup support 2021-06-29 23:59:55 +02:00
Victor Berger 47bc37c67b Disable pointer grab with dead starting surface 2021-06-29 23:27:23 +02:00
Christian Meissl 736eb11cd5 use platform specifc types for XlibWindow and gbm
this fixes compilation on 32bit targets like armv7
2021-06-29 18:46:00 +02:00
Victor Berger da5c814555 Clippy fixes 2021-06-29 18:03:44 +02:00
Victor Berger 053bc98faa Fix all CI warnings 2021-06-29 18:03:44 +02:00
Christian Meissl 453f33d5a4 add a environment variable to the direct session...
...that is used as a fallback if no explicit
tty is requested
2021-06-29 15:13:03 +02:00
Christian Meissl 3392c0c675 log the XWayland display 2021-06-29 15:12:24 +02:00
Christian Meissl 29c0620a58 test if xwayland is already shutting down on client_destroy 2021-06-29 15:12:24 +02:00
Victor Brekenfeld eb5e4bcf92 Fix wl_drm on winit backend 2021-06-27 22:19:12 +02:00
Victor Berger ad55ab71c9 compositor: Introduce transaction state tracking
This changes the state handling logic of wl_surface to automatically
track subsurface pending in the form of transactions. The role enum
(and the associated type parameter) is no more, and replaced by a
general-purpose typemap-like container on surfaces.

The new logic is introduced in the files:

- `src/wayland/compositor/cache.rs`
- `src/wayland/compositor/transaction.rs`

The rest of the PR is the fallout of these changes, as well as a few
trivial clippy fixes.
2021-06-26 21:52:38 +02:00
Victor Brekenfeld d17cd5326d Remove EGLBufferReader from buffer_type and buffer_dimensions api 2021-06-24 22:17:08 +02:00
Victor Brekenfeld c578a9e16c Move EGLBufferReader management into ImportEgl 2021-06-24 22:12:08 +02:00
Victor Brekenfeld 268ad95767 gles2: Fixup cleanup of unused dmabuf-bindings 2021-06-23 18:36:06 +02:00
Victor Brekenfeld ce3b2d1eab Rework `DrmRenderSurface` into `GbmBufferedSurface`.
Removes the renderer from the `DrmRenderSurface` allowing anvil
to use just one renderer per backend.

Since the old `DrmRenderSurface` was dependant on gbm anyway to import
buffers, the new `GbmBufferedSurface` does now only supports gbm as an allocator,
which hugely simplifies the code and also skips some unnecessary imports/exports.
2021-06-23 18:36:06 +02:00
Christian Meissl 6bd0d71ebc do not remove the surface focus during ungrap
fixes #163
2021-06-22 13:15:30 +02:00
Christian Meissl c4f2d34647 fix clippy unknown lint 2021-06-20 12:08:04 +02:00
Poly f9f77288c8
libseat support (#292) 2021-06-15 23:35:16 +02:00
cmeissl e9aef7caad
rework xdg_shell (#286)
* rework xdg_shell
use distinct surface roles for xdg_toplevel and
xdg_popup using a xdg_role! macro

* fix clippy warnings in shell

* added a generic DeadResource error and...
...added a result to xdg with_pending_state
Renamed the ToplevelState to ToplevelStateSet
2021-06-15 23:32:02 +02:00