forked from 12to11/12to11
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:
parent
563422d8cf
commit
30f22613b8
4 changed files with 32 additions and 30 deletions
50
seat.c
50
seat.c
|
@ -3622,35 +3622,35 @@ DispatchEntryExit (Subcompositor *subcompositor, XIEnterEvent *event)
|
|||
if (!seat)
|
||||
return;
|
||||
|
||||
if (event->mode != XINotifyGrab
|
||||
&& event->mode != XINotifyUngrab)
|
||||
/* 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)
|
||||
{
|
||||
/* 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. */
|
||||
if (seat->last_seen_subcompositor)
|
||||
SubcompositorRemoveDestroyCallback (seat->subcompositor_callback);
|
||||
|
||||
if (event->evtype == XI_Leave
|
||||
|| subcompositor != seat->last_seen_subcompositor)
|
||||
seat->last_seen_subcompositor = NULL;
|
||||
seat->subcompositor_callback = NULL;
|
||||
|
||||
if (event->evtype == XI_Enter)
|
||||
{
|
||||
if (seat->last_seen_subcompositor)
|
||||
SubcompositorRemoveDestroyCallback (seat->subcompositor_callback);
|
||||
/* Attach the new subcompositor. */
|
||||
seat->last_seen_subcompositor = subcompositor;
|
||||
seat->subcompositor_callback
|
||||
= SubcompositorOnDestroy (subcompositor,
|
||||
HandleSubcompositorDestroy,
|
||||
seat);
|
||||
|
||||
seat->last_seen_subcompositor = NULL;
|
||||
seat->subcompositor_callback = NULL;
|
||||
|
||||
if (event->evtype == XI_Enter)
|
||||
{
|
||||
/* Attach the new subcompositor. */
|
||||
seat->last_seen_subcompositor = subcompositor;
|
||||
seat->subcompositor_callback
|
||||
= SubcompositorOnDestroy (subcompositor,
|
||||
HandleSubcompositorDestroy,
|
||||
seat);
|
||||
|
||||
/* Also set the window used. */
|
||||
seat->last_seen_subcompositor_window = event->event;
|
||||
}
|
||||
/* Also set the window used. */
|
||||
seat->last_seen_subcompositor_window = event->event;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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, ©, NULL,
|
||||
NULL);
|
||||
RenderFinishRender (subcompositor->target, ©, NULL, NULL);
|
||||
pixman_region32_fini (©);
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
2
xerror.c
2
xerror.c
|
@ -229,6 +229,8 @@ CategorizeClients (struct wl_list *client_list,
|
|||
clients[i - 1] = client;
|
||||
}
|
||||
}
|
||||
|
||||
XLAssert (i == wl_list_length (client_list));
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Add table
Reference in a new issue