Commit graph

1547 commits

Author SHA1 Message Date
Daniel Eklöf
e9d3e7d87f
term: visual_focus_in/out: redraw CSDs
We draw the CSDs in a darker color when we're inactive.

Weston seems to be buggy with synchronized subsurfaces, so temporarily
reconfigure them to desynchronized surfaces.
2020-02-25 20:31:37 +01:00
Daniel Eklöf
c0e3db1712
input: wip: trigger move/resize when left-clicking CSD 2020-02-25 20:31:13 +01:00
Daniel Eklöf
cc3dad9599
render: search: take CSD into account 2020-02-25 20:30:45 +01:00
Daniel Eklöf
ef53729242
render: resize with with/height == 0 resizes to user configured dimensions 2020-02-25 20:29:44 +01:00
Daniel Eklöf
2855d06c6e
wayland: mark the whole search surface as opaque 2020-02-25 19:57:19 +01:00
Daniel Eklöf
f05e0ad0ae
wayland: synchronize the CSD surfaces to the main surface 2020-02-25 19:56:56 +01:00
Daniel Eklöf
7e26d96d17
wayland: default to CSDs
Only when the compositor implements the XDG decoration manager
interface, and it tells us to use server side decorations to we do so.
2020-02-25 19:56:23 +01:00
Daniel Eklöf
8af5bf49b0
wayland: weston does not implement the xdg decoration manager interface 2020-02-25 19:56:17 +01:00
Daniel Eklöf
0126cee55d
wayland: xdg_surface_configure(): call wl_surface_commit()
It seems kwin expects a wl_surface_commit() for each
xdg_surface_ack_configure().

We don't want to commit before we've rendered a resized surface. So,
if we *did* change the window size, let the normal rendering path do
the surface commit.

