Commit graph

133 commits

Author SHA1 Message Date
Johan Malm
bca2e9be60 Chase wlroots wlr_seat_keyboard() refactoring
wlr_seat_keyboard() now takes wlr_keyboard
2022-03-28 20:41:53 +01:00
bi4k8
401b282772 fix crash when changing TTY
also add an assertion to clarify the contract of `output_by_name`
2022-03-21 21:08:48 +00:00
bi4k8
4c3bae0794 implement touch support
this is mostly plumbing; the most interesting logic is in touch_get_coords
2022-03-21 21:06:41 +00:00
Johan Malm
d844f6798b Chase wlroots wlr-device-input refactoring
Rename wlroots input device events, for example
's/wlr_event_pointer_motion/wlr_pointer_motion_event/'

seat.c:
- In configure_libinput() use wlr_input_device->type rather than width_mm
- In new_pointer() use wlr_input_device->type rather than output_name to
  check that device is pointer.
2022-03-19 11:34:11 +00:00
Johan Malm
bd9ac3478a Remove src/damage.c 2022-03-01 20:54:52 +00:00
Consolatis
5f27356fc1 Short term solution to prevent segfaulting on TTY switch. See #206.
This will still prevent touchscreens or other absolute pointers to
function correctly after switching the TTY when using a multi
screen setup. But that is still better than segfaulting.
2022-01-18 06:06:12 +00:00
Johan Malm
cef9723505 seat: support WLR_{WL,X11}_OUTPUTS >= 2
When running nested in X11 or a wlroots compositor with the respective
environment variables WLR_X11_OUTPUTS or WLR_WL_OUTPUTS set to value >= 2,
cursors need to be mapped to the respective outputs.

Closes issue #196

Suggested-by: @Consolatis
Written-by: @johanmalm
2022-01-06 21:40:10 +00:00
bi4k8
58f5e8d16a factor keyboard/cursor cleanup into own functions 2022-01-01 19:24:27 +00:00
John Lindgren
455d85e01c Fix use-after-free errors detected by valgrind
Handlers for the "destroy" signal need to unregister themselves from the
signal (using wl_list_remove()) before invoking free().

    Invalid write of size 8
       at 0x487DF27: wl_list_remove (in /usr/lib/libwayland-server.so.0.20.0)
       by 0x4906FF0: wlr_signal_emit_safe (signal.c:32)
       by 0x48EA304: reset_xdg_surface (wlr_xdg_surface.c:430)
       by 0x48EA3D6: UnknownInlinedFun (wlr_xdg_surface.c:464)
       by 0x48EA3D6: xdg_surface_handle_resource_destroy (wlr_xdg_surface.c:282)
       by 0x4877899: ??? (in /usr/lib/libwayland-server.so.0.20.0)
       by 0x487DEBF: ??? (in /usr/lib/libwayland-server.so.0.20.0)
       by 0x487E3DF: ??? (in /usr/lib/libwayland-server.so.0.20.0)
       by 0x487830D: wl_client_destroy (in /usr/lib/libwayland-server.so.0.20.0)
       by 0x48783F6: ??? (in /usr/lib/libwayland-server.so.0.20.0)
       by 0x487B1C9: wl_event_loop_dispatch (in /usr/lib/libwayland-server.so.0.20.0)
       by 0x4878D36: wl_display_run (in /usr/lib/libwayland-server.so.0.20.0)
       by 0x110DAC: main (main.c:81)
     Address 0xc3213d8 is 424 bytes inside a block of size 704 free'd
       at 0x484118B: free (vg_replace_malloc.c:755)
       by 0x4906FDD: wlr_signal_emit_safe (signal.c:29)
       by 0x48EA304: reset_xdg_surface (wlr_xdg_surface.c:430)
       by 0x48EA3D6: UnknownInlinedFun (wlr_xdg_surface.c:464)
       by 0x48EA3D6: xdg_surface_handle_resource_destroy (wlr_xdg_surface.c:282)
       by 0x4877899: ??? (in /usr/lib/libwayland-server.so.0.20.0)
       by 0x487DEBF: ??? (in /usr/lib/libwayland-server.so.0.20.0)
       by 0x487E3DF: ??? (in /usr/lib/libwayland-server.so.0.20.0)
       by 0x487830D: wl_client_destroy (in /usr/lib/libwayland-server.so.0.20.0)
       by 0x48783F6: ??? (in /usr/lib/libwayland-server.so.0.20.0)
       by 0x487B1C9: wl_event_loop_dispatch (in /usr/lib/libwayland-server.so.0.20.0)
       by 0x4878D36: wl_display_run (in /usr/lib/libwayland-server.so.0.20.0)
       by 0x110DAC: main (main.c:81)
     Block was alloc'd at
       at 0x48435FF: calloc (vg_replace_malloc.c:1117)
       by 0x113E22: xdg_surface_new (xdg.c:401)
       by 0x4906FDD: wlr_signal_emit_safe (signal.c:29)
       by 0x48EABE7: handle_xdg_surface_commit (wlr_xdg_surface.c:331)
       by 0x4908FE7: surface_commit_state (wlr_surface.c:457)
       by 0x524DD49: ??? (in /usr/lib/libffi.so.8.1.0)
       by 0x524D266: ??? (in /usr/lib/libffi.so.8.1.0)
       by 0x487D322: ??? (in /usr/lib/libwayland-server.so.0.20.0)
       by 0x48785CB: ??? (in /usr/lib/libwayland-server.so.0.20.0)
       by 0x487B1C9: wl_event_loop_dispatch (in /usr/lib/libwayland-server.so.0.20.0)
       by 0x4878D36: wl_display_run (in /usr/lib/libwayland-server.so.0.20.0)
       by 0x110DAC: main (main.c:81)

    Invalid write of size 8
       at 0x487DF27: wl_list_remove (in /usr/lib/libwayland-server.so.0.20.0)
       by 0x4906FF0: wlr_signal_emit_safe (signal.c:32)
       by 0x48F5529: UnknownInlinedFun (wlr_input_device.c:34)
       by 0x48F5529: wlr_input_device_destroy (wlr_input_device.c:29)
       by 0x48CE4B5: backend_destroy.part.0.lto_priv.0 (backend.c:148)
       by 0x48D2D55: multi_backend_destroy (backend.c:59)
       by 0x48788FE: wl_display_destroy (in /usr/lib/libwayland-server.so.0.20.0)
       by 0x110E71: UnknownInlinedFun (server.c:406)
       by 0x110E71: main (main.c:83)
     Address 0xc466568 is 24 bytes inside a block of size 56 free'd
       at 0x484118B: free (vg_replace_malloc.c:755)
       by 0x4906FDD: wlr_signal_emit_safe (signal.c:29)
       by 0x48F5529: UnknownInlinedFun (wlr_input_device.c:34)
       by 0x48F5529: wlr_input_device_destroy (wlr_input_device.c:29)
       by 0x48CE4B5: backend_destroy.part.0.lto_priv.0 (backend.c:148)
       by 0x48D2D55: multi_backend_destroy (backend.c:59)
       by 0x48788FE: wl_display_destroy (in /usr/lib/libwayland-server.so.0.20.0)
       by 0x110E71: UnknownInlinedFun (server.c:406)
       by 0x110E71: main (main.c:83)
     Block was alloc'd at
       at 0x48435FF: calloc (vg_replace_malloc.c:1117)
       by 0x11590F: new_input_notify (seat.c:137)
       by 0x4906FDD: wlr_signal_emit_safe (signal.c:29)
       by 0x4906FDD: wlr_signal_emit_safe (signal.c:29)
       by 0x48CDCEE: UnknownInlinedFun (events.c:109)
       by 0x48CDCEE: UnknownInlinedFun (events.c:242)
       by 0x48CDCEE: UnknownInlinedFun (backend.c:58)
       by 0x48CDCEE: handle_libinput_readable (backend.c:48)
       by 0x48CE1BE: backend_start.lto_priv.0 (backend.c:114)
       by 0x48D2CE5: multi_backend_start (backend.c:33)
       by 0x110C45: UnknownInlinedFun (server.c:375)
       by 0x110C45: main (main.c:68)
