For a builddir called 'builddir', the following commands are sufficient now:
meson builddir
ninja -C builddir
sudo ninja -C builddir install
Meson only needs to be run once after checkout or after the removal of the
builddir.
Fixes https://github.com/libratbag/libratbag/issues/142
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Prep work for meson, even though we'll eventuall drop the env bit. This just
removes the extra symbols-leak-test.in step.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Always build the tests, if someone doesn't want it disable it with a configure
flag but at least be explicit about it.
Justification: any developer should build the full stack as intended by
default. Distributions may disable bits and pieces, but they shouldn't rely on
auto-detection to figure it out, they should explicity disable those bits they
don't want.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Always build the documentation, if someone doesn't want it disable it with a
configure flag but at least be explicit about it.
Justification: any developer should build the full stack as intended by
default. Distributions may disable bits and pieces, but they shouldn't rely on
auto-detection to figure it out, they should explicity disable those bits they
don't want.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
And use this to start using C99 variable style, for pure loop variables it's
better to have them declared in the loop itself.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
../tools/shared.c:132:1: warning: ‘static’ is not at beginning of declaration [-Wold-style-declaration]
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
driver-gskill.c: In function ‘gskill_read_button’:
driver-gskill.c:791:3: warning: ‘event_data’ may be used uninitialized in this function [-Wmaybe-uninitialized]
ratbag_button_macro_set_event(macro, event_idx, type,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
event_data);
~~~~~~~~~~~
driver-gskill.c:791:3: warning: ‘type’ may be used uninitialized in this function [-Wmaybe-uninitialized]
ratbag_button_macro_set_event(macro, event_idx, type,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
event_data);
~~~~~~~~~~~
Add a default case which should never get reached.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Apparently the mouse can be configured to send scancodes
for buttons 6-9.
Note: there's no meaning attached to scancode 0x118 in the kernel,
which is sent by button 9, but xev does detect it.
I fixed resolution cycle up actually being resultion cycle down and added the missing cycle actions for resolutions and profiles.
Signed-off-by: Clément Vuchener <clement.vuchener@gmail.com>
Supports the common functionality exposed by libratbag:
- selecting profile 1-3 (profiles cannot be disabled)
- selecting resolution 1-4 (can also not be disabled)
- report frequency
- default resolution per profile
- button actions: mouse button numbers or key+modifier
(modifiers are just a bit field and can easly be set
in the driver, but not included as libratbag does not
support it yet)
- LEDs are not yet hooked up but are just a table of 7
different predifined colors.
- Seting active profile and resolution are both implemented
but only profile activation is in use. The resolution
activation code is commented until supported from libratbag
itself.
The G300 has an unusual way of numbering buttons:
Left:1, Right:2, Middle: 3
The purpose of report type 0xF2 is not known.
In hidpp10_get_hidpp_notifications(), we want all three bytes from
parameters[], not parameters[0] twice. This matches
hidpp10_set_hidpp_notifications().
Signed-off-by: Stephen Kitt <skitt@redhat.com>
This is especially important for the mx780, so we can get rid of the
rude workaround we currently have in the driver for it.
Signed-off-by: Lyude <lyude@redhat.com>
Changes since v1:
- Just have profile enable/disable in ratbag-command
- Use bool instead of int
Changes since v2:
- Remove leftover function, whoops
- Fix leftover ints to bools
- Lots of style fixes
Make sure that there can only be one resolution marked
as default.
The previous code allowed to set multiple resolutions
as default. To clean up any bad state we allways loop
all other resolutions and unset the default if neccesary.
Only managed to notice then while working on enabling/disabling
profiles. Somewhere down the line the encoding we pass to
ratbag_utf8_to_enc() managed to get typoed, causing it to actually fail
and not show anything because of the iconv helpers not returning
negative error codes.
After learning that just using this mouse was not the greatest way of
figuring out whether or not the iconv helpers worked, I decided to
write a few simple tests to ensure silly things like this don't happen
again.
Changes since v1:
- fix indentation
- Fix year in copyright on test-iconv-helper.c
- Use an encoding that's definitely invalid for the
iconv_invalid_encoding test
- Add tests for a bunch of bad utf16le strings
- Add tests for converting emojis to/from utf16le. Just so we have some
actually multibyte characters in here.