data-device: Use weston_surface_has_content()
Now we've got a wrapper which tells us whether or not the surface has valid content, use it. The 'XXX' comment was removed because it's the same pattern as every other surface-role implementor: if the surface is not mapped but does have valid content, then map it. Signed-off-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
committed by
Marius Vlad
parent
888d08d8a5
commit
dd6b5a190e
@@ -420,8 +420,7 @@ drag_surface_configure(struct weston_drag *drag,
|
|||||||
assert((pointer != NULL && touch == NULL) ||
|
assert((pointer != NULL && touch == NULL) ||
|
||||||
(pointer == NULL && touch != NULL));
|
(pointer == NULL && touch != NULL));
|
||||||
|
|
||||||
/* XXX: Why are we checking for a valid buffer here too ... ? */
|
if (!weston_surface_is_mapped(es) && weston_surface_has_content(es)) {
|
||||||
if (!weston_surface_is_mapped(es) && es->buffer_ref.buffer) {
|
|
||||||
if (pointer && pointer->sprite &&
|
if (pointer && pointer->sprite &&
|
||||||
weston_view_is_mapped(pointer->sprite))
|
weston_view_is_mapped(pointer->sprite))
|
||||||
list = &pointer->sprite->layer_link;
|
list = &pointer->sprite->layer_link;
|
||||||
|
|||||||
Reference in New Issue
Block a user