mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2025-12-20 16:20:10 +01:00
cliients/dnd: Fix self-only mode
Signed-off-by: Victoria Brekenfeld <github@drakulix.de>
This commit is contained in:
parent
8591578090
commit
11f7273545
1 changed files with 5 additions and 5 deletions
|
|
@ -515,7 +515,7 @@ create_drag_source(struct dnd *dnd,
|
||||||
dnd_drag->drag_surface =
|
dnd_drag->drag_surface =
|
||||||
wl_compositor_create_surface(compositor);
|
wl_compositor_create_surface(compositor);
|
||||||
|
|
||||||
if (display_get_data_device_manager_version(display) <
|
if (dnd->self_only || display_get_data_device_manager_version(display) <
|
||||||
WL_DATA_SOURCE_SET_ACTIONS_SINCE_VERSION) {
|
WL_DATA_SOURCE_SET_ACTIONS_SINCE_VERSION) {
|
||||||
/* Data sources version < 3 will not get action
|
/* Data sources version < 3 will not get action
|
||||||
* nor dnd_finished events, as we can't honor
|
* nor dnd_finished events, as we can't honor
|
||||||
|
|
@ -546,12 +546,12 @@ create_drag_source(struct dnd *dnd,
|
||||||
flower_mime_type);
|
flower_mime_type);
|
||||||
wl_data_source_offer(dnd_drag->data_source,
|
wl_data_source_offer(dnd_drag->data_source,
|
||||||
text_mime_type);
|
text_mime_type);
|
||||||
}
|
|
||||||
|
|
||||||
if (display_get_data_device_manager_version(display) >=
|
if (display_get_data_device_manager_version(display) >=
|
||||||
WL_DATA_SOURCE_SET_ACTIONS_SINCE_VERSION) {
|
WL_DATA_SOURCE_SET_ACTIONS_SINCE_VERSION) {
|
||||||
wl_data_source_set_actions(dnd_drag->data_source, actions);
|
wl_data_source_set_actions(dnd_drag->data_source, actions);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
wl_data_device_start_drag(input_get_data_device(input),
|
wl_data_device_start_drag(input_get_data_device(input),
|
||||||
dnd_drag->data_source,
|
dnd_drag->data_source,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue