mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-06-20 07:18:23 +02:00
compositor: use early return in set sync/desync
Trivial change for clarity. Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
parent
3674d9665b
commit
2deb5e1dfd
1 changed files with 8 additions and 3 deletions
|
|
@ -5895,8 +5895,10 @@ subsurface_set_sync(struct wl_client *client, struct wl_resource *resource)
|
|||
{
|
||||
struct weston_subsurface *sub = wl_resource_get_user_data(resource);
|
||||
|
||||
if (sub)
|
||||
sub->synchronized = true;
|
||||
if (!sub)
|
||||
return;
|
||||
|
||||
sub->synchronized = true;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -5904,7 +5906,10 @@ subsurface_set_desync(struct wl_client *client, struct wl_resource *resource)
|
|||
{
|
||||
struct weston_subsurface *sub = wl_resource_get_user_data(resource);
|
||||
|
||||
if (sub && sub->synchronized) {
|
||||
if (!sub)
|
||||
return;
|
||||
|
||||
if (sub->synchronized) {
|
||||
sub->synchronized = false;
|
||||
|
||||
/* If sub became effectively desynchronized, flush. */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue