Dominique Martinet
fb05923eaa
wayland backend: Fix shell title/app_id to wlroots
2017-08-17 10:24:27 +02:00
Dominique Martinet
4f3d21c3ff
wayland output: add error handling for xdg shell
...
Note that this does not go on to the next backend, because
attempt_wl_backend does not check if we have any output created.
We cannot test simply because (right now) a run of our examples will go
in this function twice, the first of which will (rightly?) return no
display but needs to return backend creation success.
2017-08-17 10:24:27 +02:00
Dominique Martinet
577d2f6fcd
wayland backend: switch to xdg shell
...
Closes #72 and #96 .
2017-08-17 10:24:27 +02:00
Drew DeVault
e7fa4f12e1
Fix DRM problem introduced in 901c14c
2017-08-16 17:36:57 -04:00
Drew DeVault
beb84940cf
Improve no device detection support
2017-08-16 07:24:46 -04:00
Drew DeVault
3ac10a81bd
Merge pull request #94 from martinetd/libinput_no_device
...
libinput: fail if no input found on init
2017-08-16 07:22:36 -04:00
Calvin Lee
901c14c409
Prevent alloc errors from crashing in `list_t`
...
This commit changes the `list_t` api so that alloc errors can be
detected and worked around. Also fixes errors not found in 5cc7342
2017-08-16 09:23:21 +02:00
Dominique Martinet
880c239657
libinput: fail if no input found on init
...
This runs through events pending at init on initialization so we can
tell if some devices are available.
Note that with the way wlr_device_lists is managed, this checks that
there is at least one device we handle - it doesn't have to be a
keyboard, but there is at least a mouse or tablet_pad or something
that we care about.
Instead of failing inconditionally it might be better to leave the
decision to the user, e.g. add a "backend_has_devices" function to
call later.
(Tested by moving /dev/input off)
Fixes #24 .
2017-08-16 09:18:12 +02:00
Drew DeVault
27c13d621d
Merge pull request #88 from 4e554c4c/alloc_crashing
...
Prevent alloc errors from crashing
2017-08-15 12:21:58 -04:00
Drew DeVault
d2e796edb7
Merge pull request #86 from nyorain/master
...
Fix style issues
2017-08-15 07:18:22 -04:00
Calvin Lee
5cc7342606
Prevent alloc errors from crashing
...
Resolves #76
2017-08-15 08:04:57 +02:00
nyorain
d7dcbbc175
Add wayland backend cursor support
2017-08-14 18:02:05 -04:00
nyorain
f998bb8299
Fix style issues
2017-08-14 17:09:56 +02:00
Dominique Martinet
e922e62924
wayland input_device_destroy: add missing braces
2017-08-14 16:30:10 +02:00
Dominique Martinet
4bbf718e7d
impl->destroy cleanup:
...
- remove trivial destroy() function
- make sure we check impl and impl->destroy before calling
- always call free if not implemented
2017-08-14 16:22:31 +02:00
Dominique Martinet
ba20d5b3ca
Refactor out wlr_touch_state
2017-08-14 16:22:31 +02:00
Dominique Martinet
bd67849c03
Refactor out wlr_tablet_tool_state
2017-08-14 16:22:31 +02:00
Dominique Martinet
a289940bff
Refactor out wlr_tablet_pad_state
2017-08-14 16:22:31 +02:00
Dominique Martinet
53e7bebd23
Refactor out wlr_pointer_state
2017-08-14 16:22:31 +02:00
Dominique Martinet
0a3246ad97
Refactor out wlr_keyboard_state
2017-08-14 16:22:31 +02:00
Dominique Martinet
e6ad67911b
Refactor out wlr_input_device_state
2017-08-14 16:22:31 +02:00
Dominique Martinet
9a9dd15d5f
Fix wlr_multi_backend_add incorrect assert
2017-08-14 15:01:59 +02:00
Drew DeVault
c8c6619146
Refactor out wlr_output_mode_state
2017-08-14 08:03:51 -04:00
Calvin Lee
de66bdb867
Add backend detection functions
...
Resolves #80
2017-08-13 23:08:33 +02:00
Drew DeVault
41e735242d
Remove wlr_output_state, update backends
2017-08-13 11:38:03 -04:00
Drew DeVault
4386816889
wlr_backend_init -> wlr_backend_start
...
Also renames create to init. We'll use create for anything that
allocates and init for anything that takes a pointer and initializes it.
2017-08-13 10:19:57 -04:00
Drew DeVault
43fb40e949
Merge pull request #79 from martinetd/libinput_renaming
...
Libinput renaming
2017-08-13 08:29:42 -04:00
Drew DeVault
e6a7817e45
Fix build on systems without systemd
2017-08-13 08:21:57 -04:00
Dominique Martinet
5c82d2f5c3
libinput backend: massive renaming
...
- 'libinput' (backend's) to libinput_context
- 'device' (libinput_device) to libinput_dev
- 'dev' (wlr_device) to wlr_dev
- 'devices' lists tangling of libinput devices to wlr_devices
- 'devices' list of wlr_devices in backend state to wlr_device_lists
2017-08-13 08:18:05 +02:00
Dominique Martinet
08a2afdf6f
libinput backend: match logging for removal and add
...
Only log removal of devices once, but also log it for devices
that we do not care about.
2017-08-13 08:09:11 +02:00
Dominique Martinet
701e147b9b
libinput: remove useless get_context call
...
That function is literally just "return event->device->seat->libinput"
We do not use context, so do not fetch it.
2017-08-13 08:07:44 +02:00
Dominique Martinet
f2e2794365
wayland backend: do not watch wayland fd for writable
...
Wayland fd is always writable and will busy-loop.
The dispatch function gets called with 0-mask when we need to flush
display anyway, so this saves CPU at no visible impact.
2017-08-13 07:53:33 +02:00
Drew DeVault
60d1131df2
Re-enable backend autoselection
2017-08-12 19:56:55 -04:00
Drew DeVault
234b2104e4
Refactor wlr_backend_state out of DRM backend
2017-08-12 19:52:22 -04:00
Drew DeVault
c95a108d2f
Update libinput backend with new state design
2017-08-12 13:51:47 -04:00
Drew DeVault
81cd90297d
Refactor out wlr_backend_state from wl/multi
2017-08-12 11:43:36 -04:00
Dominique Martinet
3e2cb5b5cf
libinput: fix segfault when handling non-wlr device removal
2017-08-12 15:13:29 +02:00
Dominique Martinet
3ea878b76e
wayland backend: free seatName
2017-08-12 01:19:45 +02:00
Dominique Martinet
8427749dd0
wayland backend: emit signal for input/output removal
2017-08-12 01:16:12 +02:00
Dominique Martinet
de86965174
Use libinput_event_destroy/xkb_*_unref
...
Also sneak in a missing drmModeFreePlaneResources
2017-08-12 00:11:18 +02:00
Dominique Martinet
e1293a7853
libinput: signal input remove on libinput backend destroy
...
This lets the upper crust cleanup and free their own states
2017-08-12 00:11:18 +02:00
Dominique Martinet
be3a0ad065
libinput backend: fill in handle_device_removed
...
And fix input_remove_notify accordingly
2017-08-12 00:11:18 +02:00
Dominique Martinet
c42674bc25
Fix libinput destroy for devices with multiple capabilities
2017-08-11 21:02:40 +02:00
Dominique Martinet
0354aaeff2
Complete a few destroy functions
...
This adds missing free calls for:
- drm outputs
- libinput backend in general
- final udev free
- output mode state
2017-08-11 19:17:03 +02:00
Dominique Martinet
0663b6d1e1
Build libinput events on the stack instead of allocating
2017-08-11 18:38:27 +02:00
Drew DeVault
62d8b252c0
Refactor meson and move xdg-shell into wlroots
2017-08-11 09:37:09 -04:00
Drew DeVault
6569c2b626
Merge pull request #53 from nyorain/drm_buffer
...
Implement drm (egl) buffer attaching
2017-08-10 22:20:21 -04:00
Drew DeVault
c24351681f
Refactor EGL handling
2017-08-10 22:15:37 -04:00
Scott Anderson
fe2fbd0fad
Fix possible use of CRTC after monitor is unplugged
2017-08-11 11:12:41 +12:00
Drew DeVault
4aaf76cb66
wlr_output_update_matrix during wl backend init
2017-08-10 13:27:14 -04:00
nyorain
073dff63da
Fix style issues
2017-08-10 11:05:18 +02:00
nyorain
67369173aa
Implement drm (egl) buffer attaching
2017-08-10 10:59:58 +02:00
Scott Anderson
a77fac0760
Added null check on crtc
2017-08-10 01:43:42 +12:00
Scott Anderson
af67966d92
Atomic modesetting
2017-08-09 08:07:00 -04:00
nyorain
e167f41fde
Rename wlr_surface -> wlr_texture; attach -> upload
2017-08-08 18:25:16 +02:00
Scott Anderson
d09ca20a4d
Use gbm_bo_map for cursor
2017-08-07 21:07:42 +12:00
Scott Anderson
dbe66d1963
Style changes
2017-08-07 10:15:05 +12:00
Scott Anderson
5f7042a1f2
Moved headers
2017-08-06 21:49:04 +12:00
Scott Anderson
d307c2f2c2
Renamed some variables to be less generic
2017-08-06 21:42:36 +12:00
Scott Anderson
1db97a9af9
Updated DRM cursor rendering
2017-08-06 21:38:40 +12:00
Scott Anderson
aedfa27d3a
Clean up resources when plane is reassigned
2017-08-06 15:54:38 +12:00
Scott Anderson
2f8b5c4448
More cleanups
2017-08-06 15:53:41 +12:00
Scott Anderson
dd7a349295
Various cleanups
2017-08-06 15:51:49 +12:00
Scott Anderson
d1ca1ec16e
Split off some functions into drm-util
2017-08-06 15:51:49 +12:00
Scott Anderson
c46605d605
Use plane for rendering
2017-08-06 15:50:23 +12:00
Scott Anderson
e16c5504cd
Add planes.
2017-08-06 15:49:05 +12:00
Scott Anderson
67b51f0922
Upgraded CRTC and Encoder matching
2017-08-06 15:49:05 +12:00
Scott Anderson
31867a1b2e
Various changes/cleanups
2017-08-06 15:49:05 +12:00
Scott Anderson
7b772e1a4b
DRM resource initalisation
2017-08-06 15:49:02 +12:00
Scott Anderson
601bbad5d8
Added DRM property infrastructure
2017-08-06 15:47:00 +12:00
Drew DeVault
5bf61ca7ed
Check for multi backend before using it
2017-08-05 23:08:35 -04:00
Drew DeVault
f1a069d50d
Log that the X11 backend is unimplemented
2017-08-05 23:03:56 -04:00
Scott Anderson
4d4da18437
Fixed VT switching
2017-08-06 13:37:49 +12:00
Scott Anderson
3373ec5fc8
Update build files
2017-08-06 13:30:18 +12:00
Scott Anderson
cb4d50e22c
Changed header paths.
2017-08-06 13:25:26 +12:00
Scott Anderson
2ae5cd6539
Moved session/ into backend/
2017-08-06 13:25:26 +12:00
Scott Anderson
ae4478e17f
Changed ownership of wlr_session to the multi backend.
...
Currently breaks VT switching for examples.
2017-08-06 13:25:26 +12:00
nyorain
fdab81e1c9
Use meson build system
2017-08-05 22:34:24 +02:00
Tony Crisci
d822e0768b
Use ARGB8888 pixel format for cursor bo
...
The previous pixel format (RGBA8888) is not supported on all devices for cursors.
Weston uses ARGB8888 exclusively for its cursor buffer object which leads me to
believe this pixel format is better supported.
2017-07-27 17:55:35 -04:00
Tony Crisci
8b6dc48355
bugfix: add null check on output gbm on pageflip
...
The gbm for the output might be null for the pageflip in the case that
the output has been disconnected. The gbm might be set to null by
wlr_drm_output_cleanup() in this case.
If the output is cleaned up before the pageflip, then a double free
will crash the compositor on the call to gbm_surface_release_buffer()
in the pageflip handler. The outputs buffer object bo[1] will point to
invalid memory.
2017-07-24 19:50:13 -04:00
Drew DeVault
b08aa9fd35
Revert "Merge pull request #27 from ascent12/meson"
...
This reverts commit 85805da021
, reversing
changes made to 8189c64d7f
.
2017-07-11 22:16:56 -04:00
Scott Anderson
a2ba226ba3
Use subdir
2017-07-11 09:56:54 +12:00
Scott Anderson
924bf0f669
Changed build system to meson
2017-07-11 00:28:56 +12:00
Drew DeVault
97f6e9b69a
Remove excessive logging in wayland backend
2017-06-28 16:35:18 -04:00
Drew DeVault
97213cc00e
Add new interfaces to wayland backend
2017-06-26 18:23:38 -04:00
Drew DeVault
038dfdbc85
Log max cursor size on error
2017-06-26 10:34:26 -04:00
Scott Anderson
82322d81a7
Hardware cursor improvements.
2017-06-26 19:32:36 +12:00
Scott Anderson
0cd94f0cf0
Added software cursor fallback
2017-06-26 17:34:15 +12:00
Drew DeVault
b18209c904
Switch to GLES2
...
Closes #13
2017-06-23 11:38:45 -04:00
Drew DeVault
168f0955ab
Add wl_output globals for wlr_outputs
2017-06-22 14:27:35 -04:00
nyorain
4ca872c914
Improve wayland backend pointer error logging
2017-06-22 18:04:13 +02:00
nyorain
dbde1f7340
Store wayland backend axis source
2017-06-22 17:58:53 +02:00
nyorain
272030652a
Implement absolute motion events for wayland
2017-06-22 17:55:00 +02:00
nyorain
d26a9ba968
Fix pointer motion coords
2017-06-22 17:12:09 +02:00
nyorain
c1520077b6
Implement wayland backend input events
2017-06-22 16:53:48 +02:00
nyorain
0b8e6cccc8
Add wayland input listener skeletons
2017-06-22 15:41:59 +02:00
Drew DeVault
3d71969b2a
Make event names consistent
2017-06-21 14:07:09 -04:00
Drew DeVault
f4453d104d
Reorganize wlr-common
2017-06-21 12:10:07 -04:00
Drew DeVault
fd91244e83
Update everyone to use new headers
2017-06-21 10:27:45 -04:00
Scott Anderson
55854565dc
Fixed VT switching
2017-06-21 13:31:29 +12:00