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)
|
if (!seat)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (event->mode != XINotifyGrab
|
/* Set the last seen subcompositor, or clear it on XI_Leave. The
|
||||||
&& event->mode != XINotifyUngrab)
|
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
|
if (seat->last_seen_subcompositor)
|
||||||
deactivation. Set the last seen subcompositor, or clear it
|
SubcompositorRemoveDestroyCallback (seat->subcompositor_callback);
|
||||||
on XI_Leave. The last seen subcompositor is used to
|
|
||||||
determine the surface to which a grab will be released. */
|
|
||||||
|
|
||||||
if (event->evtype == XI_Leave
|
seat->last_seen_subcompositor = NULL;
|
||||||
|| subcompositor != seat->last_seen_subcompositor)
|
seat->subcompositor_callback = NULL;
|
||||||
|
|
||||||
|
if (event->evtype == XI_Enter)
|
||||||
{
|
{
|
||||||
if (seat->last_seen_subcompositor)
|
/* Attach the new subcompositor. */
|
||||||
SubcompositorRemoveDestroyCallback (seat->subcompositor_callback);
|
seat->last_seen_subcompositor = subcompositor;
|
||||||
|
seat->subcompositor_callback
|
||||||
|
= SubcompositorOnDestroy (subcompositor,
|
||||||
|
HandleSubcompositorDestroy,
|
||||||
|
seat);
|
||||||
|
|
||||||
seat->last_seen_subcompositor = NULL;
|
/* Also set the window used. */
|
||||||
seat->subcompositor_callback = NULL;
|
seat->last_seen_subcompositor_window = event->event;
|
||||||
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2852,11 +2852,11 @@ SubcompositorComposite1 (Subcompositor *subcompositor,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This goes down the XCopyArea code path, unless presentation
|
/* 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,
|
pixman_region32_translate (damage, -subcompositor->min_x,
|
||||||
-subcompositor->min_y);
|
-subcompositor->min_y);
|
||||||
key = RenderFinishRender (subcompositor->target, ©, NULL,
|
RenderFinishRender (subcompositor->target, ©, NULL, NULL);
|
||||||
NULL);
|
|
||||||
pixman_region32_fini (©);
|
pixman_region32_fini (©);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -198,7 +198,7 @@ verify_sample_text (Time time)
|
||||||
die ("pipe");
|
die ("pipe");
|
||||||
|
|
||||||
display_string = DisplayString (display->x_display);
|
display_string = DisplayString (display->x_display);
|
||||||
time = sprintf (time_buffer, "%lu", time);
|
sprintf (time_buffer, "%lu", time);
|
||||||
pid = fork ();
|
pid = fork ();
|
||||||
|
|
||||||
if (pid == -1)
|
if (pid == -1)
|
||||||
|
@ -264,7 +264,7 @@ verify_sample_text_multiple (Time time)
|
||||||
die ("pipe");
|
die ("pipe");
|
||||||
|
|
||||||
display_string = DisplayString (display->x_display);
|
display_string = DisplayString (display->x_display);
|
||||||
time = sprintf (time_buffer, "%lu", time);
|
sprintf (time_buffer, "%lu", time);
|
||||||
pid = fork ();
|
pid = fork ();
|
||||||
|
|
||||||
if (pid == -1)
|
if (pid == -1)
|
||||||
|
|
2
xerror.c
2
xerror.c
|
@ -229,6 +229,8 @@ CategorizeClients (struct wl_list *client_list,
|
||||||
clients[i - 1] = client;
|
clients[i - 1] = client;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
XLAssert (i == wl_list_length (client_list));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Add table
Reference in a new issue