aboutsummaryrefslogtreecommitdiff
path: root/terminal.c (follow)
Commit message (Collapse)AuthorAgeLines
...
* term: print: write special value CELL_MULT_COL_SPACER to extra cellsDaniel Eklöf2020-07-14-12/+9
| | | | | | When printing a multi-column character, write CELL_MULT_COL_SPACER instead of '0' to both padding cells (when character doesn't fit at the end of the line), and to the cells following the actual character.
* selection: recognize empty padding cells in a forced linewrapDaniel Eklöf2020-07-14-0/+10
| | | | | | | | | | | | | | When printing a multi-column character at the end of the line, and it doesn't fit, we currently insert a forced line-wrap. This means the last character(s) on the previous line will be empty, followed by a multi-column character in the first cell on the next line. Without special code to handle this, the selection text extraction code will insert a hard newline, since this is normally the correct thing to do. Add a TODO, to consider writing a special place holder value to these padding cells.
* term: remove assert, as we're already checking for this in the loop conditionDaniel Eklöf2020-07-14-1/+0
|
* term: print: manually increment cursor columnDaniel Eklöf2020-07-14-3/+4
| | | | | We know we're within bounds, and thus we don't need the extra overhead of term_cursor_right().
* term: line-wrap: need to update grid->cur_row when we did *not* scrollDaniel Eklöf2020-07-14-0/+1
|
* term: print: also require width > 1 when checking if we need to force-wrap or notDaniel Eklöf2020-07-14-1/+3
| | | | | | While this might seem like it would slow down things, it should in fact help the compiler optimize: the "normal" code path, that prints regular ASCII characters, always call term_print() with width == 1.
* term: line-wrap: manually set cursor row+colDaniel Eklöf2020-07-14-3/+7
| | | | | line-wrap is in the hot path, and term_cursor_down/left adds additional checks that we don't need.
* term: print: force line-wrap if a multi-column character does not fit on current lineDaniel Eklöf2020-07-14-0/+6
|
* term: print: manually increment cursor column for multi-column charsDaniel Eklöf2020-07-14-2/+2
| | | | | There's nothing wrong with using term_cursor_right(), but it is unnecessary since we already check for the end-of-line.
* term: insert: move assert() after checking whether insert mode is enabled or notDaniel Eklöf2020-07-14-2/+2
|
* term: linefeed: explicitly clear LCFDaniel Eklöf2020-07-14-0/+2
| | | | | | LF should always clear LCF. Previously, it was done implicitly in term_cursor_down(). I.e it was cleared as long as the cursor wasn't at the bottom of the scrolling region
* term: line-wrap: use term_cursor_{down,left}Daniel Eklöf2020-07-14-4/+4
|
* term: rename term_formfeed() -> term_carriage_return()Daniel Eklöf2020-07-14-1/+1
|
* term: set_fonts: describe why we force resizeDaniel Eklöf2020-07-13-0/+1
|
* render: keep lock while pushing dirty rows to worker queueDaniel Eklöf2020-07-13-9/+0
| | | | | | | | | | | | | | | | Instead of locking the queue for each dirty row we append, and signaling a condition variable, just keep the lock while going through the visible rows. Release the lock once done. Since we take the lock *before* posting the 'start' semaphore, all workers will be waiting for the lock to be released. Then, one at a time they'll get the lock and pick a row to render. The queue will never get empty - when all rows have been rendered, each worker will pick a 'frame done' "job" from the queue, and break the rendering loop.
* term: update cursor on kbd focus changes, not visual focus changesDaniel Eklöf2020-07-11-2/+2
|
* term: remove term_has_kbd_focus(), use term->kbd_focus insteadDaniel Eklöf2020-07-11-17/+5
|
* term: cache kbd-focused state, just like we cache visual focus stateDaniel Eklöf2020-07-11-2/+11
| | | | | | There's one difference however, when we receive a kbd unfocus call, *all* seats must have us unfocused before we actually change the state.
* multi-seat: improve handling of multiple (mouse) pointersDaniel Eklöf2020-07-09-31/+24
| | | | | | | | * xcursor always set for all pointers * xcursor sometimes not updated when it should be * mouse grabbed state wasn't per seat, but global (i.e. "does at least one seat enable mouse grabbing") * selection enabled state wasn't per seat
* focus in/out: terminal checks whether it is a state change or notDaniel Eklöf2020-07-09-2/+4
|
* input: only call term_kbd_focus_{in,out}() on actual state changeDaniel Eklöf2020-07-09-0/+4
| | | | | | That is, only call term_kbd_focus_in() if we're the *first* seat focusing that terminal, and only call term_kbd_focus_out() if we're the *last* seat that focused it.
* multi-seat: re-enable mouse button+motion reporting supportDaniel Eklöf2020-07-08-29/+22
|
* multi-seat: enable xcursor theme support againDaniel Eklöf2020-07-08-8/+13
|
* wip: multi-seat supportDaniel Eklöf2020-07-08-13/+36
| | | | | Compiles and runs, but mouse, clipboard and other things have been disabled.
* term: don't use deprecated fcft_size_adjust()Daniel Eklöf2020-07-07-97/+67
| | | | | | | | | | | | | | | | | | | | | | | | | When resizing the font on-the-fly, we now do a complete font-reload (this is basically what fcft_size_adjust() did anyway). To get the correct size, we maintain the current size ourselves. We get the initial size from the user-provided font pattern, by converting the string to an FcPattern, and using FcPatternGet() to retrieve both the FC_SIZE and FC_PIXEL_SIZE attributes. These attributes are then removed from the pattern, and the pattern is converted back to a string. The terminal struct maintains a copy of the font sizes. These are initially set to the sizes from the config. When the user resizes the font, the terminal-local sizes are adjusted. To ensure the primary and user-configured fallback fonts are resizes equally much, convert any pixel sizes to point sizes at this point. When the font size is reset, we reload the font sizes from the config (thus once again returning actual pixel-sizes, if that's what the user has configured).
* config: add 'blink' option to cursor section in footrcDaniel Eklöf2020-06-30-1/+2
| | | | | This option controls whether the default cursor should blink or not. The default is to *not* blink.
* Merge branch 'master' into sixel-performanceDaniel Eklöf2020-06-29-4/+27
|\
| * sixel: destroy all sixels when font size is decreasedDaniel Eklöf2020-06-29-1/+24
| | | | | | | | | | | | If changing the font size causes the cell size to decrease, either horizontally or vertically (or both), then delete all sixels since the grid space they allocated no longer is enough to hold the images.
| * term: use 'left_ptr' instead of 'hand2' as cursor when client is mouse grabbingDaniel Eklöf2020-06-29-3/+3
| |
* | scroll: destroy scrolled out sixels before scroll is appliedDaniel Eklöf2020-06-29-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | The logic that breaks out of sixel loops does not work for rows that has already wrapped around. Thus, we need to destroy sixels that are about to be scrolled out *before* we actually scroll. Since this is the *only* time we destroy sixels (instead of overwriting it), rename the sixel functions. And, since they now do a very specific thing, they can be greatly simplified (and thus faster).
* | sixel: overwrite: pass 'width' to sixel_overwrite_at_cursor()Daniel Eklöf2020-06-28-1/+1
|/ | | | This is necessary to handle multi-column characters correctly.
* sixel: split -> overwriteDaniel Eklöf2020-06-27-5/+6
|
* term: erasing characters now splits sixels instead of deleting themDaniel Eklöf2020-06-27-6/+4
|
* sixel: delete/split: early(ier) exit when there aren't in sixel imagesDaniel Eklöf2020-06-27-1/+4
| | | | Avoid unnecessary wrap checks if the sixel image list is empty.
* sixel: wip: split up image being overwritten, rather than erasing itDaniel Eklöf2020-06-23-1/+2
| | | | | | | | | | Instead of completely erasing a sixel image when it is being "overwritten" (text is printed somewhere within the image, or another sixel image is emitted within the first image), split it up into up to four pieces: 'above', 'below', 'to-the-left' and 'to-the-right'. This is currently very un-optimized, but seems to produce correct results.
* term: reset: set title to the user configured title, not "foot"Daniel Eklöf2020-06-22-2/+1
|
* term: ptmx: don't abort on EAGAIN when trying to read from ptxmDaniel Eklöf2020-06-19-0/+3
|
* sixel: do not reset palette after each imageDaniel Eklöf2020-06-10-0/+1
| | | | | | | | A client can re-use the palette between images. Resetting the palette breaks this. Now we initialize the palette on demand, and resets it when the palette size is changed (by the client).
* term: print_insert: early returnDaniel Eklöf2020-06-09-11/+12
|
* term: set an initial TIOCSWINSZ right after opening the ptyDaniel Eklöf2020-06-02-0/+8
| | | | | | | | Since foot is pretty aggressive about spawning the client early, it was possible for a fast client to read a 0x0 terminal size. Not all clients coped well. Closes #20.
* term: don't double fork new terminal windowsDaniel Eklöf2020-05-21-50/+43
| | | | | Instead, register their PIDs with the new reaper module and let it handle them.
* selection: handle viewport wrap around correctlyDaniel Eklöf2020-05-19-45/+26
| | | | | When the viewport wraps around, the selection points may be "incorrect".
* term: scrolling: calling function must clamp scroll amountDaniel Eklöf2020-05-19-4/+4
|
* term: erase_cell_range: set row->dirty before calling memset()Daniel Eklöf2020-05-17-2/+2
|
* term: scrolling: mark selection top if-statement as 'unlikely'Daniel Eklöf2020-05-17-4/+4
|
* term: scrolling: hopefully fix all selection/scrolling related crashesDaniel Eklöf2020-05-17-5/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When scrolling, there are a couple of cases where an existing selection must be canceled because we cannot meaningfully represent it after scrolling. These are when the selection is (partly) inside: * The top scrolling region * The bottom scrolling region * The new lines scrolled in. I.e. re-used lines For the scrolling regions, the real problem is when the selection crosses the scrolling region boundary; a selection that is completely inside a scrolling regions _might_ be possible to keep, but we would need to translate the selection coordinates to the new scrolling region lines. For simplicity, we cancel the selection if it touches the scrolling region. Period. The last item, newly scrolled in lines is when the selection covers very old lines and we're now wrapping around the scrollback history. Then there's a fourth problem case: when the user has started a selection, but hasn't yet moved the cursor. In this case, we have no end point. What's more problematic is that when the user (after scrolling) moves the cursor, we try to create a huge selection that covers mostly empty (NULL) rows, causing us to crash. This can happen e.g. when reverse scrolling in such a way that we wrap around the scrollback history. The actual viewport in this case is something like `-n - m`. But the selection we'll end up trying to create will be `m - (rows - n)`. This range may very well contain NULL rows. To deal with this, we simply cancel the selection.
* term: scrolling: sixel: simplify now that row count is clampedDaniel Eklöf2020-05-17-2/+2
|
* term: scrolling: in debug builds, verify all rows are allocatedDaniel Eklöf2020-05-16-0/+10
|
* term: scrolling: simplify, now that scroll row count is clampedDaniel Eklöf2020-05-16-11/+5
|
* term: scrolling: clamp number of rows to number of rows in scrolling regionDaniel Eklöf2020-05-16-12/+4
|
* grid: swap_row: remove unused parameter 'initialize'Daniel Eklöf2020-05-16-4/+4
|
* term: scrolling: clear selection *before* scrollingDaniel Eklöf2020-05-16-12/+15
| | | | | | | | | | | | We normally don't clear the selection when scrolling. The exception is when the selection covers re-used rows. I.e. rows that we scroll in and clear. In this case we cancel the selection (we _could_ modify it and keep as much as possible and only remove the re-used rows...). We must do this *before* scrolling, since scrolling will swap rows (when there's a scrolling region). When this happens, the selection is "corrupted", and canceling it afterwards will not work.
* selection: on_row_in_view() -> on_rows_in_view(), and now takes a rangeDaniel Eklöf2020-05-16-10/+12
| | | | | This allows us to check the selection once when scrolling, instead of once for each scrolled in line.
* Revert "term: print: line-wrap multi-column characters instead of cutting them in half"Daniel Eklöf2020-05-09-5/+3
| | | | | | | This reverts commit 8448296bb3c0fa96f5af5cb7ec563bb0c7e99093. Applications need to be multi-column character aware anyway, and they should deal with this.
* term: print: line-wrap multi-column characters instead of cutting them in halfDaniel Eklöf2020-05-09-3/+5
|
* term: don't register ptmx with FDM if we're shutting downDaniel Eklöf2020-05-04-2/+4
| | | | | This can happen when there's an error instantiating the terminal *after* we've spawned the slave process.
* term: set 'is_shutting_down' before calling term_destroy() on errorDaniel Eklöf2020-05-04-0/+1
|
* term: check return value when instantiating thread synchronization primitivesDaniel Eklöf2020-05-04-4/+25
|
* term: thrd_success isn't necessarily 0Daniel Eklöf2020-05-03-3/+3
|
* thrd_create(): handle errors correctlyDaniel Eklöf2020-05-03-13/+31
| | | | | | * Detect thrd_create() failures in all places where we instantiate threads * Log error correctl; thrd_create() does not return an errno value
* unicode-combining: store seen combining chains "globally" in the term structDaniel Eklöf2020-05-03-4/+4
| | | | | | | | | | | | | | | | | | | | Instead of storing combining data per cell, realize that most combinations are re-occurring and that there's lots of available space left in the unicode range, and store seen base+combining combinations chains in a per-terminal array. When we encounter a combining character, we first try to pre-compose, like before. If that fails, we then search for the current base+combining combo in the list of previously seen combinations. If not found there either, we allocate a new combo and add it to the list. Regardless, the result is an index into this array. We store this index, offsetted by COMB_CHARS_LO=0x40000000ul in the cell. When rendering, we need to check if the cell character is a plain character, or if it's a composed character (identified by checking if the cell character is >= COMB_CHARS_LO). Then we render the grapheme pretty much like before.
* unicode-combine: remove utf8proc dependencyDaniel Eklöf2020-05-02-1/+1
| | | | | | | | | | | | We only used utf8proc to try to pre-compose a glyph from a base and combining character. We can do this ourselves by using a pre-compiled table of valid pre-compositions. This table isn't _that_ big, and binary searching it is fast. That is, for a very small amount of code, and not too much extra RO data, we can get rid of the utf8proc dependency.
* unicode-combining: completely remove unicode combining characters when feature is disabledDaniel Eklöf2020-05-01-0/+3
|
* render: render combining charactersDaniel Eklöf2020-05-01-1/+1
| | | | | | | | | | | | | | | | | This is basically just a loop that renders additional glyphs on top off the base glyph. Since we now need access to the row struct, for the combining characters, the function prototype for 'render_cell()' has changed. When rendering the combining characters we also need to deal with broken fonts; some fonts use positive offsets (as if the combining character was a regular character), while others use a negative offset (to be used as if you had already advanced the pen position). We handle both - a positive offset is rendered just like a regular glyph. When we see a negative offset we simply add the width of a cell first.
* term: print: reset combining characters for this cellDaniel Eklöf2020-05-01-0/+1
| | | | | | | | | | | This is the *only* place combining characters are reset. In particular, we do *not* reset them in a normal cell erase. This is a performance design decision - clearing the combining characters in erase is way too slow. This way, we clear it only when we *have* to. Anything looking at the combining characters must first ensure the base character is not 0.
* util.h: new header file defining commonly used macrosDaniel Eklöf2020-05-01-4/+1
|
* term: don't enable ptmx FDM callback until Wayland window has been configuredDaniel Eklöf2020-04-30-4/+21
| | | | | | | | | | | | | The way things works right now, we cannot enable the ptmx FDM callback right away. We need to wait for the Wayland window to have been configured. Before the window is configured, we don't have a size, and no grid. Thus, if we try to process ptmx data we'll crash since we have no where to write it to. So, registering the ptmx fd with the FDM is now delayed until we've received the first 'configure' event from Wayland.
* term: start slave before loading fonts and starting rendering threadsDaniel Eklöf2020-04-30-8/+9
| | | | | This allows the client to load in parallel with our font loading, which should improve startup time.
* term: font size adjust: re-load fonts in parallelDaniel Eklöf2020-04-29-9/+30
|
* term: destroy: handle rendering threads not being initializedDaniel Eklöf2020-04-29-11/+15
| | | | | We sort of already did this. However, we did not handle the case where the thread array itself hadn't yet been allocated.
* term: initialize rendering worker threads after instantiating fontsDaniel Eklöf2020-04-29-3/+2
| | | | | | This ensures the resources (e.g. stack) used by the transient threads used to load the primary fonts can be re-used by the rendering worker threads.
* term: load primary fonts in parallelDaniel Eklöf2020-04-28-8/+35
| | | | | | | | Use four threads to load the four primary font variants - normal, bold, italic and bold italic. This speeds up initial startup, and reloading of fonts on a DPI change.
* damage: remove 'scroll' sub structDaniel Eklöf2020-04-26-4/+5
| | | | There is no other types of damage but scroll damage.
* term: fcft: max/space advance fields have been renamedDaniel Eklöf2020-04-23-2/+2
|
* term: guess subpixel mode after initializing wayland windowDaniel Eklöf2020-04-22-0/+2
| | | | | | | | | At this point, we're not mapped, but we should have all the outputs initialized. Which means we can at least guess which subpixel mode to use. If that turns out to be wrong, something we'll detect when we're mapped, we'll just have to re-render.
* fcft: adjust to fcft-2.0 API changesDaniel Eklöf2020-04-21-36/+36
| | | | | | | * font_*() -> fcft_*() * struct font -> struct fcft_font * struct glyph -> struct fcft_glyph * enum subpixel_order -> enum fcft_subpixel
* render: use output's subpixel mode when rasterizing glyphsDaniel Eklöf2020-04-20-0/+72
|
* term: destroy: free scroll damage listsDaniel Eklöf2020-04-19-0/+3
| | | | | | | | | These lists are typically empty when we destroy the terminal. However, if we had queued up damage, and then manage to destroy the terminal instance before the last changes were rendered, then they will *not* be empty. Found by the address sanitizer.
* grid: move 'cursor' state from terminal to gridDaniel Eklöf2020-04-16-43/+44
| | | | | This way, the 'normal' and 'alt' grids have their own cursor state, and we don't need to switch between them.
* misc: replace all explicit zero-initializers with empty initializersDaniel Eklöf2020-04-13-8/+8
|
* term: reset: plug memory leakDaniel Eklöf2020-04-13-27/+31
| | | | | | | | | | | In reset, we allocated new rows for all the currently visible lines. We did **not** however, free the 'old' rows. Fix by not explicitly allocating new rows, but instead allocating uninitialized rows when needed, and then explicitly erasing the row. If there already was a row allocated, it is simply erased. If there wasn't, the a new line is malloc:ed, and then erased.
* conf: add 'title' conf option and --title command line optionDaniel Eklöf2020-04-01-1/+1
|
* Merge branch 'master' into scroll-damage-performanceDaniel Eklöf2020-03-27-3/+20
|\
| * client: add --maximized and --fullscreenDaniel Eklöf2020-03-27-3/+6
| | | | | | | | | | | | | | | | | | We now create a copy of the config for each client, and updates it with the values passed from the client. Since we're not actually cloning it (and e.g. strdup() all strings etc) we can't call conf_destroy() to free it, but need to free just the strings we've replaced.
| * config: add 'startup-mode' optionDaniel Eklöf2020-03-26-0/+14
| | | | | | | | | | This option controls the initial window mode: windowed, maximized or fullscreen. The default is windowed.
* | app synchronized updates: set is_armed=false when enablingDaniel Eklöf2020-03-25-0/+1
| |
* | render: pace title updatesDaniel Eklöf2020-03-25-1/+1
|/ | | | Synchronize window title updates with window rendering.
* term: delayed rendering: failure to read timers is always an errorDaniel Eklöf2020-03-24-8/+5
|
* delayed rendering: ignore frame callback if delayed rendering is activeDaniel Eklöf2020-03-23-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before, we applied delayed rendering (that is, we gave the client a chance to do more writes before we scheduled a render refresh) only when the renderer were idle. However, with e.g. a high keyboard repeat rate, it is very much possible to start the render loop and then never break out of it while receiving keyboard input. This causes screen flickering, as we're no longer even trying to detect the clients transaction boundaries. So, let's rewrite how this is done. First, we give the user the ability to disable delayed rendering altogether, by setting either the lower or upper timeout to 0. Second, when delayed rendering is enabled, we ignore the frame callback. That is, when receiving input, we *always* reschedule the lower timeout timer, regardless of whether the render is idle or not. The render's frame callback handler will *not* render the grid if the delayed render timers are armed. This means for longer client data bursts, we may now skip frames. That is, we're trading screen flicker for the occasional frame hickup. For short client data bursts we should behave roughly as before. This greatly improves the behavior of fullscreen, or near fullscreen, updates of large grids (example, scrolling in emacs in fullscreen, with a vertical buffer split).
* term: delayed rendering: read timers even though is_armed = falseDaniel Eklöf2020-03-23-5/+8
| | | | | | | | | There's a race/chance that we'll have disarmed the delayed rendering timers and still get the call. While it _shouldn't_ be anything to read from the timers, it doesn't hurt to try. And, if the timers *are* readable, not reading them means we'll end up in an infinite FDM loop.
* conf: make delayed rendering timeouts configurableDaniel Eklöf2020-03-17-7/+8
| | | | | | | | | | | This adds an undocumented 'tweak' section to footrc, with two new options: * delayed-render-lower * delayed-render-upper Both takes an integer value, representing the lower/upper timeout values (in nano seconds) for delayed rendering.
* term: ptmx: don't set 'pending' flag when app sync updates are in useDaniel Eklöf2020-03-17-38/+34
|
* term: ptmx: don't enqueue extra frame render when app sync updates have been changedDaniel Eklöf2020-03-16-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | Track whether app-sync updates were enabled or disabled while handling the current chunk of PTMX data. This fixes and issue where we called render_refresh() unnecessarily under (at least) the following conditions: * Application sent "BSU <data> ESU" in the *same* chunk. In this case we never saw that app sync was enabled and triggered delayed rendering as usual. * Application sent ESU. While we had noticed app sync updates being enabled in earlier PTMX reads, when it was disabled *in the current* PTMX read, we treated it as if it had not been enabled at all. This caused us to trigger delayed rendering. Now we call render_refresh() directly from ESU, and detect the "flip off" case in PTMX read and avoid triggering a delayed rendering. The end result of all this is that each key press (for e.g. scrolling in a pager application) went from two frames being rendered, to a single frame.
* alt-screen: use a custom 'saved' cursor when switching to alt screenDaniel Eklöf2020-03-16-5/+5
| | | | | | | | | | | | | This fixes an issue where we failed to restore the cursor correctly when exiting from the alternate screen, if the client had sent escapes to save the cursor position while inside the alternate screen. This was because we used the *same* storage for saving the cursor position through escapes, as for saving it when entering the alternate screen. Fix by using a custom variable dedicated to normal <--> alt screen switching.
* Merge branch 'scale-fonts-using-logical-dpi-plus-scale-factor'Daniel Eklöf2020-03-13-3/+24
|\
| * term: use logical DPI+scale factor when scaling fontsDaniel Eklöf2020-03-11-3/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes an issue where the fonts were rendered too small when the output had fractional scaling. For integral scaling, using the logical (scaled) DPI multiplied with the scaling factor results in the same final DPI value as if we had used the physical DPI. But for fractional scaling, this works around the fact that the compositor downscales the surface after we've rendered it. Closes #5
* | sixel: improve handling of images when reflowing the gridsDaniel Eklöf2020-03-13-7/+12
|/ | | | | | | | | | | Update the sixels' 'row' attribute when re-flowing a grid, to ensure it is rendered at the correct place. This should work in most cases, but will break when the cell size has changed (e.g. font size increase/decrease, or a DPI change). This patch also moves the sixel image list from the terminal struct into the grid struct. The sixels are per-grid after all.
* terminal: appky scale factor when force-resizing on font reloadDaniel Eklöf2020-03-10-1/+1
| | | | | | | If we don't, we'll end up e.g. increasing the window size when moving the window between outputs with different scaling. Closes #3
* term: init: no need to roundtripDaniel Eklöf2020-03-09-5/+5
|
* render: never render CSD and/or search box "immediately"Daniel Eklöf2020-03-06-10/+4
| | | | | | | | | | Handle the CSDs and the search box the same way we handle the main grid; when we need to redraw them, call render_refresh_{csd,search}(). This sets a flag that is checked after each FDM iteration. All actual rendering is done here. This also ties the commits of the Wayland sub-surfaces to the commit of the main surface.