mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-14 08:22:25 -04:00
backend/x11: re-send last buffer on expose event
Instead of requesting a new frame from the compositor when we receive an expose event, re-submit the last frame. This makes the X11 backend behave like the other backends and removes the last wlr_output_update_needs_frame() call in backends, at the cost of keeping the current buffer locked for potentially a longer time.
This commit is contained in:
parent
664ec59095
commit
5da9ad3e34
3 changed files with 81 additions and 27 deletions
|
|
@ -44,6 +44,9 @@ struct wlr_x11_output {
|
|||
|
||||
pixman_region32_t exposed;
|
||||
|
||||
// Last submitted buffer, to be re-submitted on expose events
|
||||
struct wlr_buffer *current_buffer;
|
||||
|
||||
uint64_t last_msc;
|
||||
|
||||
struct {
|
||||
|
|
@ -141,5 +144,7 @@ void handle_x11_configure_notify(struct wlr_x11_output *output,
|
|||
xcb_configure_notify_event_t *event);
|
||||
void handle_x11_present_event(struct wlr_x11_backend *x11,
|
||||
xcb_ge_generic_event_t *event);
|
||||
void handle_x11_expose_event(struct wlr_x11_output *output,
|
||||
xcb_expose_event_t *event);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue