Commit graph

12 commits

Author SHA1 Message Date
Delgan
b85ba99980 Apply "clang-format" preferences globally 2024-04-07 10:05:10 +02:00
Daniel Eklöf
3ca274759a
module: const:ify ‘module’ argument to module->description() 2022-12-14 12:05:17 +01:00
Timur Celik
24a3b90a01
modules: Implement workspace move event
Implementing the move event required to pass the IPC socket to
`i3_ipc_callback_t`, because we won't get notified about any visibility
changes of other workspaces.  That's why we query all workspaces again
after a focused workspace was moved.
2022-12-13 16:21:55 +01:00
Daniel Eklöf
028011a816
module/sway-xkb: don’t add the “same” device multiple times
Not sure if Sway bug or not, but we’ve seen Sway presenting multiple
input devices with the exact same ID (and nothing else differentiating
them).

This caused a crash in the sway-xkb module, since we didn’t check if
we were already tracking the device, and thus bumped the
“num_existing_inputs” variable multiple times for the same input
object.

This lead to a content() returning an array with uninitialized
elements, and thus a crash.

Closes #229
2022-10-04 21:16:56 +02:00
Daniel Eklöf
f4ceaaad52
module/sway-xkb: handle device being added again
If a device is removed while the computer is hibernating, and then
reconnected after waking it up, Sway sends an “added” event without
first sending a “removed” event.

Yambar used to assert that an “added” event didn’t refer to an already
tracked device.

This patch changes this, and simply ignores duplicate “added” events.

Closes #177
2022-06-03 19:37:52 +02:00
Daniel Eklöf
4bb81e8940
modules: add SOCK_CLOEXEC to all socket() calls 2022-03-29 18:21:13 +02:00
Daniel Eklöf
f166bbbf54
modules: verify: use conf_verify_unsigned() for options that should be >= 0 2021-11-15 18:17:29 +01:00
Daniel Eklöf
1079bca3eb
Silence “variable length array bound evaluates to non-positive value 0” 2021-08-26 13:27:29 +02:00
Daniel Eklöf
ed2b8c4874
modules: implement description() 2021-06-20 21:15:24 +02:00
Daniel Eklöf
8153e40f2a
module/sway-xkb: ignore non-keyboards in input event handler
This is already being done in the initial query response. Not doing it
in the input event handler too leads to an assertion if there are
multiple devices with the same ID.

Hopefully fixes #54
2021-06-01 17:40:59 +02:00
Daniel Eklöf
463f1ea75d
module/sway-xkb: ignore non-keyboard inputs
Closes #51
2021-05-26 21:11:53 +02:00
Daniel Eklöf
fef40d18e1
module/sway-xkb: fix name of .so file, fixes load failures when built as shared module 2020-11-25 20:41:09 +01:00
Renamed from modules/sway_xkb.c (Browse further)