Commit Graph

182 Commits

Author SHA1 Message Date
jlo62 a31ff9d025
Merge 81cecd3b04 into 646019cad9 2024-04-24 12:21:29 +02:00
Simon Ser f2a0e81b24 Fetch input device vendor/product from libinput
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4582
2024-03-07 09:53:40 -05:00
llyyr 0b84d82b9a ipc: add `scratchpad_state` property to GET_TREE
See previous commit. This restores ipc parity with i3.
2024-02-29 00:51:43 +01:00
llyyr 2867ef646b ipc: add `floating` property to GET_TREE
i3 has had this property for over a decade but it wasn't documented
until a couple of years ago, so it was likely missed when developing
sway. Add the property to get us closer to ipc parity with i3.
2024-02-29 00:51:43 +01:00
jlo62 026b3a6324
Update ipc-json.c 2023-09-18 18:14:14 +02:00
jlo62 a441c20a46 Revert "Update ipc-json.c"
This reverts commit 48c0c0b9d6.
2023-09-18 18:03:14 +02:00
jlo62 db98bdd4d2 Revert "Update ipc-json.c"
This reverts commit 3149f533fe.
2023-09-18 18:02:56 +02:00
jlo62 3149f533fe
Update ipc-json.c 2023-09-18 12:37:18 +02:00
jlo62 48c0c0b9d6
Update ipc-json.c 2023-09-18 12:13:47 +02:00
jlo62 62266d5da7
Update ipc-json.c 2023-09-17 19:35:00 +02:00
Cezary Drożak c08762901e input/libinput: add scroll_button_lock method
Closes https://github.com/swaywm/sway/issues/6987

Co-authored-by: JJGadgets <git@jjgadgets.tech>
Co-authored-by: DeltaWhy <mike5713@gmail.com>
2023-06-16 15:30:04 +02:00
Simon Ser dee032d0a0 ipc: add LIBINPUT_CONFIG_ACCEL_PROFILE_CUSTOM entry
This was introduced in the last libinput release.

