Commit Graph

51 Commits

Author SHA1 Message Date
Scott Anderson aaff4b8c00 backend/wayland: Make header order consistent 2018-11-11 22:29:35 +13:00
Scott Anderson bbce92a923 backend/wayland: Move initilisation code earlier
The renderer redesign is going to need the render fd before the backend
is fully started, so we have to move the wl registry code to when the
backend is created instead of when it is started.

We also need to stash the wl_keyboard and emit it to library users
later, once they've added their listeners and started the backend.
2018-11-11 18:11:56 +13:00
Scott Anderson 4e03802057 backend/wayland: Move registry into backend
Registry was a very small file, and is heavily related to the backend,
so there is not point in keeping them separate.
2018-11-11 18:11:56 +13:00
emersion e98cb7c5ab backend/wayland: add assertions 2018-09-18 11:06:01 +02:00
emersion 0b58579564
Add support for discrete axis values 2018-05-12 13:34:58 +01:00
emersion 13098a18ea
Fix hardware cursors scale & transform 2018-05-09 19:58:18 +01:00
emersion 225d182765
output: always use hardware cursors if available
This changes the `wlr_output_impl.set_cursor` function to take a
`wlr_texture` instead of a byte buffer. This simplifies the
DRM and Wayland backends since they were creating textures from
the byte buffer anyway.

With this commit, performance should be improved when moving the
cursor since outputs don't need to be re-rendered anymore.
2018-05-01 21:38:04 +01:00
emersion ddac792b61
backend/wayland: only set one pointer listener 2018-04-29 14:30:13 +01:00
emersion 9f8a7c8fc4
backend/wayland: create one virtual pointer per output 2018-04-29 14:30:13 +01:00
emersion 71ca45e2c0
Make sure we don't use others' prefixes 2018-04-25 23:24:58 +01:00
emersion b0d99f5c67
Remove wlr_ prefix from local symbols 2018-04-25 23:00:46 +01:00
Dominique Martinet d5e14ab247 wayland backend: fix use-after free on output destroy
==12021==ERROR: AddressSanitizer: heap-use-after-free on address 0x617000015698 at pc 0x7f1a9abe1c09 bp 0x7ffe9068f6b0 sp 0x7ffe9068f6a0
WRITE of size 4 at 0x617000015698 thread T0
    #0 0x7f1a9abe1c08 in pointer_handle_leave ../backend/wayland/wl_seat.c:40
    #1 0x7f1a96ae7d1d in ffi_call_unix64 (/lib64/libffi.so.6+0x5d1d)
    #2 0x7f1a96ae768e in ffi_call (/lib64/libffi.so.6+0x568e)
    #3 0x7f1a988e0d8a  (/lib64/libwayland-client.so.0+0x8d8a)
    #4 0x7f1a988dd927  (/lib64/libwayland-client.so.0+0x5927)
    #5 0x7f1a988debe3 in wl_display_dispatch_queue_pending (/lib64/libwayland-client.so.0+0x6be3)
    #6 0x7f1a9abdd6d6 in dispatch_events ../backend/wayland/backend.c:28
    #7 0x7f1a9a968c11 in wl_event_loop_dispatch (/lib64/libwayland-server.so.0+0x9c11)
    #8 0x7f1a9a967449 in wl_display_run (/lib64/libwayland-server.so.0+0x8449)
    #9 0x418dff in main ../rootston/main.c:81
    #10 0x7f1a99b5ef29 in __libc_start_main (/lib64/libc.so.6+0x20f29)
    #11 0x4057c9 in _start (/home/shared/wayland/wlroots/build/rootston/rootston+0x4057c9)

0x617000015698 is located 664 bytes inside of 696-byte region [0x617000015400,0x6170000156b8)
freed by thread T0 here:
    #0 0x7f1a9af754b8 in __interceptor_free (/lib64/libasan.so.4+0xde4b8)
    #1 0x7f1a9abe01ee in wlr_wl_output_destroy ../backend/wayland/output.c:194
    #2 0x7f1a9ac12918 in wlr_output_destroy ../types/wlr_output.c:299
    #3 0x7f1a9abe061b in xdg_toplevel_handle_close ../backend/wayland/output.c:255
    #4 0x7f1a96ae7d1d in ffi_call_unix64 (/lib64/libffi.so.6+0x5d1d)
    #5 0x7f1a96ae768e in ffi_call (/lib64/libffi.so.6+0x568e)
    #6 0x7f1a988e0d8a  (/lib64/libwayland-client.so.0+0x8d8a)
    #7 0x7f1a988dd927  (/lib64/libwayland-client.so.0+0x5927)
    #8 0x7f1a988debe3 in wl_display_dispatch_queue_pending (/lib64/libwayland-client.so.0+0x6be3)
    #9 0x7f1a9abdd6d6 in dispatch_events ../backend/wayland/backend.c:28
    #10 0x7f1a9a968c11 in wl_event_loop_dispatch (/lib64/libwayland-server.so.0+0x9c11)
    #11 0x7f1a9a967449 in wl_display_run (/lib64/libwayland-server.so.0+0x8449)
    #12 0x418dff in main ../rootston/main.c:81
    #13 0x7f1a99b5ef29 in __libc_start_main (/lib64/libc.so.6+0x20f29)
    #14 0x4057c9 in _start (/home/shared/wayland/wlroots/build/rootston/rootston+0x4057c9)

