Cloudef / wlc

High-level Wayland compositor library
MIT License
331 stars 58 forks source link

Notify focused client on changed selection #272

Closed nyorain closed 7 years ago

nyorain commented 7 years ago

This fixes a data.c bug. Currently, it does not send notifications to the focused client when a selection changes which results in a segmentation fault if the clients tries then to receive from the (no longer valid) data offer. Usually clients don't use the wayland protocol when they want to access their own data source but manage it internally which is why this did not introduce any real problems until now, but would e.g. when implementing Sircmpwn/sway#926 (since then the source is changed without that the client can know it).

ddevault commented 7 years ago

This looks fine, but I'm not convinced it'll solve https://github.com/SirCmpwn/sway/issues/926. CLI clients (i.e. clients that don't open a window) aren't going to get focus.

nyorain commented 7 years ago

I fixed the sway issue with a new ipc message (currently preparing the pr).

ddevault commented 7 years ago

Cool, thanks!