Kristian Høgsberg
a83be20d7f
terminal: Show character grid size in header bar when resizing
...
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.
11 years ago
Kristian Høgsberg
67b8215bcb
terminal: Add context menu with new terminal/copy/paste
11 years ago
Kristian Høgsberg
14f39b290b
terminal: Add scroll-back history
...
Ctrl-Shift-UP/DOWN to scroll through the history.
11 years ago
Jason Ekstrand
ee7fefcffc
Rename frame_create and frame_set_child_size with a window_ prefix
...
This is to avoid a collision with an actual frame structure.
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
11 years ago
Kristian Høgsberg
1abe0486bb
config-parser: Make weston_config_parse() tkae a file name
...
Take a basename of the config file to parse instead of an fd.
11 years ago
Kristian Høgsberg
9c3dee18ce
terminal: Port to new weston_config parse
11 years ago
José Bollo
4a4704a7d0
Minor improvement of weston-terminal resizing
11 years ago
Kristian Høgsberg
8a20500847
terminal: Stop complaining about OSC escape code 7
...
This is the current working directory of the shell as an URI. We
don't use that for anythign at the moment, but let's not complain
about it at least.
11 years ago
Kristian Høgsberg
0749e3f470
terminal: Accept utf-8 text drop
11 years ago
Kristian Høgsberg
0b36d9780f
terminal: Include config.h instead of defining _XOPEN_SOURCE
12 years ago
Peng Wu
cfcc111070
Fixes CJK wide character display
...
By jumping two columns when wide character prints,
and draw wide background under wide character.
12 years ago
Kristian Høgsberg
3e125830a5
terminal: Make utf-8 state machine assemble unicode code point value
12 years ago
Brian Lovin
1bf14815ef
terminal.c: Check if fdopen() fails
...
If fdopen() fails we just close the fd and return, failing
the copy-and-paste.
Signed-off-by: Brian Lovin <brian.j.lovin@intel.com>
12 years ago
Peter Hutterer
f3d62276d2
malloc + memset -> zalloc
...
And for clients using the xmalloc helper, use xzalloc.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
12 years ago
Brian Lovin
bc91926e0c
clients: use xmalloc in more places
...
For the clients continue to use xmalloc() to simplify OOM-handling.
Signed-off-by: Brian Lovin <brian.j.lovin@intel.com>
12 years ago
Peng Wu
f291f20553
Use the average width of ASCII glyphs for cell width
...
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
12 years ago
Alexander Larsson
de79dd0485
terminal: Handle output transform
...
We pick the highest scale of any output the terminal is on, and the
transform from the last one it entered.
12 years ago
Ossama Othman
a50e6e4c50
config-parser: Honor XDG_CONFIG_DIRS
...
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>
12 years ago
Kristian Høgsberg
4172f668e7
Pass argc pointer to parse_options()
...
This lets us keep argc up to date as the backend picks out arguments
from the argv array.
12 years ago
Dima Ryazanov
d20fd4db60
terminal: Handle the window close event
...
There may be multiple windows open, so destroy the terminal instead of exiting.
Signed-off-by: Dima Ryazanov <dima@gmail.com>
12 years ago
Dima Ryazanov
a85292e73c
Fix a crash when opening two terminal windows and closing the first one.
...
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.
12 years ago
Daniel Stone
a84687174c
Terminal: Handle keypad symbols
...
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>
12 years ago
Kristian Høgsberg
b36f7ef99e
terminal: Don't snap resize if we're maximized
...
We allow fullscreen to fill the requested size, do the same for maximize.
12 years ago
Kristian Høgsberg
b7ed4cbbc7
terminal: Use window_get_fullscreen() instead of tracking that state manually
12 years ago
Philipp Brüschweiler
fdb4b02501
terminal: support entering non-ascii characters
...
Unless the alt modifier is active and the MODE_ALT_SENDS_ESC mode is not
set, any value over 127 is converted to a UTF8 sequence.
Part of https://bugs.freedesktop.org/show_bug.cgi?id=53648 should be
fixed with this.
Part of https://bugs.freedesktop.org/show_bug.cgi?id=52419 is fixed, but
interestingly it depends on the activated keymap (i.e. it works with
dvorak, but not with ch).
12 years ago
Kristian Høgsberg
86adef9d54
window.c: Handle multiple keyboard foci
...
Keep a count of number of wl_keyboard focus we have instead of
tracking the more recent wl_keyboard.
13 years ago
Andre Heider
552d12b10e
terminal: Don't crash on non-ascii chars
...
isalpha() and isdigit() don't like huge values.
Noticed with ascii-art in the shell prompt.
13 years ago
Kristian Høgsberg
2a1aa4efce
terminal: Don't output @ for ASCII NUL
...
Fixes visual bell in screen.
13 years ago
Kristian Høgsberg
67ace20f8e
window.c: Add fullscreen handler to keep fullscreen state consistent
13 years ago
Kristian Høgsberg
d3a1965a3d
clients: Implement minimum size for toy toolkit clients
...
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
13 years ago
Kristian Høgsberg
0fe782bdb5
terminal: Extend selection to end of line when selecting past last char
13 years ago
Kristian Høgsberg
0dee6475bd
terminal: Insert newlines when copying multiple lines
13 years ago
Kristian Høgsberg
8268d41410
terminal: Handle selection for pointer positions outside widget correctly
...
That is, don't crash and select entire first/last line when the pointer
is above or below widget.
13 years ago
Kristian Høgsberg
29784402e1
terminal: Add a terminal enter handler for setting I-beam cursor
...
Now that the mod+click shortcuts change the cursor, this was suddenly obvious.
13 years ago
Kristian Høgsberg
18e928dfb8
terminal: Scroll selection with terminal contents
13 years ago
Kristian Høgsberg
38912df847
terminal: Make font size configurable
13 years ago
Kristian Høgsberg
333db0a17e
terminal: Implement word and line based selection
...
Double-click to select by word, triple click to select by line.
13 years ago
Kristian Høgsberg
129decbdf7
terminal: Tab should not output spaces, just move cursor
...
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.
13 years ago
Kristian Høgsberg
22fbcf7183
terminal: Ignore more modifier keys
...
Don't want these to leak into the terminal.
13 years ago
Kristian Høgsberg
b24ab806bf
terminal: Only hide cursor for keypresses that generate data for the process
13 years ago
Kristian Høgsberg
88fd40815a
terminal: Only hide cursor on first key-press in a repeat sequence
...
Otherwise moving the pointer while holding a key down will flicker.
13 years ago
Kristian Høgsberg
ae9e073ac5
terminal: Support both Alt and Control modifiers for regular keys
13 years ago
Kristian Høgsberg
b7f94bff3d
terminal: Handle Alt-Backspace
13 years ago
Kristian Høgsberg
63b298f3c7
terminal: Set blank cursor on keyboard press
...
This way we can better see the contents of the terminal. Show cursor again
on pointer motion.
13 years ago
Kristian Høgsberg
b21fb9f61e
terminal: Add Ctrl-Shift-N keyboard binding to open new window
13 years ago
Kristian Høgsberg
de845cfcc0
terminal: Default terminal type to xterm
...
We add an option to configure the terminal type so it's still possible to
get xterm-256color.
13 years ago
Kristian Høgsberg
71a4cf4374
terminal: Send ASCII DEL on for backspace
13 years ago
Kristian Høgsberg
a1627927c7
window: Compute initial window size correctly
...
We didn't take decoration size into account before.
13 years ago
Kristian Høgsberg
e828e904b5
terminal: Track down remaining unhandled xterm-256color escape codes
13 years ago
Kristian Høgsberg
cca3c2f9da
terminal: Fix tab expansion
13 years ago