Fix middle-click insert primary selection for Wayland (N/A) to insert from clipboard instead

This commit is contained in:
Stephen Boddy 2015-12-02 22:48:33 +01:00
parent 7518c16588
commit 62ebf0cf30
1 changed files with 4 additions and 3 deletions

View File

@ -13,7 +13,7 @@ from gi.repository import Vte
import subprocess
import urllib
from util import dbg, err, spawn_new_terminator, make_uuid, manual_lookup
from util import dbg, err, spawn_new_terminator, make_uuid, manual_lookup, display_manager
import util
from config import Config
from cwd import get_default_cwd
@ -924,11 +924,12 @@ class Terminal(Gtk.VBox):
# Suppress double-click behavior
return True
use_primary = (display_manager() != 'WAYLAND')
if self.config['putty_paste_style']:
middle_click = [self.popup_menu, (widget, event)]
right_click = [self.paste_clipboard, (True, )]
right_click = [self.paste_clipboard, (use_primary, )]
else:
middle_click = [self.paste_clipboard, (True, )]
middle_click = [self.paste_clipboard, (use_primary, )]
right_click = [self.popup_menu, (widget, event)]
if event.button == self.MOUSEBUTTON_LEFT: