xserver/hw/xwayland
Erik Kurzinger a0717e5f03 xwayland: correctly report PresentCompleteModeCopy
After executing a PresentPixmap request using the copy path, Xwayland
will clear the vblank's pixmap field and re-queue it for the next msc so
that on the next frame a PresentCompleteNotify event will be delivered
to the client by present_execute_post.

While this does work, since the pixmap field of the vblank will be NULL
when present_execute_post is called, the mode reported in the event will
always be PresentCompleteModeSkip, even if the request *was* actually
executed with a copy.

To fix this, we introduce a new "copy_executed" flag in the
xwl_present_event struct. If xwl_present_execute sees that this flag is
set, it will fall straight through to present_execute_post like it does
if the window or pixmap is NULL. So, after executing a request with
present_execute_copy, instead of clearing the pixmap field we will set
the copy_executed flag to true. This will cause present_execute_post to
report the correct completion mode to the client when the
PresentCompleteNotify event is delivered on the next frame.

Signed-off-by: Erik Kurzinger <ekurzinger@nvidia.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1254>
2024-03-14 10:37:28 +00:00
..
desktop xwayland: set the app_id and install a desktop launcher 2022-06-30 17:53:01 +02:00
man xwayland: Add a -nokeymap option 2024-01-22 13:01:18 +00:00
.gitignore xwayland: Add wp_viewport wayland extension support 2019-10-12 12:19:14 +02:00
drm.xml wayland: Sync drm.xml with Mesa 2017-07-05 10:13:04 -04:00
meson.build hw: xwayland: fix build if neither gbm nor eglstream available 2024-02-19 00:53:30 +00:00
xwayland-cursor.c ephyr,xwayland: Use the proper private key for cursor 2024-01-16 09:26:01 +01:00
xwayland-cursor.h xwayland: Add xwl_cursor_clear_frame_cb() 2021-10-25 12:05:42 +00:00
xwayland-cvt.c xwayland: Keep the CVT timings for non-standard modes 2023-05-15 10:33:21 +02:00
xwayland-cvt.h xwayland: Move Xwayland CVT declaration 2019-12-20 16:19:01 +01:00
xwayland-drm-lease.c randr: move private definitons from randrstr.h to randrstr_priv.h 2024-02-22 23:47:49 +00:00
xwayland-drm-lease.h Xwayland: implement drm-lease-v1 2021-12-07 10:02:29 +00:00
xwayland-glamor-eglstream.c glamor: Make glamor_set_alu take a DrawablePtr 2024-01-11 10:03:10 +00:00
xwayland-glamor-gbm.c xwayland: Use border width in xwl_glamor_gbm_create_pixmap_for_window 2024-03-06 16:55:13 +01:00
xwayland-glamor-xv.c xwayland: Cleanup and remove `xwayland.h` 2019-12-20 16:19:01 +01:00
xwayland-glamor.c xwayland: Rename xwl_window_recycle_pixmap to xwl_window_realloc_pixmap 2024-03-06 16:55:13 +01:00
xwayland-glamor.h xwayland: Do not plumb damage region through function parameters 2024-03-06 16:55:13 +01:00
xwayland-input.c Revert "include: move BUG_*() macros to separate header" 2024-02-23 23:11:01 +00:00
xwayland-input.h xwayland: hook up wl_pointer.axis_v120 events 2023-01-18 13:33:54 +10:00
xwayland-output.c randr: move private definitons from randrstr.h to randrstr_priv.h 2024-02-22 23:47:49 +00:00
xwayland-output.h xwayland: Add a function to search for xwl_output by name 2024-01-11 08:45:33 +00:00
xwayland-pixmap.c xwayland: Add xwl_pixmap_get_wl_buffer helper 2024-01-22 14:14:05 +00:00
xwayland-pixmap.h xwayland: Replace window pixmap as needed for drawing operation 2024-03-06 17:12:54 +01:00
xwayland-present.c xwayland: correctly report PresentCompleteModeCopy 2024-03-14 10:37:28 +00:00
xwayland-present.h xwayland: correctly report PresentCompleteModeCopy 2024-03-14 10:37:28 +00:00
xwayland-screen.c xwayland: Enable Present extension support also without glamor 2024-01-22 14:14:05 +00:00
xwayland-screen.h xwayland/present: Handle clearing damage after flip in xwl_present_execute 2024-03-06 17:33:54 +01:00
xwayland-shm.c os: move os_move_fd() out of public API 2024-03-09 17:12:46 +00:00
xwayland-shm.h xwayland: Move SHM declarations to their own header 2019-12-20 16:19:01 +01:00
xwayland-types.h xwayland: Add xwl_output to the Xwayland types 2023-11-16 11:14:04 +01:00
xwayland-vidmode.c xwayland: add a fixed geometry size for rootful 2022-06-30 17:52:22 +02:00
xwayland-vidmode.h xwayland: Move Xwayland vidmode declaration 2019-12-20 16:19:01 +01:00
xwayland-window-buffers.c xwayland: Replace window pixmap as needed for drawing operation 2024-03-06 17:12:54 +01:00
xwayland-window-buffers.h xwayland: Replace window pixmap as needed for drawing operation 2024-03-06 17:12:54 +01:00
xwayland-window.c xwayland/present: Handle clearing damage after flip in xwl_present_execute 2024-03-06 17:33:54 +01:00
xwayland-window.h xwayland/present: Handle clearing damage after flip in xwl_present_execute 2024-03-06 17:33:54 +01:00
xwayland-xtest.c xwayland: override the XTest sendEventsProc for all devices 2024-01-09 00:45:31 +00:00
xwayland-xtest.h xwayland: Fallback to plain XTEST if EI does not work 2023-06-26 13:19:19 +02:00
xwayland.c dix: unexport global variables 2024-03-09 17:23:43 +00:00