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).
13 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
Kristian Høgsberg
82cd36bfff
terminal: Make terminal font configurable from command line and weston.ini
13 years ago
Alexander Preisinger
e2b88c093a
Add minimum size for terminal
...
At the moment the terminal can a negativ size and resizing it can create
some artifacts.
13 years ago
Kristian Høgsberg
fee91be586
terminal: Use serial, not timestamp for setting the selection
13 years ago
Daniel Stone
c9785eacca
Use enum wl_keyboard_key_state instead of integer
...
Instead of using a uint32_t for state everywhere (except on the wire,
where that's still the call signature), use the new
wl_keyboard_key_state enum, and explicit comparisons.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
13 years ago
Daniel Stone
4dbadb1556
Use enum wl_pointer_button_state instead of integer
...
Instead of using a uint32_t for state everywhere (except on the wire,
where that's still the call signature), use the new
wl_pointer_button_state enum, and explicit comparisons.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
13 years ago
Scott Moreau
7a1b32a198
Implement text cursor position protocol.
...
Here we create a new client/compositor interface in weston to allow
clients to report their x/y cursor position to the compositor. These
values are then used to center the zoom area on this point. This
is useful for everyone, especially people who are visually impaired.
13 years ago
David Herrmann
a6128d6183
terminal: add glyphs to character list
...
This adds the actual glyphs/utf-8 characters to the comments of CS_SPECIAL
(DEC special graphics set). They all work on my system with "Monospace" or
"Bitstream" font. But keep the mnemonics so if the UTF8 characters are not
displayed correctly, the comments are still readable.
I don't know if gcc actually reads data as UTF-8 or if C code actually
allows all UTF8 characters. However, unless it reads as "*/" in ASCII, it
shouldn't matter inside of comments.
Anyway, it compiles fine with gcc-4.7.0/amd64 here.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
13 years ago
David Herrmann
516b9e1753
terminal: fix up horizontal scan-line characters
...
The DEC special graphics set defines entries 0x6f to 0x73 to be:
Horizontal Scan Line 1
Horizontal Scan Line 3
Horizontal Scan Line 5
Horizontal Scan Line 7
Horizontal Scan Line 9
However, the first Unicode drafts included only Scan-Line 5. Since
Unicode-3.2 the other Scan-Lines were added and are available in most
Unicode fonts now.
The codes are listed here:
http://www.fileformat.info/info/unicode/block/miscellaneous_technical/images.htm?start=9089
Or more precisely:
Scan 1: http://www.fileformat.info/info/unicode/char/23ba/index.htm
Scan 3: http://www.fileformat.info/info/unicode/char/23bb/index.htm
Scan 7: http://www.fileformat.info/info/unicode/char/23bc/index.htm
Scan 9: http://www.fileformat.info/info/unicode/char/23bd/index.htm
Scan 5 is kept the same as before as it wasn't added separately and was
already correct before.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
13 years ago
Ander Conselvan de Oliveira
dc8c8fce72
window: rename enum pointer_type to cursor_type
...
This avoids confusion with the pointer devices (struct wl_pointer).
13 years ago
Ander Conselvan de Oliveira
d8f527c845
window: track changes in libwayland-cursor api
...
libwayland-cursor does not provide enum wl_cursor_type anymore so this
brings back enum pointer_type.
This partially revers commit 1042dc15e0
.
13 years ago
Ander Conselvan de Oliveira
1042dc15e0
window: use libwayland-cursor instead of libXcursor
13 years ago
Kristian Høgsberg
4c3dac9c66
clients: Remove superfluous #includes
...
In particular window.c and many clients were including glib.h without
using it and without the right cflags.
13 years ago
Kristian Høgsberg
bef52d1423
Update to new libxkbcommon API
...
We no longer depend on xproto, we use xkbcommon keycodes now. Yay!
13 years ago
Kristian Høgsberg
80680c7b75
window.c: Just use float instead of GLfloat, remove GLES2.h include
13 years ago
Kristian Høgsberg
7016313778
Port Wayland clients to new xkbcommon API
...
A little different from Daniels initial patch. We look up the common
modifiers at xkb init time and convert the xkb serialized modifier mask
to our own modifier bitmask.
13 years ago
Daniel Stone
b230a7ee58
Convert internal input co-ordinates to GLfloat
...
Change all client motion handlers to take GLfloat for co-ordinates,
rather than int32_t.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
13 years ago
Daniel Stone
5d66371743
Change button from int to uint32_t
...
Since you can't really have a negative button number.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
13 years ago
Daniel Stone
da5b93c8d7
Change key/button grab bindings to take unsigned state
...
'state' here meaning 'is it up or down?', obviously.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
13 years ago