swayfx/include/sway
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
..
desktop Correctly track saved surfaces during multiple transactions 2018-08-01 16:24:15 +10:00
input Bindings use advised keyboard repeat parameters 2018-07-29 19:15:10 -04:00
tree Correctly track saved surfaces during multiple transactions 2018-08-01 16:24:15 +10:00
commands.h Add xkb_numlock/xkb_capslock commands (#2311) 2018-07-25 17:24:45 +02:00
config.h Implement setting NumLock and CapsLock status 2018-07-25 17:24:45 +02:00
criteria.h reverted includes of "sway/config.h" and replaced with "config.h" from meson build 2018-07-25 13:32:20 +02:00
debug.h Add extended debugging flags 2018-07-14 20:44:32 -04:00
desktop.h Implement some floating move commands 2018-07-09 23:38:29 +10:00
ipc-json.h Store sway_outputs so that they can be reenabled 2018-06-06 20:11:24 -04:00
ipc-server.h Implement mode --pango_markup 2018-07-05 18:12:14 -04:00
layers.h sway views: add helpers to get view and layer from wlr_surface 2018-06-30 22:31:14 +09:00
output.h Remove output_surface_for_each_surface from header 2018-07-29 14:33:26 +01:00
scratchpad.h Implement scratchpad 2018-07-23 08:24:32 +10:00
security.h Move get_feature_policy to sway/security.c 2017-04-16 17:09:53 +03:00
server.h more style fixes, included "sway/config.h" where needed 2018-07-25 12:17:10 +02:00
xwayland.h Automatically float xwayland windows 2018-06-18 22:52:10 +01:00