2021-12-27 15:37:26 +00:00
bi4k8
a3796fa6f3 implement libinput tapButtonMap setting
this is a standard libinput setting that was not previously exposed
2021-12-12 19:00:58 -05:00
ARDiDo
aa9720f627 Add support for basic idle and idle inhibitor protocols 2021-11-22 21:58:07 +00:00
ARDiDo
f5072151a9 add pointer constraints 2021-10-17 22:32:25 +01:00
Johan Malm
606b6d946e Fix coding style, mostly whitespace 2021-10-15 20:52:36 +01:00
ARDiDo
416499624e Complete libinput configuration 2021-10-15 19:11:35 +01:00
ARDiDo
d4e1791c88 Reconfigure inputs 2021-10-10 21:52:40 +01:00
ARDiDo
3dc4c02c54 partial libinput configuration 2021-10-10 11:34:48 +01:00
Johan Malm
ebb632419b *.c: add SPDX-License-Identifier 2021-09-24 21:45:48 +01:00
Johan Malm
82e47ac1f5 Remove src/common/log.c
Use wlr_log() instead
2021-07-23 21:15:55 +01:00
Johan Malm
20fd8f59a7 Remove info() and die() 2021-07-22 21:30:17 +01:00
Johan Malm
bb5e44a143 seat: remove warning for libinput finger count 2021-04-08 17:09:06 +01:00
Johan Malm
2186aac610 seat: add missing damage_all_outputs() 2021-03-29 19:35:25 +01:00
Johan Malm
4a8fcf5c6d seat.c: check finger count before enabling tapfor libinput device 2021-02-06 15:47:51 +00:00
Johan Malm
c765b9883f seat: enable libinput tap 2020-12-30 11:09:36 +00:00
Johan Malm
a26fd5a75b layers: handle top layer unmap/destroy better
On losing top layer focus, set focus on topmost mapped view.
2020-10-31 15:09:13 +00:00
Johan Malm
109d942534 server: refactor server_finish() 2020-10-22 19:54:45 +01:00
Johan Malm
9342b2b414 seat: refactor seat_focus_surface() 2020-10-08 20:22:52 +01:00
Johan Malm
8e2b3ea89a seat: remove seat_focused_surface() 2020-10-07 21:49:58 +01:00
Johan Malm
e400700a4a seat: refactor seat_focus_surface() 2020-10-06 21:31:01 +01:00
Johan Malm
50bcfa00f3 seat: use wlr_seat_keyboard_notify_enter() correctly 2020-10-05 20:27:52 +01:00
Johan Malm
25829d122c Refactor seat.c, keyboard.c, cursor.c
Use wlr_keyboard_group
2020-10-02 21:20:12 +01:00
Johan Malm
96e05057a3 Update .clang-format
Align with wlroots style
2020-09-28 20:41:41 +01:00
Johan Malm
e99d0bb34e labwc.h: remove "extern struct server server" 2020-09-08 20:18:12 +01:00
Johan Malm
8e7f2e78cd Add xwayland-unmanaged.c
Handle xwayland override_direct surfaces separately from the view
struct - in order to simplify code, particularly in view.c
2020-09-04 20:25:20 +01:00