sway/include
Ryan Dwyer d10ccc1eb1 Correctly track saved surfaces during multiple transactions
Fixes #2364.

Suppose a view is 600px wide, and we tell it to resize to 601px during a
resize operation. We create a transaction, save the 600px buffer and
send the configure. This buffer is saved into the associated
instruction, and is rendered while we wait for the view to commit a
601px buffer.

Before the view commits the 601px buffer, suppose we tell it to resize
to 602px. The new transaction will also save the buffer, but it's still
the 600px buffer because we haven't received a new one yet.

Then suppose the view commits its original 601px buffer. This completes
the first transaction, so we apply the 601px width to the container.
There's still the second (now only) transaction remaining, so we render
the saved buffer from that. But this is still the 600px buffer, and we
believe it's 601px. Whoops.

The problem here is we can't stack buffers like this. So this commit
removes the saved buffer from the instructions, places it in the view
instead, and re-saves the latest buffer every time the view completes a
transaction and still has further pending transactions.

As saved buffers are now specific to views rather than instructions, the
functions for saving and removing the saved buffer have been moved to
view.c.

The calls to save and restore the buffer have been relocated to more
appropriate functions too, favouring transaction_commit and
transaction_apply rather than transaction_add_container and
transaction_destroy.
2018-08-01 16:24:15 +10:00
..
sway Correctly track saved surfaces during multiple transactions 2018-08-01 16:24:15 +10:00
swaybar swaybar: Fix scroll handling on workspace buttons 2018-07-19 21:15:01 +02:00
swaylock Implement swaylock customization flags 2018-07-10 21:29:15 -04:00
background-image.h Initial swaylock port 2018-04-04 18:47:48 -04:00
cairo.h Address review comments 2018-03-28 14:43:23 -04:00
ipc-client.h swaybar: move core functionality to state.c 2016-01-24 14:22:19 +01:00
ipc.h Remove clipboard command and get_clipboard message 2018-07-10 22:09:21 +01:00
list.h Move floating windows to front when focused 2018-07-11 19:50:02 +10:00
log.h Update for swaywm/wlroots#1126 2018-07-09 22:54:30 +01:00
meson.build Address review comments 2018-03-28 14:43:23 -04:00
pango.h Change scale from int32_t to double for pango 2018-05-16 12:01:04 -04:00
pool-buffer.h client/pool-buffer: munmap in destroy_buffer 2018-05-27 14:09:48 +01:00
readline.h Address emersion's feedback on peek_line 2018-06-02 08:07:44 -04:00
stringop.h Clean up container title functions 2018-05-25 21:07:59 +10:00
unicode.h Add password buffer, refactor rendering/surfaces 2018-04-04 18:47:48 -04:00
util.h util.h: add missing include 2018-07-30 15:21:52 +01:00