Fixes the following error:

    ../sway/ipc-json.c:928:17: error: enumeration value 'LIBINPUT_CONFIG_ACCEL_PROFILE_CUSTOM' not handled in switch [-Werror=switch]
      928 |                 switch (libinput_device_config_accel_get_profile(device)) {
          |                 ^~~~~~
2023-03-27 10:56:16 +02:00
Łukasz Adamczak fadfbe8dba Correct window_rect.y with hide_edge_borders
With `hide_edge_borders both` (or at least `vertical`),
`window_rect.y` will equal `border_thickness` for SOME windows,
but it will be 0 for windows adjacent to top screen edge.

Therefore setting it to `border_thickness` is not sufficient.

This commit changes it to the actual y offset of content
into the container.
2023-02-10 11:17:50 -07:00
Simon Ser e62299daa4 Make libinput backend optional 2022-11-28 13:28:15 -05:00
Simon Ser 717e9ef581 ipc: add view content type
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3599
2022-11-15 11:06:51 -05:00
pudiva chip líquida 7cc8ab6d6c Support libinput's 1.21 new dwtp option
Support the new dwtp (disable while trackpointing) option introduced in
libinput 1.21, allowing users to control whether the trackpoint (like
those in Thinkpads, but not only) should be disabled while using the
keyboard/touchpad.

See: https://gitlab.freedesktop.org/libinput/libinput/-/issues/731
2022-10-30 10:56:34 +01:00
Simon Ser f70d1e1b95 ipc: expose mode picture aspect ratio 2022-10-03 13:35:52 +02:00
Alex Maese 52f0e3a4d5 sway: add non-desktop outputs to json when running `swaymsg -t get_outputs` 2022-09-19 07:26:45 -04:00
Simon Ser aaa6c4ac89 ipc: drop WLR_OUTPUT_ADAPTIVE_SYNC_UNKNOWN case
This has been removed from wlroots.
2022-08-30 20:15:29 +02:00
Baltazár Radics a5a44ba95b ipc: make get_deco_rect check config->hide_lone_tab
Without this, the `IPC_GET_TREE` ipc call would return false information
about the container's `deco_rect` and `rect` properties if
`hide_edge_borders --i3` was in effect.
2022-07-26 12:06:10 +02:00
Simon Ser 11e05c5711 ipc: add "power" to output reply 2022-07-04 21:58:24 +03:00
Simon Ser 122d8ce954 Remove access to wlr_input_device union
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3626
Closes: https://github.com/swaywm/sway/issues/7077
2022-06-22 12:44:15 -04:00
Simon Ser d0b9bf94a5 Handle NULL output make/model/serial 2022-05-26 15:42:56 -04:00
Simon Ser f0d57da315 De-duplicate IPC output descriptions 2022-05-26 15:42:56 -04:00
Seth Barberee b8995ced8f [IPC] Add repeat delay/rate info to keyboard
Closes #6735

wlroots already has the info in the struct so let's access it and print it out.
2022-01-04 10:55:05 +01:00
Simon Ser 4832fc937f Update wlr_box includes
Update for the breaking change in [1].

[1]: https://github.com/swaywm/wlroots/pull/3011
2021-07-07 11:29:14 +02:00
Daniel Otero b997147284 config: Fix swaybar pango_markup inconsistency
Until now, swaybar did not have pango markup enabled by default, even if
the sway config had it on. This patch aims to mimic the i3 behavior, but
maintaining the functionality of the "pango_markup" sway config command.
2021-06-03 14:18:23 +02:00
Erik Reider d65e67face Added scroll_factor input variable to ipc output 2021-05-05 19:50:15 +02:00
Kenny Levinsen a047b5ee4a container: Move pending state to state struct
Pending state is currently inlined directly in the container struct,
while the current state is in a state struct. A side-effect of this is
that it is not immediately obvious that pending double-buffered state is
accessed, nor is it obvious what state is double-buffered.

Instead, use the state struct for both current and pending.
2021-02-16 22:05:00 -05:00
Jan Palus b944735b47 Align ordering of core node properties with i3
Try to better mimic JSON node structure produced by i3 which might be
relied on by already existing tools. In particular having "type" right
after "id" is quite handy for streaming high-performance JSON parsers
such as simdjson (which are handy for maintaining responsiveness on
resource constrained systems).

refer ab2a22a78b/src/ipc.c (L338)
2021-02-15 18:14:27 -05:00
Tarmack 989123a2a5 Add support for workspace_min_width bar option. 2020-10-11 19:12:42 +02:00
Antonin Décimo bbf7b92fe4 Fix incorrect format specifiers 2020-07-30 22:02:42 -04:00
Jason Nader 45859be03f i3-compat: add GET_BINDING_STATE IPC command 2020-06-14 00:55:14 -04:00
Damien Tardy-Panis 0cbd26f0da Add views idle inhibition status in get_tree output
Fixes #5286
2020-05-29 17:29:41 -04:00
Tudor Brindus 6f7b548589 ipc: invert output transformation when necessary
After swaywm/wlroots#2023, #4996 inverted configuration transformations.
For consistency, we should undo (double-apply) the inversion when
communicating via IPC.

Closes #5356.
2020-05-28 09:49:10 +02:00
lbonn 848a6fdb21 ipc: show marks of containers without view in tree 2020-05-22 08:21:22 +02:00
Thomas Hebb f18bcfcd69 Add each view's shell to JSON description
This is a criteria you can use to select windows since commit
484cc189e9 ("Add shell criteria token"), but there's no way to query
it for an existing window. This exposes its value in the output of
`swaymsg -t get_tree`.
2020-04-27 20:37:57 -04:00
Jason Nader 50dc49f35a Limit workspace numbers within 0..INT32_MAX
See 83c7aff089
2020-03-12 19:43:45 -04:00
Ian Fan 28e3187df1 ipc: add missing required properties 2020-03-10 15:55:54 +01:00
Simon Ser a2d49099e1 Add adaptive_sync_status to output IPC reply 2020-03-07 00:32:04 +01:00
Jason Nader d2cab83833 i3compat: add `window_type` to IPC response
i3 added these in i3/i3#3797
2020-02-17 21:58:05 +01:00
Jason Nader 8608a1c38b i3compat: add `window_type` to IPC response
i3 added these in i3/i3#3797
2020-02-17 21:58:05 +01:00
Ronan Pigott 33fc9c5f1f ipc-json: Remove unnecessary dereference 2020-01-16 16:15:50 +01:00
Ronan Pigott 6968fb3123 add scale_filter output config option 2019-11-29 18:13:37 +01:00
Ivan Molodetskikh 7f8a47855c Add max_render_time to view JSON 2019-11-17 20:18:42 +01:00
Ivan Molodetskikh fe84ec2f24 Add max_render_time to output JSON 2019-11-17 20:18:42 +01:00
Sergei Dolgov a5c6816095 calibration_matrix: add the current matrix to the IPC description for libinput devices 2019-07-05 18:41:56 +03:00
Simon Ser 84e4061bf4 ipc: add xkb_layout_names and xkb_active_layout_index
These can be useful to implement per-window layouts as a script.

See https://github.com/swaywm/sway/issues/2361
2019-06-09 15:04:50 -04:00
Josef Gajdusek 2c6a10c4ba Provide current DPMS state in GET_OUTPUTS 2019-05-28 22:43:11 -04:00
Ranieri Althoff fd6903673b Send disabled output available modes on IPC get_outputs
- Also fix missing trailing newline on pretty print

Signed-off-by: Ranieri Althoff <1993083+ranisalt@users.noreply.github.com>
2019-04-16 00:16:20 -04:00