Bug 250400 - x11/xterm: update to patch #361 broke cut/paste with shift key and mouse
Summary: x11/xterm: update to patch #361 broke cut/paste with shift key and mouse
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Emanuel Haupt
Depends on:
Reported: 2020-10-16 16:22 UTC by Marco Beishuizen
Modified: 2020-10-18 20:44 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (ehaupt)


Note You need to log in before you can comment on or make changes to this bug.
Description Marco Beishuizen 2020-10-16 16:22:35 UTC
Today I updated x11/xterm to the latest patchlevel (#361). Now copying and pasting is broken. Selecting text with the shift key and right mouse button doesn't work.
Comment 1 Marco Beishuizen 2020-10-16 16:24:55 UTC
This only seems to happen in most xterm applications like lynx etc. Selecting in plain xterm still works.
Comment 2 Thomas E. Dickey 2020-10-16 20:11:04 UTC
hmm - it seemed to work properly for me:

amend rule for using shift-key to override mouse-protocol for select/paste to limit that feature to mouse-buttons which are actually bound to select/paste actions

Either I overlooked some case here, or there's some user-configured translations resource that I'm mishandling.
Comment 3 Emanuel Haupt freebsd_committer 2020-10-16 20:34:36 UTC
Same here. I don't see any issues with copy/paste. Could you maybe provide steps how to reproduce the error you're seeing?
Comment 4 Marco Beishuizen 2020-10-17 08:59:08 UTC
Steps are simple:
1 run lynx
2 try to select some text by pressing the shift key + right mouse click

Found out that this works in irc/irssi, but not in www/lynx or mail/alpine.
Maybe it has something to do with ncurses?
Comment 5 Marco Beishuizen 2020-10-17 09:03:22 UTC
Sorry step 2 is shift key + left mouse click of course.
Comment 6 Emanuel Haupt freebsd_committer 2020-10-17 10:58:56 UTC
This works fine on my machine. Can you share your xterm specific resource configuration?
Comment 7 Marco Beishuizen 2020-10-17 11:13:05 UTC
My .Xresources file:

XTerm*locale:           UTF-8
XTerm*utf8:             1
XTerm*Background:       black
XTerm*Foreground:       white
XTerm*faceName:         hack
XTerm*faceSize:         13
XTerm*cursorBlink:      true
Xft.antialias:          true
Xft.hinting:            false
Xft.hintstyle:          hintnone
Xft.rgba:               rgb
Xcursor.theme:          Vanilla-DMZ
Xcursor.size:           32
URxvt.font:             xft:hack:size=13
URxvt.letterSpace:      -1
URxvt.background:       blue
URxvt.foreground:       white
URxvt.scrollBar:        off
URxvt.scrollstyle:      next
URxvt.scrollBar_right:  true
xconsole.font:          xft:monospace:size=11
xpdf*enableFreetype:    yes
xpdf*antialias:         yes
xosview*geometry:       300x450
Comment 8 Marco Beishuizen 2020-10-17 13:16:38 UTC
This can be closed. Turns out that after the xterm update, I had to actually turn off mouse support in the different applications like lynx and alpine. After that selecting works.

Comment 9 Thomas E. Dickey 2020-10-18 10:41:18 UTC
Revisiting this with a debug-trace and testing with vttest, I think that there's a problem to investigate, since the button-release events aren't absorbed by select/copy actions when shifting the mouse.
Comment 10 Emanuel Haupt freebsd_committer 2020-10-18 12:05:44 UTC
Maybe a bug.
Comment 11 Thomas E. Dickey 2020-10-18 20:28:50 UTC
There's something to improve, but at the moment I don't believe it's what was reported here.

I was looking at the motion-events which are reported (sending an escape sequence) while in any-event or button-event mode.  That would require a special terminal description for lynx to see those (and it wouldn't use them, actually, though ncurses might be confused).

At the moment I'm working on an improvement for the motion-events, to make the special-case work consistently with the change I made for button-events.  I'll probably be seeing some bug-report for this inconsistency, but a regression in select/paste is more urgent.
Comment 12 Emanuel Haupt freebsd_committer 2020-10-18 20:44:58 UTC
OK. I'll close this report. Should new facts arise we can always re-open it.