Keep waiting for a pending flip if drm_handle_event returns 0

drm_wait_pending_flip stopped waiting if drm_handle_event returned 0,
but that might have processed only some unrelated DRM events. As long as
the flip is pending, we have to keep waiting for its completion event.

Noticed while working on the previous fix.

Acked-by: Alex Deucher <alexander.deucher@amd.com>
12 jobs for bugzilla-109364 in 1 minute and 4 seconds (queued for 1 second)
Status Name Job ID Coverage
  Docker Image
passed debian-testing #89819

00:00:16

 
  Build
passed xserver-1.13 #89822

00:00:34

passed xserver-1.14 #89823

00:00:30

passed xserver-1.15 #89824

00:00:37

passed xserver-1.16 #89825

00:00:32

passed xserver-1.17 #89826

00:00:38

passed xserver-1.18 #89827

00:00:32

passed xserver-1.18-clang #89828

00:00:34

passed xserver-1.19 #89829

00:00:40

passed xserver-1.19-clang #89830

00:00:40

passed xserver-1.20 #89820

00:00:47

passed xserver-1.20-clang #89821

00:00:38