Bug 60617 - Clipboard doesn't properly store data of client that closes
Summary: Clipboard doesn't properly store data of client that closes
Status: RESOLVED FIXED
Alias: None
Product: Wayland
Classification: Unclassified
Component: weston (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Wayland bug list
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-10 21:33 UTC by nerdopolis1
Modified: 2013-02-18 21:53 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
call wl_data_device_set_keyboard_focus in seat_get_keyboard (1.18 KB, patch)
2013-02-17 14:58 UTC, Rafal Mielniczuk
Details | Splinter Review

Description nerdopolis1 2013-02-10 21:33:57 UTC
When I copy text from a weston terminal, and then I close it out, and then I open a new weston terminal to paste the text, it seems the text does not get pasted.

Interestingly enough, if I then go to paste onto an existing client that was running when I copied the text, like weston-desktop shell, (with the CTRL+V key command), and then I attempt to paste onto the new weston terminal, the clipboard that I copied from the first weston terminal comes back into the clipboard and pastes.
Comment 1 Rafal Mielniczuk 2013-02-17 14:58:10 UTC
Created attachment 74985 [details] [review]
call wl_data_device_set_keyboard_focus in seat_get_keyboard

For me ctrl+v doesn't work for any newly opened client, until I explicitly activate it with mouse click, but I think both use cases are related.

I investigated a bit, and it is because during first call to weston_surface_activate wl_seat.focus_resource is not set up, due to seat_get_keyboard being called later.

Proposed patch calls wl_data_device_set_keyboard_focus in seat_get_keyboard, so it can send data offer for newly created client.

Or maybe better fix is to somehow delay first weston_surface_activate until seat_get_keyboard is called first?
Comment 2 Kristian Høgsberg 2013-02-18 21:53:59 UTC
(In reply to comment #1)
> Created attachment 74985 [details] [review] [review]
> call wl_data_device_set_keyboard_focus in seat_get_keyboard
> 
> For me ctrl+v doesn't work for any newly opened client, until I explicitly
> activate it with mouse click, but I think both use cases are related.
> 
> I investigated a bit, and it is because during first call to
> weston_surface_activate wl_seat.focus_resource is not set up, due to
> seat_get_keyboard being called later.
> 
> Proposed patch calls wl_data_device_set_keyboard_focus in seat_get_keyboard,
> so it can send data offer for newly created client.
> 
> Or maybe better fix is to somehow delay first weston_surface_activate until
> seat_get_keyboard is called first?

That sounds right, good analysis.  Committed to master and 1.0 branch, thanks.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.