12 Commits

Author SHA1 Message Date
David Herrmann
b194ba8340 tsm: vte: implement alternate-screen modes
On DECSET 47, 1047-1049 we switch between normal screen mode and alternate
screen mode. xterm and friends support a titeInhibit resource that
disables this feature, so we add a flag to set this, too. However, there
is currently no way to set this on the command-line. If someone needs
that, we can easily add that.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-10-11 12:17:20 +02:00
David Herrmann
33ebc01441 tsm: vte: use ASCII keysyms for ctrl+<XY> shortcuts
If a user has multiple active XKB layouts but only one of them has ASCII
keysyms on the base level, then ctrl+<XY> might actually never work,
because these keys aren't available in the current layout. This patch
tries to find a layout of the user that actually _has_ ascii keysyms on
the base level and passes this information along with the normal keysym
information.

The TSM layer can now use this ascii keysym instead of the normal unicode
keysym to handle ctrl+<XY> shortcuts. This is the same way xterm et. al.
handle this, so it seems to be a good idea to do this in TSM, too.

Reported (and mainly written) by Ran Benita.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-10-09 12:30:40 +02:00
David Herrmann
6bf4723b04 terminal: perform hard-reset on exit
Before starting a pty on a terminal, we now perform a hard-reset to avoid
any left-overs from the previous pty.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-10-02 13:02:44 +02:00
David Herrmann
79ef4f9505 Move grab-parsing into conf.c
We really need to clean this up and allow parsing of grabs in conf.c
again. xkbcommon is now mandatory so we can fix all the input layers to
use it.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-10-01 11:23:21 +02:00
David Herrmann
54064096d2 tsm: vte: be less verbose about unhandled escapes
This converts a warning into a debug message to avoid spending too much
time in the logger when parsing unknown content. This speeds up "cat
/dev/urandom" by like 1000x.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-27 18:57:50 +02:00
David Herrmann
f9de068a09 build: update autotools logic and add "wlterm" application
Sorry for the big commit, but I was working on the wlterm application and
then thought I can rework the whole configure-logic again. This mainly
renames all build-defines to BUILD_DEFINE_* and BUILD_HAVE_* and allows
specifying which applications to build via --enable-kmscon/--enable-wlterm
and similar.

wlterm is a new application which is a native wayland client with no
external dependencies. It serves several purposes:
  * It uses TSM (not yet implemented, but will come soon) to create a
    console independent from kmscon. This shows how TSM can easily be used
    to create independent terminal emulators.
  * It is a native wayland application (probably the first independent
    wayland app so far?) and is used to test how well the wayland API
    works. As wayland is still under heavy development, we need more
    application-writers who report back whether the wayland-API makes
    sense to them and whether it works correctly.
  * A proper terminal-emulator for wayland! There is currently no proper
    emulator so we really need something that we can work with.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-26 18:56:41 +02:00
David Herrmann
e1f04b12ab tsm: vte: send original VT220 escape codes for Shift+F1 to F12
Nearly all terminals behave differently regarding Shift+FX keys. We now
mimic the behavior of the classic VT220 instead of the new-style function
keys. Nearly all applications expect the old codes.

This might be changed in the future, though. It does make much more sense
to send the new codes as they provide more information to the application.
And remappings should be done via XKB instead of inside of kmscon.
However, as long as xkbcommon does not have a config-file, we will be
stuck with this little hack.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-19 20:27:48 +02:00
David Herrmann
a1a590dd47 tsm: vte: convert to use llog
Instead of using kmscon log_* functions, we now use the independent llog
subsystem.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-18 19:21:28 +02:00
David Herrmann
a0a8be1c0a tsm: vte: introduce own modifiers
We do not want to depend on uterm just for the modifiers so introduce new
modifier-names which are in-sync with the UTERM names.

Inside of kmscon we still use the UTERM names everywhere, but inside of
TSM we now rely on the new names.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-18 17:36:29 +02:00
David Herrmann
1d764ebfbc tsm: add *_set_palette() helper
Instead of accessing kmscon-state we now add a helper to select the
palette and make the terminal-subsystem use it on initialization.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-18 17:25:34 +02:00
David Herrmann
62e720e069 tsm: vte: rename kmscon_vte object to tsm_vte
Perform final rename of the remaining vte objects.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-18 16:59:39 +02:00
David Herrmann
67cd0ef3a7 tsm: rename files
Rename all TSM files to have a tsm_* prefix.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-18 16:54:25 +02:00