Commit Graph

202 Commits

Author SHA1 Message Date
Tony Crisci 368f74e4df Refactor meson build files
Use tabs for indentation and break up function calls over 80 col.
2017-08-30 14:30:47 -04:00
Drew DeVault 6daf9e9ab2 Merge pull request #120 from acrisci/feature/wlr-cursor
wlr_cursor
2017-08-29 12:12:18 -05:00
Tony Crisci df0ee7f25f implement tablet tool devices 2017-08-28 10:23:14 -04:00
Tony Crisci c914697676 add device to touch events 2017-08-27 11:44:55 -04:00
Tony Crisci 98f4cdfccb implement wlr_cursor_map_input_to_output 2017-08-26 08:32:11 -04:00
Tony Crisci e3d47376dc add wlr_cursor basic implementation 2017-08-26 08:32:11 -04:00
Scott Anderson d16b2977f6 Remove single GPU assumptions from wlr_session 2017-08-26 14:50:16 +12:00
Scott Anderson fb93628bda Merge wlr_udev into wlr_session 2017-08-26 14:02:04 +12:00
Scott Anderson 46823152ea Rename functions to be consistent with #93 2017-08-26 11:56:43 +12:00
Dominique Martinet 062d923b0a wayland backend: wl_event_source_remove on destroy 2017-08-19 09:31:06 +02:00
Dominique Martinet f24b3df980 wlr renderer/texture: rename init to create when it does alloc 2017-08-19 08:33:31 +02:00
Dominique Martinet 12782eabfe libinput: wl_event_source_remove on destroy 2017-08-19 08:33:31 +02:00
Dominique Martinet 58efb8f90a wayland backend: remove explicit scale = 1
This is now set correctly in the wlr_output init
2017-08-19 07:38:45 +02:00
Dominique Martinet 0252c8e072 drm realloc_crtcs: check we found an output
This follows-up on #105 that just initialized to 0.
Instead, make sure we actually found an output that matches
2017-08-18 18:27:59 +02:00
Tony Crisci 784cf65635 fix uninitialized warning
`index` might be uninitialized. Warning can be produced with gcc and `-01` flag.
2017-08-18 12:08:28 -04:00
Dominique Martinet e2e149784b wayland backend: fix xdg-shell for weston
- xdg toplevel configure can be called with 0 width/height,
in that case we are free to do as we like (so do nothing)
 - need a display roundtrip after everything is setup but before
we start attaching buffers to the surface
2017-08-17 10:36:43 +02:00
Dominique Martinet 3377e5e4f2 wayland backend: fix xdg-shell for gnome
Calling wl_surface_commit after setting up the xdg_toplevel is
apparently good enough for them.

Still missing something for weston.
2017-08-17 10:24:27 +02:00
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