eyelash / xi-gtk

a GTK front-end for the Xi editor
Apache License 2.0
355 stars 23 forks source link

implement primary clipboard pasting using middle-click #38

Closed jmi2k closed 7 years ago

jmi2k commented 7 years ago

Very simple change to allow middle-click primary clipboard pasting.

I'd like to get some feedback, as adding function calls and ifs to button_press_event seems a bit messy. Also it's not very future-proof, as it keeps calling send_click, which could have unexpected side-effects on the long run.

eyelash commented 7 years ago

I guess at some point in the future the whole event handling stuff will be ported to Gtk.Gesture (#34) so the approach here seems to be fine for now.

eyelash commented 7 years ago

Thanks!