aboutsummaryrefslogtreecommitdiffstats
path: root/swaybar/input.c
Commit message (Collapse)AuthorAge
* swaybar: Use position from wl_pointer.enterLibravatar Kenny Levinsen2021-03-20
| | | | | | | | | | | | Only wl_pointer.motion was used to update pointer position, which would cause issues if the pointer was not moved prior to wl_pointer.button. This also fixes touch input through wl_pointer emulation, which fires wl_pointer.button immediately after wl_pointer.enter. Copied from a similar fix made to swaynag. Closes: https://github.com/swaywm/sway/issues/6109
* Make Wayland request listeners static const when possibleLibravatar Manuel Stoeckl2021-02-04
|
* swaybar: Fix scrolling with precise trackpadsLibravatar Martin Dørum2020-04-28
|
* swaybar: fix memory leaksLibravatar Ian Fan2020-03-30
|
* swaybar: fix i3bar relative coordinates when scaling is usedLibravatar Hristo Venev2020-02-10
| | | | | | | | | | | | 24e8ba048aef4751c6fa1d5982ee634f921e6cf6 did not take scaling into account. The hotspot size used pixel coordinates, the absolute coordinates were logical, and the relative coordinates were completely wrong. This commit makes all coordinates use logical values. If `"float_event_coords":true` is sent in the handshake message, coordinates are sent as floating-point values. The "scale" field is an integer containing the scale value.
* Do not truncate pointer coordinates to int.Libravatar Hristo Venev2020-02-10
| | | | This increases the precision of the clicks when using i3bar.
* swaybar: Fix input device removalLibravatar Andri Yngvason2020-01-05
| | | | | Before swaybar would exit with a protocol error when a pointer or touch device was removed.
* check for empty string before calling strtoul() and check errnoLibravatar Daniel Eklöf2019-06-05
| | | | | | Note: since strtoul() has no real error return code (both 0 and ULONG_MAX may be returned on both success and failure), set errno=0 before calling strtoul().
* swaybar/nag: use xcursor theme defined by XCURSOR_THEME/SIZELibravatar Daniel Eklöf2019-06-05
| | | | | | | | If the XCURSOR_THEME and/or XCURSOR_SIZE environment variables are set, use the theme and size they define. If they're not set, use the same defaults as before (system default theme, size=24).
* swaybar: add multiseat supportLibravatar Brian Ashworth2019-04-24
| | | | This just adds multiseat support to swaybar
* swaybar: cycle workspaces on touch dragLibravatar Drew DeVault2019-02-23
|
* swaybar: process hotspots on touch tapLibravatar Drew DeVault2019-02-23
|
* Replace wlr_log with sway_logLibravatar M Stoeckl2019-01-21
| | | | | | | | | | | | | This commit mostly duplicates the wlr_log functions, although with a sway_* prefix. (This is very similar to PR #2009.) However, the logging function no longer needs to be replaceable, so sway_log_init's second argument is used to set the exit callback for sway_abort. wlr_log_init is still invoked in sway/main.c This commit makes it easier to remove the wlroots dependency for the helper programs swaymsg, swaybg, swaybar, and swaynag.
* bar_cmd_tray_bind: Use mouse button helpersLibravatar Brian Ashworth2019-01-16
| | | | | | | | | | | | | | | | This modifies `bar_cmd_tray_bindsym` to use `get_mouse_bindsym` for parsing mouse buttons. This also introduces `bar_cmd_tray_bindcode`, which will use `get_mouse_bindcode` for parsing mouse buttons. Like with sway bindings, the two commands are encapsulated in a single file to maximize shared code. This also modifies tray bindings to work off of events codes rather than x11 buttons, which allows for any mouse buttons to be used. For `get_bar_config`, `event_code` has been added to the `tray_bindings` section and will include to event code for the button. If the event code can be mapped to a x11 button, `input_code` will still be the x11 button number. Otherwise, `input_code` will be `0`.
* bar_cmd_bind: utilize mouse button helpersLibravatar Brian Ashworth2019-01-10
| | | | | | | | | | | | | | | | | | | | This modifies `bar_cmd_bindsym` to use `get_mouse_bindsym` for parsing mouse buttons. This also introduces `cmd_bar_bindcode`, which will use `get_mouse_bindcode` for parsing mouse buttons. Like sway bindings, the two commands are encapsulated in a single file with shared code. This also modifies swaybar to operate off of event codes rather than x11 button numbers, which allows for any mouse button to be used. This introduces two new IPC properties: - For `get_bar_config`, `event_code` has been added to the `bindings` section and will include to event code for the button. If the event code can be mapped to a x11 button, `input_code` will still be the x11 button number. Otherwise, `input_code` will be `0`. - Likewise for `click_events`, `event` has been added and will include the event code for the button clicked. If the event code can be mapped to a x11 button, `button` will still be the x11 button number. Otherwise, `button` will be `0`.
* Simplify evdev includes on FreeBSD by relying on up-to-date packageLibravatar Jan Beich2019-01-09
| | | | | | | | | | | | evdev-proto is installed by a dependency, so some files have been missed: In file included from ../sway/input/cursor.c:3: /usr/local/include/libevdev-1.0/libevdev/libevdev.h:30:10: fatal error: 'linux/input.h' file not found #include <linux/input.h> ^~~~~~~~~~~~~~~ ../swaybar/i3bar.c:3:10: fatal error: 'linux/input-event-codes.h' file not found #include <linux/input-event-codes.h> ^~~~~~~~~~~~~~~~~~~~~~~~~~~
* swaybar: fix cursor scaleLibravatar Brian Ashworth2018-12-15
| | | | | | | | | | | | This fixes a few issues with swaybar's cursor scaling: 1. The cursor scale is now changed when the output scale changes 2. The cursor scale is no longer bound by the max output scale when swaybar is launched 3. Related to the previous item, the cursor is no longer tiny on low scale outputs after the max output scale has changed This also bumps up `wl_compositor` to version 4 to allow usage of `wl_surface_damage_buffer`.
* Add relative coordinates in JSON for i3bar click eventsLibravatar Hristo Venev2018-12-04
| | | | Compatibility with i3 commit 161db6f17d734ac9deb0a20e81b78d4b2a92ce68.
* swaybar: when scrolling, check that there are workspaces to scroll onLibravatar Ian Fan2018-10-25
|
* swaybar: fix scrolling behaviourLibravatar Ian Fan2018-10-25
| | | | | 1. wrap_scroll has been fixed 2. release bindings are checked when returning early
* swaybar: reverse order of workspaces listLibravatar Ian Fan2018-10-25
| | | | | This makes it congruent with its visual appearance, making it easier to reason about.
* missing headers for swaybar/input.cLibravatar ossi.ahosalmi2018-10-19
|
* swaybar: separate input code to new fileLibravatar Ian Fan2018-10-18