gtk2/gdk/x11
Ray Strode 56b3669411 x11: Avoid thawing surface until frame is drawn
Since commit 972134abe4 a frame getting
drawn has three states (with the vendor nvidia driver at least):

1. drawn by gtk waiting on the GPU
2. drawn by GPU waiting on the compositor
3. drawn by compositor

Those three states are encoded in two flags: frame_pending and
frame_still_painting.

frame_pending means step 1 is done, but step 2 and 3 are still
in progress.  frame_still_painting means step 2 is still in progress.

After step 1 is finished the surface is frozen until step 3 is finished.

When the compositor notifies gtk it's done with step 3, with a
_NET_WM_FRAME_DRAWN client message, the toolkit thaws the surface to
allow the next frame to proceed.

The compositor sometimes sends gtk a _NET_WM_FRAME_DRAWN client message
between steps 1 and 2.  This message should be ignored because it's not
a reply to the current frame.

Unfortunately, gtk currently assumes if it gets a _NET_WM_FRAME_DRAWN
client message while waiting for step 2 that it's actually at step 3,
and proceeds to draw a new frame while the existing frame is still
pending, leading to a blown assertion.

This commit addresses the problem by ignoring _NET_WM_FRAME_DRAWN
client messages from the compositor unless actually expecting one.

Fixes: #2902
2020-06-30 14:36:15 -04:00
..
gdkapplaunchcontext-x11.c Use commas to differentiate between text and filename 2019-07-24 13:51:22 +00:00
gdkasync.c Remove NEED_XIPROTO_H_FOR_XREPLY check 2019-08-21 20:46:30 +02:00
gdkasync.h
gdkcairocontext-x11.c Get rid of GdkSurfaceImpl 2019-05-28 20:25:14 +00:00
gdkcairocontext-x11.h
gdkclipboard-x11.c Fix minor typos 2020-05-28 11:00:03 +03:00
gdkclipboard-x11.h
gdkcursor-x11.c Remove primary monitor api 2020-01-30 21:33:37 +01:00
gdkdevice-xi2.c Rename master and slave device 2020-06-18 19:22:20 +01:00
gdkdevicemanager-x11.c gdk/x11: Drop GdkDeviceManagerCore 2019-05-15 01:05:29 +02:00
gdkdevicemanager-xi2.c gdk: Drop GDK_SOURCE_ERASER 2020-06-23 23:42:53 +02:00
gdkdevicemanagerprivate-core.h
gdkdisplay-x11.c x11: Avoid thawing surface until frame is drawn 2020-06-30 14:36:15 -04:00
gdkdisplay-x11.h x11: Defer _NET_WM_FRAME_DRAWN update until frame usable by compositor 2020-06-05 10:01:13 -04:00
gdkdrag-x11.c gdk: Drop GdkGrabOwnership 2020-06-23 23:42:53 +02:00
gdkdrop-x11.c X11 dnd: Calculate relative coords right in events 2020-05-14 11:46:33 +02:00
gdkeventsource.c gdk: Depend less on gdk_event_get_device() 2020-06-23 23:42:53 +02:00
gdkeventsource.h
gdkeventtranslator.c x11: change event translator interface 2020-02-21 00:47:51 -05:00
gdkeventtranslator.h gdk: Drop the GdkEventMask enum 2020-05-26 19:39:31 -04:00
gdkglcontext-x11.c x11: Handle window getting unmapped while frame still pending 2020-06-30 14:36:07 -04:00
gdkglcontext-x11.h x11: Defer _NET_WM_FRAME_DRAWN update until frame usable by compositor 2020-06-05 10:01:13 -04:00
gdkkeys-x11.c Fix minor typos 2020-05-28 11:00:03 +03:00
gdkkeys-x11.h Rename gdkx11keys.h 2020-04-07 18:12:58 +01:00
gdkmain-x11.c Rename master and slave device 2020-06-18 19:22:20 +01:00
gdkmonitor-x11.c Move fullscreen-mode to GdkToplevel 2020-03-12 15:30:11 -04:00
gdkmonitor-x11.h
gdkprivate-x11.h x11: Defer _NET_WM_FRAME_DRAWN update until frame usable by compositor 2020-06-05 10:01:13 -04:00
gdkproperty-x11.c Fix minor typos 2020-06-18 10:47:16 +03:00
gdkscreen-x11.c display: Remove the monitor signals 2020-05-17 07:10:34 +02:00
gdkscreen-x11.h Fix minor typos 2020-05-28 11:00:03 +03:00
gdkselection-x11.c x11: Get rid of GdkAtom and APIs supporting it. 2020-02-23 01:59:26 +01:00
gdkselectioninputstream-x11.c gdkselectioninputstream-x11: Fix memory leak 2018-09-16 20:08:25 +05:30
gdkselectioninputstream-x11.h
gdkselectionoutputstream-x11.c x11: Avoid a critical in clipboard data transfer 2020-05-12 21:31:19 -04:00
gdkselectionoutputstream-x11.h
gdksettings.c Add a gtk-overlay-scrolling setting 2019-05-31 14:07:15 +00:00
gdksurface-x11.c Rename master and slave device 2020-06-18 19:22:20 +01:00
gdksurface-x11.h x11: Defer _NET_WM_FRAME_DRAWN update until frame usable by compositor 2020-06-05 10:01:13 -04:00
gdktextlistconverter-x11.c x11: Get rid of GdkAtom and APIs supporting it. 2020-02-23 01:59:26 +01:00
gdktextlistconverter-x11.h
gdkvisual-x11.c
gdkvisual-x11.h gdk: Drop the GdkByteOrder enum 2020-05-26 19:45:01 -04:00
gdkvulkancontext-x11.c Fix minor typos 2020-05-28 11:00:03 +03:00
gdkvulkancontext-x11.h
gdkx11applaunchcontext.h Use a single compilation symbol 2019-11-27 13:33:43 +00:00
gdkx11device-xi2.h
gdkx11device.h Use a single compilation symbol 2019-11-27 13:33:43 +00:00
gdkx11devicemanager-xi2.h
gdkx11devicemanager.h Use a single compilation symbol 2019-11-27 13:33:43 +00:00
gdkx11display.h x11: Remove gdk_x11_register_standard_event_type() 2020-05-17 01:02:17 +02:00
gdkx11dnd.h Use a single compilation symbol 2019-11-27 13:33:43 +00:00
gdkx11glcontext.h Use a single compilation symbol 2019-11-27 13:33:43 +00:00
gdkx11monitor.h Use a single compilation symbol 2019-11-27 13:33:43 +00:00
gdkx11property.h x11: Get rid of GdkAtom and APIs supporting it. 2020-02-23 01:59:26 +01:00
gdkx11screen.h x11: Get rid of GdkAtom and APIs supporting it. 2020-02-23 01:59:26 +01:00
gdkx11selection.h x11: Get rid of GdkAtom and APIs supporting it. 2020-02-23 01:59:26 +01:00
gdkx11surface.h Use a single compilation symbol 2019-11-27 13:33:43 +00:00
gdkx11utils.h Use a single compilation symbol 2019-11-27 13:33:43 +00:00
gdkx-autocleanups.h gdk: Make GdkKeymap a private api 2020-04-06 16:32:03 -04:00
gdkx.h gdk: Make GdkKeymap a private api 2020-04-06 16:32:03 -04:00
gdkxftdefaults.c Don't use xsettings or xft defaults in testsuite 2020-02-03 15:11:35 +01:00
gdkxid.c x11: Stop using child surface api 2019-05-28 20:25:13 +00:00
meson.build x11: Add back support for the damage extension 2020-06-05 10:01:13 -04:00
MwmUtil.h
xsettings-client.c x11: Don't pass a GdkEvent to xsettings filters 2020-02-21 00:40:52 -05:00
xsettings-client.h x11: Don't pass a GdkEvent to xsettings filters 2020-02-21 00:40:52 -05:00