Age | Commit message (Collapse) | Author | Files | Lines |
|
We should use library-logging in uterm to avoid cluttering stderr for
applications. Hence, use llog instead of log directly.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
|
This adds an --xkb-keymap <FILE> option to kmscon. When given, kmscon
will try to compile the keymap from the file before trying the other
options (like the XkbKeymap option in xorg.conf).
This is useful for users who have a customized XKB keymap, which is
usually kept in a single file. Example, in X:
xkbcomp $DISPLAY my_keymap.xkb
Customize my_keymap.xkb to your liking, and then in .xinitrc, or
xorg.conf:
xkbcomp my_keymap.xkb $DISPLAY
Now you can also do this in kmscon.conf.
Additionally, lacking such an option, kmscon is quite difficult to use
without an installed xkeyboard-config package, which provides the
infrastructure for the "rules" configuration mechanism. We might even
want to distribute some plain xkb file as a last ditch, for
robustness, if even the default RMLVO fails... without a keyboard a
terminal is not very useful.
(changed Ran's patch to use *_from_string() instead of *_from_file())
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
|
log.h was moved to shl so use it in all tests.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
|
We added llog-data pointers so fix the tests helpers to set it to NULL by
default.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
|
|
This renames the video-drm backend to drm3d (which was already used
internally). This is a pure rename, the code-logic stays the same.
This also puts the drm3d backend into a module so we can more easily
load it during runtime.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
|
|
This moves all the drm-dumb code into a new module that is now called
drm2d (which was already used internally before).
No conceptual changes, just renames and moves.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
|
|
Internally, we already support immediate buffer-swaps but this hasn't been
exported in the API. This patch adds an "immediate" argument that causes
the flip to be immediate and not synchronized with vertical-blanks.
Please note that this might block if there is a pending page-flip.
However, this is mostly a delay of 16ms so we can ignore it as this is
acceptable if you want immediate swaps while there is still a
pending-buffer.
You can listen for the UTERM_PAGE_FLIP event if you don't want this
behavior.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
|
|
These tests still use uterm.h which builds fine if you have an old uterm
version installed, however, with a new version this will fail horribly.
Hence, fix them to use the new headers.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
|
|
If we run in listen mode, we are supposed to take over a seat. If a seat
supports VTs (like kernel VTs or kmscon cdev fake VTs) we assume that
there is some manager for these VTs (the one who created them). Therefore,
there is no need to run kmscon in listen mode on these seats. Instead, you
should run kmscon in default mode on these seats.
We enforce this limitation because if the VT-master on those seats dies
and causes a HUP, they have no way to notify us when they startup again.
Therefore, this kind of setup is broken. Furthermore, no-one would every
want such setups.
Instead use the startup mechanism of the VT/seat-manager to start kmscon
in default mode on those seats.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
|
|
uterm_screen is scheduled for removal so use the display API directly.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
|
|
This has the same effect as for kmscon but is disabled by default.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
|
|
This new option allows specifying a path to the VT that should be used.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
|
|
The log-subsystem adds these automatically so we shouldn't use them.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
|
|
We cannot allocate VT objects without an associated input object.
Therefore, allocate a dummy device with no input devices assigned to it
and use it for the test-vt object.
Note that this makes switching from/to this VT via command-line
impossible.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
|
|
This option now allows the user to change the XkbModel from the command
line or configuration file.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
|
|
I forgot again to keep these up to date. The conf-layer updates broke them
horribly. However, we now build them correctly without kmscon-core by
including all required layers directly.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
|
|
libxkbcommon has a configure option to set the default values for the
RMLVO's (if they are passed as NULL or "" - we use "" so it'd be safe to
print). If they are not specified there, it's just "us" like we currently
do have. But if they are specified, we should most likely defer to it.
We do the same for the model field, instead of hardcoding "evdev". The
rules field remains hardcoded to "evdev", because we rely on it when
doing the evdev scancode-to-keycode +8 mapping.
Signed-off-by: Ran Benita <ran234@gmail.com>
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
|
|
We removed a lot of helpers from uterm-input because XKB is now a
mandatory dependency. So use it directly from test_input to avoid all the
uterm helpers.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
|
|
We dropped unused modifiers so we have to fix test_input not to print them
out.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
|
|
The getty variants out there (including agetty) require an relative path
to the /dev directory as argument. This is really odd but we want to be
backwards-compatible to them so we allow this, too.
--vt now accepts:
* A positive number which is internally converted into /dev/ttyXY
* A string that does not start with '/' or '.' which is interpreted
relative to /dev as /dev/%s
* Everything else is interpreted as path
This option still selects only the TTY on seat0. On all other seats we do
not use controlling TTYs.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
|
|
We changed the uterm API so we need to fix this test again.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
|
|
We sometimes need to test what keys a client receives when specific keys
are pressed. This small helper simply runs in a terminal and receives raw
keyboard input and prints it to stdout with debugging information.
This can definitely be improved with the help of the TSM state-machine to
print more useful information and directly parse the input. However, this
is better than nothing.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
|
|
This still uses the old VT API which now fails as we added a new
parameter. As a side-effect, this test will not work if used on a VT-less
system or on a seat without VTs. But we actually don't care, yet, as any
other VT-replacement isn't really production-ready, yet.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
|
|
The --dev parameter is used to specify the device that is used for
testing.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
|
|
This allows the tests to have their own command-line parsers. Finally!
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
|
|
This removes the currently non-working OpenGL test and always uses the
blitting functions.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
|
|
When opengl rendering is not available on the target device, we now fall
back to software rendering. Instead of drawing a nice gradient we now draw
a white screen to the target device to avoid heavy calculations.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
|
|
Since we moved to a runtime backend system for the input subsystem, we
cannot access the internal keysym_to_string() helpers anymore. Hence, use
the recently introduced uterm-input forwarding helper.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
|
|
Whoops, I totally forgot about them. Fix the headers to be compatible with
eloop again.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
|
|
Print keysym even if we have a UCS4 representation. This makes debugging
keyboard issues much easier. Also increase buffer size to 32 as there are
many symbols longer than 16 characters.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
|
|
Both dumb and xkb don't actually need the kbd_dev for that. The dumb
backend already omits the "dev".
Signed-off-by: Ran Benita <ran234@gmail.com>
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
|
|
Use uterm vt master to allocate an VT on seat0 for testing purposes.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
|
|
We now support multiple GL contexts in uterm so we need to explicitely
enable them before using them.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
|
|
Use new uterm_video constructor. This requires hard-coding the DRM card
but this is needed until we use the uterm_monitor interface.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
|
|
Use new uterm_monitor and input API instead.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
|
|
test_input compiles again and uses the same helpers as the other tests do.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
|
|
test_buffer and test_terminal no longer compile and are not needed so
remove them.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
|
|
test_vt now compiles again and uses the new infrastructure.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
|
|
This test doesn't compile and is no longer needed. We can now use the
kmscon program or test_terminal for the same functionality.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
|
|
Instead of accepting a list of outputs we now enable all outputs when
testing the video subsystem.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
|
|
The new eloop implementation allows to run the eloop for a fixed amount of
time. Use this instead of sleeping for 5s which would prevent us from
catching signals as the eloop blocks them in favor of signalfd.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
|
|
The test_include.h header now provides the basic initialization that will
later be used in all other tests. This allows us to use the same
program-parameters that kmscon uses and makes sure everything is
initialized properly before we run the tests.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
|
|
It will be replaced by the event loop signal handler.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
|
|
A symbol table should never be created twice therefore we can make it
static and global. We add locks so it is totally thread-safe, too.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
|
|
Parse command line arguments so the input subsystem recognizes the XKB
values.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
|
|
We should use the enum type instead of plain "int" to be more verbose
here.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
|
|
This fixes all compositor/output/context/etc. uses and replaces them by
the new uterm API.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
|
|
Convert the test_output test to use the new subsystems.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
|
|
The long "kmscon_" prefix is horrible so move everything to "ev_" now.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
|
|
config.h is meant to be around in all files, as it contains stuff like
_GNU_SOURCE, NDEBUG and HAVE_*.
Make these definitions available without needing to #include config.h
every single time.
Signed-off-by: Ran Benita <ran234@gmail.com>
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
|