tsm: screen: add flag to select alternate screen buffer
The VTE layer can now set the TSM_SCREEN_ALTERNATE flag to switch to the alternate screen-buffer and back. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
parent
e23b9d0090
commit
abd4764199
@ -869,18 +869,30 @@ void tsm_screen_reset(struct tsm_screen *con)
|
||||
|
||||
void tsm_screen_set_flags(struct tsm_screen *con, unsigned int flags)
|
||||
{
|
||||
unsigned int old;
|
||||
|
||||
if (!con || !flags)
|
||||
return;
|
||||
|
||||
old = con->flags;
|
||||
con->flags |= flags;
|
||||
|
||||
if (!(old & TSM_SCREEN_ALTERNATE) && (flags & TSM_SCREEN_ALTERNATE))
|
||||
con->lines = con->alt_lines;
|
||||
}
|
||||
|
||||
void tsm_screen_reset_flags(struct tsm_screen *con, unsigned int flags)
|
||||
{
|
||||
unsigned int old;
|
||||
|
||||
if (!con || !flags)
|
||||
return;
|
||||
|
||||
old = con->flags;
|
||||
con->flags &= ~flags;
|
||||
|
||||
if ((old & TSM_SCREEN_ALTERNATE) && (flags & TSM_SCREEN_ALTERNATE))
|
||||
con->lines = con->main_lines;
|
||||
}
|
||||
|
||||
unsigned int tsm_screen_get_flags(struct tsm_screen *con)
|
||||
|
@ -71,6 +71,7 @@ typedef void (*tsm_log_t) (const char *file,
|
||||
#define TSM_SCREEN_INVERSE 0x08
|
||||
#define TSM_SCREEN_HIDE_CURSOR 0x10
|
||||
#define TSM_SCREEN_FIXED_POS 0x20
|
||||
#define TSM_SCREEN_ALTERNATE 0x40
|
||||
|
||||
#define TSM_SCREEN_OPT_RENDER_TIMING 0x01
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user