previously allocated by thread T0 here:
    #0 0x7f1a9af75a38 in __interceptor_calloc (/lib64/libasan.so.4+0xdea38)
    #1 0x7f1a9abe0703 in wlr_wl_output_create ../backend/wayland/output.c:272
    #2 0x7f1a9abdd8eb in wlr_wl_backend_start ../backend/wayland/backend.c:55
    #3 0x7f1a9abbeb49 in wlr_backend_start ../backend/backend.c:28
    #4 0x7f1a9abd8ce1 in multi_backend_start ../backend/multi/backend.c:24
    #5 0x7f1a9abbeb49 in wlr_backend_start ../backend/backend.c:28
    #6 0x418c32 in main ../rootston/main.c:58
    #7 0x7f1a99b5ef29 in __libc_start_main (/lib64/libc.so.6+0x20f29)
    #8 0x4057c9 in _start (/home/shared/wayland/wlroots/build/rootston/rootston+0x4057c9)
2018-03-22 21:27:49 +01:00
emersion c41de2d1be
render: split render.h into wlr_renderer.h and wlr_texture.h 2018-03-19 23:16:29 +01:00
emersion c2e1474010
Reformat all #include directives 2018-02-12 21:29:23 +01:00
emersion 4fa90b0511
Backport screenshooter fixes from the renderer redesign v1
This backports some changes to #319 to fix the screenshooter data
format. This also adds wlr_backend_get_renderer which will be
useful to support multiple renderers.
2018-01-23 22:06:54 +01:00
Dominique Martinet 169bc9fa10 wl backend: add wlr_input_device_is_wl 2017-12-19 20:20:32 +01:00
Dominique Martinet dabfe159de wl backend: add wlr_output_is_wl 2017-12-19 20:13:49 +01:00
emersion 75ef7860bb
Merge branch 'master' into display-destroy 2017-12-14 20:29:30 +01:00
emersion a1302cc4a5
Fix pointer events with multiple outputs in wayland backend 2017-12-13 22:32:22 +01:00
emersion 9d43adaafa
Listen to display destroy in backends 2017-12-07 23:44:59 +01:00
emersion 95566c6bdf
Transform cursor hotspot, fix wayland cursor hotspot 2017-10-31 12:30:56 +01:00
Drew DeVault 16f35ecbea Merge branch 'master' into heghe/wl_list 2017-10-21 22:03:48 -04:00
Scott Anderson 9b984253e2 Move egl.h to render/egl.h 2017-10-22 10:36:07 +13:00
Heghedus Razvan d3f0878d71 Replace list_t with wl_list in wlr_wl_backend
Now wlr_backend->outputs is a list of wlr_wl_backend_output instead of
wlr_output.

Signed-off-by: Heghedus Razvan <heghedus.razvan@gmail.com>
2017-10-20 19:44:59 +03:00
Versus Void 641d08ce7e Transform hotspot with cursor
Fix #188
2017-10-06 09:07:08 +03:00
Drew DeVault f4387b437f Merge branch 'master' into rootston 2017-09-25 08:29:51 -04:00
emersion 427bdb5b55
Use more consistent include guard names 2017-09-23 10:26:01 +02:00
Drew DeVault b6d7c3ed8e Initialize display, backend; add frame handling 2017-09-23 00:30:39 -04:00
Dominique Martinet 577d2f6fcd wayland backend: switch to xdg shell
Closes #72 and #96.
2017-08-17 10:24:27 +02:00
nyorain d7dcbbc175 Add wayland backend cursor support 2017-08-14 18:02:05 -04:00
Dominique Martinet 53e7bebd23 Refactor out wlr_pointer_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
Drew DeVault 41e735242d Remove wlr_output_state, update backends 2017-08-13 11:38:03 -04:00
Drew DeVault 81cd90297d Refactor out wlr_backend_state from wl/multi 2017-08-12 11:43:36 -04: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
Drew DeVault c24351681f Refactor EGL handling 2017-08-10 22:15:37 -04: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 c1520077b6 Implement wayland backend input events 2017-06-22 16:53:48 +02: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
Drew DeVault c2d0090ad7 Support multiple wl backend outputs 2017-06-20 18:22:21 -04:00
Drew DeVault b9d36c8149 Add dynamic output resizing for Wayland backend
This allows outputs to:
- Not support modesetting
- Resize themselves
2017-06-20 17:51:45 -04:00
nyorain 50ce35e9da Implement wayland backend output 2017-06-20 18:27:05 +02:00
nyorain 792d535225 Rework wayland backend output implementation 2017-06-19 22:36:40 +02:00
nyorain 8fbf1ca3ff Continue wayland backend update
Update wayland backend to new api.
Start to use the input interfaces.
Compiling now, not tested.
2017-06-19 19:05:10 +02:00
nyorain 904739c405 Start to fix wayland backend
Starts to update the wayland backend to the new backend api.
Not yet updated to libinput branch (not yet compiling).
2017-06-19 17:46:50 +02:00
Drew DeVault 5ca9d612f4 Flesh out wayland backend registry 2017-04-25 19:19:21 -04:00
Drew DeVault de01e654ce Flesh out wayland backend somewhat, add example 2017-04-25 15:06:58 -04:00