diff options
author | Hans de Goede <hdegoede@redhat.com> | 2019-11-04 15:01:18 +0100 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2020-02-23 18:05:18 +0100 |
commit | d4faab8708779df265239b203ed5f020bff681bf (patch) | |
tree | 2f3d7cc33f262bd5edd9411ae71bca593820b7f8 /hw | |
parent | 148f428dfccf606b932a00d5a00af06e8dca8a7e (diff) |
xwayland: Remove unnecessary xwl_window_is_toplevel() check from xwl_output_set_window_randr_emu_props()
Since the recent fix to call xwl_output_set_window_randr_emu_props() from
ensure_surface_for_window(), it is now only called on a toplevel window,
so the is-toplevel check is not necessary for the
xwl_output_set_window_randr_emu_props() case.
This commit moves the check to xwl_output_set_randr_emu_prop_callback()
so that we only do it when we are walking over all Windows of a client
to update the property on a change of the emulated resolution.
Acked-by: Olivier Fourdan <ofourdan@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/xwayland/xwayland-output.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/hw/xwayland/xwayland-output.c b/hw/xwayland/xwayland-output.c index 933f8f63b..04eb42e8e 100644 --- a/hw/xwayland/xwayland-output.c +++ b/hw/xwayland/xwayland-output.c @@ -472,9 +472,6 @@ static void xwl_output_set_randr_emu_prop(WindowPtr window, struct xwl_output_randr_emu_prop *prop) { - if (!xwl_window_is_toplevel(window)) - return; - if (prop->rect_count) { dixChangeWindowProperty(serverClient, window, prop->atom, XA_CARDINAL, 32, PropModeReplace, @@ -487,7 +484,8 @@ xwl_output_set_randr_emu_prop(WindowPtr window, static void xwl_output_set_randr_emu_prop_callback(void *resource, XID id, void *user_data) { - xwl_output_set_randr_emu_prop(resource, user_data); + if (xwl_window_is_toplevel(resource)) + xwl_output_set_randr_emu_prop(resource, user_data); } static void |