weston-terminal uses RLE (U+202B) as a placeholder of the right half
of a double width character. However, not all fonts include this
glyph and cairo renders it as .notdef (glyph index 0) in that case.
When resizing the terminal, it shows the grid size in the titlebar.
We reset the title next time we get an enter event. This patch makes
sure we only reset the title the first time we enter after a resize.
Handles potential out of memory situation by skipping the title update.
This fixes the following warning:
terminal.c: In function ‘resize_handler’:
terminal.c:851:11: warning: ignoring return value of ‘asprintf’,
declared with attribute warn_unused_result [-Wunused-result]
Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
We used to only update it on newline, which breaks when somebody moves
the cursor below terminal->end and writes stuff. Instead update it whenever
we write a character to the terminal.
https://bugs.freedesktop.org/show_bug.cgi?id=71935
It seems that this was only used by the popup menu infrastructure,
which can handle this all on its own. Implementing e.g. transients
in the future can be done with a simple xdg_shell_set_transient_for.
We don't have a reliable way to know when to clear this indicator.
Typically the pointer will still be over the window when the resize is
done and we'll get an enter event, but if the window sets a max size
the pointer may be over another window when the resize is done.
We'll need a new wl_shell (or more likely xdg_shell) event for this.
As some CJK fonts are dual-width, calculate the average width of ASCII
glyphs and use that instead of the max_x_advance of the font. This is
what VTE does too.
https://bugs.freedesktop.org/show_bug.cgi?id=63796
This set of changes adds support for searching for a given config file
in the directories listed in $XDG_CONFIG_DIRS if it wasn't found in
$XDG_CONFIG_HOME or ~/.config. This allows packages to install custom
config files in /etc/xdg/weston, for example, thus allowing them to
avoid dealing with home directories.
To avoid a TOCTOU race the config file is actually open()ed during the
search. Its file descriptor is returned and stored in the compositor
for later use when performing subsequent config file parses.
Signed-off-by: Ossama Othman <ossama.othman@intel.com>
To reproduce, launch the terminal, open a second window using Ctrl-Shift-N,
go back to the first window, and press Ctrl-D. The terminal's master FD gets
events even after being closed, causing terminal_destroy to be called twice
on the same object.
To fix this, I'm adding a function to stop watching an FD.
XKB provides keypad symbols in a separate namespace. We don't care
about the distinction, so map them to normal symbols before starting
processing.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
We default to setting the minimum size to the initial size. To set a
different minimum size than the initial size, set the minimum size first
then then initial size. Good enough for a toy toolkit.
https://bugs.freedesktop.org/show_bug.cgi?id=50263
Emacs uses tab and backspace to move the cursor as well as the regular
cursor movement escape codes. When it's less bytes than the escape code,
emacs will use a tab or tab + backspace to move the cursor forward. The
effect is that as you're moving around in the buffer, emacs will
(seemingly) randomly insert spaces and overwrite what's in the terminal.
Making tab just move the cursor as it should fixes this.