Only when we did *not* change the window size do we need to explicitly
commit the surface in xdg_surface_configure().
2020-02-25 19:53:06 +01:00
Daniel Eklöf
595b32ddf9
render: render_resize_*() returns a boolean indicating whether size changed. 2020-02-25 19:51:03 +01:00
Daniel Eklöf
a4d77608b9
wayland: decoration-configure: call render_resize() to add/remove CSDs
Call render_resize_force() when the decoration type changes
run-time. This ensures the CSDs are drawn when changing from server ->
client side decorations, and removed when going the other way.
2020-02-25 19:16:23 +01:00
Daniel Eklöf
7db9221aa9
render: render_resize(): don't allow too small window sizes 2020-02-25 19:10:48 +01:00
Daniel Eklöf
d3c7d25dae
render: call render_csd() from render_resize(), not render_grid()
The CSDs doesn't need to be re-drawn each time we redraw the grid,
only when the window is resized.
2020-02-25 19:09:49 +01:00
Daniel Eklöf
70ce7245c6
render: export render_csd() 2020-02-25 19:09:29 +01:00
Daniel Eklöf
d15eb936ef
render: make CSD border and title size globally accessible 2020-02-25 19:08:14 +01:00
Daniel Eklöf
3f601a31dc
shm: handle EINTR in posix_fallocate() 2020-02-25 19:07:23 +01:00
Daniel Eklöf
ac32bcda07
main: geometry defaults to 800x600 pixels 2020-02-25 19:05:48 +01:00
Daniel Eklöf
551170d940
input: pointer-motion/button: ignore actions in non-main surfaces 2020-02-24 22:42:04 +01:00
Daniel Eklöf
7b18f8394e
input: pointer-leave: reset 'active-surface' in terminal 2020-02-24 22:41:46 +01:00
Daniel Eklöf
d303084a81
input: pointer-enter: differentiate between the surfaces 2020-02-24 22:40:24 +01:00
Daniel Eklöf
0b265cc9a5
render: csd: sort geometry entries 2020-02-24 22:40:02 +01:00
Daniel Eklöf
b725ac4c73
wayland: terminal_from_surface(): use term_surface_kind() 2020-02-24 22:39:37 +01:00
Daniel Eklöf
7f270a9f01
term: add term_surface_kind(), and track currently active surface
This is needed to handle pointer motion and button events correctly,
since mouse actions in e.g. CSD surfaces are very different from mouse
actions in the main window.
2020-02-24 22:38:35 +01:00
Daniel Eklöf
2798807853
render: csd: render all borders and the title bar
* Still no content in the title bar
* Colors are temporary
* No resize/drag yet
2020-02-24 22:06:20 +01:00
Daniel Eklöf
01a11457a5
Merge branch 'master' into csd 2020-02-24 18:47:08 +01:00
Daniel Eklöf
0c247de4ae
sixel: CSI setters also write a reply to the client 2020-02-24 18:42:52 +01:00
Daniel Eklöf
77fcb43ea5
term: scroll: call sixel_delete_*() instead of manually erasing sixel images 2020-02-24 18:42:52 +01:00
Daniel Eklöf
4c6f2ea340
term: term_erase(): call sixel_delete_*()
This ensures sixel images are removed, regardless of _how_ the screen
was erased.
2020-02-24 18:42:46 +01:00
Daniel Eklöf
afa9ac0cfc
sixel: ensure 'start' row is not outside the grid row range 2020-02-24 18:42:46 +01:00
Daniel Eklöf
95f7c5586c
sixel: add sixel_delete_at_row and sixel_delete_in_range
These are utility functions to erase sixel images that are at the
specified row, or in a row range.
2020-02-24 18:42:32 +01:00
Daniel Eklöf
d804bc8579
term: resize: pre-calculate right/bottom margins 2020-02-24 18:38:11 +01:00
Daniel Eklöf
8368e8184f
csd: wip: something to get started... 2020-02-23 14:17:48 +01:00
Daniel Eklöf
7fd380f253
csi: delete all sixels on the 'alt' grid when switching back to 'normal' 2020-02-23 00:41:55 +01:00
Daniel Eklöf
85684bc0c7
render: sixel: don't render sixels on the 'other' grid 2020-02-23 00:41:28 +01:00
Daniel Eklöf
6d69311630
term: scroll: don't delete sixel images on the 'other' grid 2020-02-23 00:41:10 +01:00
Daniel Eklöf
2c7d98f2ee
sixel: destroy_at_cursor(): skip images on 'other' grid 2020-02-23 00:40:53 +01:00
Daniel Eklöf
a2b4bcbd4f
sixel: track which grid image was created on 2020-02-23 00:40:30 +01:00
Daniel Eklöf
86d640ef71
sixel: rename: purge_at_cursor() -> delete_at_cursor() 2020-02-22 23:06:11 +01:00
Daniel Eklöf
3a24777e45
Merge branch 'sixel-graphics' 2020-02-22 22:06:14 +01:00
Daniel Eklöf
5c7fc3a0c7
README: add screenshot of sixel graphics 2020-02-22 22:04:28 +01:00
Daniel Eklöf
270b7cc6f4
sixel: purge images in unhook, rather than in init
This fixes an issue where the cursor was seen blinking in animated
GIFs.
2020-02-22 21:55:10 +01:00
Daniel Eklöf
80361ca04e
sixel: purge images at current cursor row
When printing a character, or starting a new sixel image, purge all
images that cover the cursor's current row.
2020-02-22 21:35:45 +01:00
Daniel Eklöf
462229af70
sixel: oops 2020-02-22 21:24:21 +01:00
Daniel Eklöf
6e8c4149d2
README: add sixel support to feature list 2020-02-22 21:21:14 +01:00
Daniel Eklöf
05ff2a8a15
sixel: don't ever shrink the image 2020-02-22 21:20:22 +01:00
Daniel Eklöf
f96eb5ff07
sixel: add HLS color format support 2020-02-22 21:18:55 +01:00
Daniel Eklöf
7985cefd65
sixel: add comments to max_width()/max_height() 2020-02-22 21:04:24 +01:00
Daniel Eklöf
25b09b909c
sixel: application configurable image max width/height 2020-02-22 21:03:24 +01:00
Daniel Eklöf
8e37a18083
sixel: application configurable palette size (color count)
This implements the CSI escapes for retrieving and (re)setting the
palette size.
2020-02-22 14:02:00 +01:00
Daniel Eklöf
5e65db3b07
sixel: use terminal's background color, not palette[0] 2020-02-22 14:01:20 +01:00