labwc/include/common
Consolatis ddc9047a67 Restore nested resize
Chases: 756ecf8ee9f1e75bc7b8297dc84f97c7d699174b
backend/wayland: use request_state when toplevel is resized

Chases: 3ef68a484243555b020200c6f95246d994932c3f
backend/x11: use request_state when window is resized

Ref: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/2693

We now delay requested resolution changes by the backend until
the next frame event which causes us to render the new content
on the already enlarged buffer. Before this change, an empty
(black) buffer would have been shown instead before the next
frame event caused a new render of the actual contents.

Keep commiting the new state and then scheduling a frame event
would not help as due to the commit call it would still show an
empty buffer in the meantime.

Just modifying wlr_output->pending wouldn't work either because
wlr_scene_output_commit() *completely* ignores it (and it will
be removed in future wlroots commits). For this reason we move
to wlr_scene_output_build_state() directly because it allows us
to supply the current wlr_output->pending state and thus apply
any resolution change in lockstep with new rendering. Result:
No more flickering in the wayland backend and resizing is again
smooth as butter.

This prevents constant flicker while resizing
when running nested via the wayland backend.

For the X11 backend (can be tested via `WLR_BACKENDS=x11 labwc`),
it is still rather janky but at least doesn't cause endless self-
resizing anymore.
2023-11-27 21:01:53 +00:00
..
array.h common/array.h: add wl_array_for_each_reverse macro 2023-11-21 22:31:05 +01:00
border.h Move border-struct to common/border.h for sharing 2023-06-26 06:04:07 +01:00
buf.h action: do not expand env vars in Exec action 2023-09-23 14:52:59 +01:00
dir.h includes: identifier consistency in include guards 2023-05-13 22:29:21 +01:00
fd_util.h includes: identifier consistency in include guards 2023-05-13 22:29:21 +01:00
file-helpers.h common/file-helpers.c: share file_exists() to reduce duplication 2023-09-17 19:26:41 +01:00
font.h includes: identifier consistency in include guards 2023-05-13 22:29:21 +01:00
grab-file.h includes: identifier consistency in include guards 2023-05-13 22:29:21 +01:00
graphic-helpers.h osd: use theme->osd_border_width for focused item 2023-06-29 19:14:08 +01:00
list.h includes: identifier consistency in include guards 2023-05-13 22:29:21 +01:00
macros.h common: move MIN and MAX to common/macros.h 2023-10-21 12:37:42 +01:00
match.h common: use fnmatch() for pattern matching 2023-10-01 14:17:29 +01:00
mem.h includes: identifier consistency in include guards 2023-05-13 22:29:21 +01:00
nodename.h includes: identifier consistency in include guards 2023-05-13 22:29:21 +01:00
parse-bool.h includes: identifier consistency in include guards 2023-05-13 22:29:21 +01:00
scaled_font_buffer.h scaled_scene_buffer: make dropping the buffer optional 2023-10-19 21:48:57 +01:00
scaled_scene_buffer.h scaled_scene_buffer: make dropping the buffer optional 2023-10-19 21:48:57 +01:00
scene-helpers.h Restore nested resize 2023-11-27 21:01:53 +00:00
spawn.h includes: identifier consistency in include guards 2023-05-13 22:29:21 +01:00
string-helpers.h common/string-helpers.c: add strdup_printf() 2023-06-26 06:30:33 +01:00