Fix some minor problems

* seat.c (DispatchEntryExit): Understand all kinds of entry and
exit events instead of just non-grab ones.
* subcompositor.c (SubcompositorComposite1): Remove redundant
assignment.
* xerror.c (CategorizeClients): Add new assertion.

* tests/select_test.c (verify_sample_text):
(verify_sample_text_multiple): Fix typos.
This commit is contained in:
hujianwei 2022-11-13 13:45:11 +00:00
parent 563422d8cf
commit 30f22613b8
4 changed files with 32 additions and 30 deletions

16
seat.c
View file

@ -3622,13 +3622,14 @@ DispatchEntryExit (Subcompositor *subcompositor, XIEnterEvent *event)
if (!seat)
return;
if (event->mode != XINotifyGrab
&& event->mode != XINotifyUngrab)
{
/* This is not an event generated by grab activation or
deactivation. Set the last seen subcompositor, or clear it
on XI_Leave. The last seen subcompositor is used to
determine the surface to which a grab will be released. */
/* Set the last seen subcompositor, or clear it on XI_Leave. The
last seen subcompositor is used to determine the surface to which
a grab will be released.
All entry and exit events must be respected here, including those
resulting from grabs! Otherwise, if some other client has
grabbed the pointer, last_seen_subcompositor will not be kept up
to date. */
if (event->evtype == XI_Leave
|| subcompositor != seat->last_seen_subcompositor)
@ -3652,7 +3653,6 @@ DispatchEntryExit (Subcompositor *subcompositor, XIEnterEvent *event)
seat->last_seen_subcompositor_window = event->event;
}
}
}
if (event->mode == XINotifyUngrab
&& seat->grab_surface)

View file

@ -2852,11 +2852,11 @@ SubcompositorComposite1 (Subcompositor *subcompositor,
}
/* This goes down the XCopyArea code path, unless presentation
happened, in which case it does nothing. */
happened, in which case it does nothing. No key must be
returned, as the given callback is NULL. */
pixman_region32_translate (damage, -subcompositor->min_x,
-subcompositor->min_y);
key = RenderFinishRender (subcompositor->target, &copy, NULL,
NULL);
RenderFinishRender (subcompositor->target, &copy, NULL, NULL);
pixman_region32_fini (&copy);
}

View file

@ -198,7 +198,7 @@ verify_sample_text (Time time)
die ("pipe");
display_string = DisplayString (display->x_display);
time = sprintf (time_buffer, "%lu", time);
sprintf (time_buffer, "%lu", time);
pid = fork ();
if (pid == -1)
@ -264,7 +264,7 @@ verify_sample_text_multiple (Time time)
die ("pipe");
display_string = DisplayString (display->x_display);
time = sprintf (time_buffer, "%lu", time);
sprintf (time_buffer, "%lu", time);
pid = fork ();
if (pid == -1)

View file

@ -229,6 +229,8 @@ CategorizeClients (struct wl_list *client_list,
clients[i - 1] = client;
}
}
XLAssert (i == wl_list_length (client_list));
}
static void