mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-29 19:28:19 +02:00
dnd: Abort with an error message if compositor doesn't support drag and drop
This test isn't particularly useful when the compositor doesn't support drag and drop - so bail if we fail to create a data source. Signed-off-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
parent
11b6242ba9
commit
bd9069ffad
1 changed files with 4 additions and 0 deletions
|
|
@ -534,6 +534,10 @@ create_drag_source(struct dnd *dnd,
|
|||
} else {
|
||||
dnd_drag->data_source =
|
||||
display_create_data_source(dnd->display);
|
||||
if (!dnd_drag->data_source) {
|
||||
fprintf(stderr, "No data device manager\n");
|
||||
abort();
|
||||
}
|
||||
wl_data_source_add_listener(dnd_drag->data_source,
|
||||
&data_source_listener,
|
||||
dnd_drag);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue