|
|
@ -370,6 +370,7 @@ weston_wm_read_data_source(int fd, uint32_t mask, void *data) |
|
|
|
if (len == -1) { |
|
|
|
if (len == -1) { |
|
|
|
weston_log("read error from data source: %m\n"); |
|
|
|
weston_log("read error from data source: %m\n"); |
|
|
|
weston_wm_send_selection_notify(wm, XCB_ATOM_NONE); |
|
|
|
weston_wm_send_selection_notify(wm, XCB_ATOM_NONE); |
|
|
|
|
|
|
|
if (wm->property_source) |
|
|
|
wl_event_source_remove(wm->property_source); |
|
|
|
wl_event_source_remove(wm->property_source); |
|
|
|
wm->property_source = NULL; |
|
|
|
wm->property_source = NULL; |
|
|
|
close(fd); |
|
|
|
close(fd); |
|
|
@ -394,6 +395,7 @@ weston_wm_read_data_source(int fd, uint32_t mask, void *data) |
|
|
|
1, &incr_chunk_size); |
|
|
|
1, &incr_chunk_size); |
|
|
|
wm->selection_property_set = 1; |
|
|
|
wm->selection_property_set = 1; |
|
|
|
wm->flush_property_on_delete = 1; |
|
|
|
wm->flush_property_on_delete = 1; |
|
|
|
|
|
|
|
if (wm->property_source) |
|
|
|
wl_event_source_remove(wm->property_source); |
|
|
|
wl_event_source_remove(wm->property_source); |
|
|
|
wm->property_source = NULL; |
|
|
|
wm->property_source = NULL; |
|
|
|
weston_wm_send_selection_notify(wm, wm->selection_request.property); |
|
|
|
weston_wm_send_selection_notify(wm, wm->selection_request.property); |
|
|
@ -402,6 +404,7 @@ weston_wm_read_data_source(int fd, uint32_t mask, void *data) |
|
|
|
"property delete\n", wm->source_data.size); |
|
|
|
"property delete\n", wm->source_data.size); |
|
|
|
|
|
|
|
|
|
|
|
wm->flush_property_on_delete = 1; |
|
|
|
wm->flush_property_on_delete = 1; |
|
|
|
|
|
|
|
if (wm->property_source) |
|
|
|
wl_event_source_remove(wm->property_source); |
|
|
|
wl_event_source_remove(wm->property_source); |
|
|
|
wm->property_source = NULL; |
|
|
|
wm->property_source = NULL; |
|
|
|
} else { |
|
|
|
} else { |
|
|
@ -416,6 +419,7 @@ weston_wm_read_data_source(int fd, uint32_t mask, void *data) |
|
|
|
weston_wm_flush_source_data(wm); |
|
|
|
weston_wm_flush_source_data(wm); |
|
|
|
weston_wm_send_selection_notify(wm, wm->selection_request.property); |
|
|
|
weston_wm_send_selection_notify(wm, wm->selection_request.property); |
|
|
|
xcb_flush(wm->conn); |
|
|
|
xcb_flush(wm->conn); |
|
|
|
|
|
|
|
if (wm->property_source) |
|
|
|
wl_event_source_remove(wm->property_source); |
|
|
|
wl_event_source_remove(wm->property_source); |
|
|
|
wm->property_source = NULL; |
|
|
|
wm->property_source = NULL; |
|
|
|
close(fd); |
|
|
|
close(fd); |
|
|
@ -435,6 +439,7 @@ weston_wm_read_data_source(int fd, uint32_t mask, void *data) |
|
|
|
weston_wm_flush_source_data(wm); |
|
|
|
weston_wm_flush_source_data(wm); |
|
|
|
} |
|
|
|
} |
|
|
|
xcb_flush(wm->conn); |
|
|
|
xcb_flush(wm->conn); |
|
|
|
|
|
|
|
if (wm->property_source) |
|
|
|
wl_event_source_remove(wm->property_source); |
|
|
|
wl_event_source_remove(wm->property_source); |
|
|
|
wm->property_source = NULL; |
|
|
|
wm->property_source = NULL; |
|
|
|
close(wm->data_source_fd); |
|
|
|
close(wm->data_source_fd); |
|
|
|