right-click sent FocusLost. #3998

Closed
wsdjeg opened this Issue Jan 13, 2016 · 16 comments

Comments

Projects
None yet
3 participants
Contributor

wsdjeg commented Jan 13, 2016

here is my mini vimrc only one line,my os is ubuntu ,gnome-terminal.

autocmd FocusLost * :let g:cnt=get(g:, 'cnt', 0) + 1 | echomsg 'FocusLost' g:cnt

open a file with neovim
:message
the type right-click in the message area, the message will be close ,and show me FocusLost 1
:message again
type right-click ,same as before,and show FocusLost 2
:message agagin
type Alt them show me FocusLost 6
:message again
type win which is super as os 7

EDIT: I have test another terminal terminator it works well ,but also some other button treated as FocusLost.I think maybe this butten sand an esc to the terminal

Owner

justinmk commented Jan 13, 2016

What is set mouse ?

Contributor

wsdjeg commented Jan 13, 2016

I have tested set mouse= and set mouse=a,get the same reslut,
EDIT: and I want to use right-click to open the context menu,then I can chooce what I want,but when I type right-click on the message area or popup menu, both the popup and message area will be closed first,but in vim ,it works well

Contributor

ZyX-I commented Jan 13, 2016

@justinmk set mouse should not be relevant, mouse events are not converted to FocusLost or something is completely wrong.

Owner

justinmk commented Jan 13, 2016

Well, if the host terminal is showing a menu on right-click, wouldn't it makesense for FocusLost to fire?

Contributor

ZyX-I commented Jan 13, 2016

@justinmk It is terminal business to send FocusLost. Konsole does not do this.

Also note that with Vim FocusLost (GTK GUI) does not close messages. Have not checked the popup, but I guess it is not closed as well.

Contributor

wsdjeg commented Jan 14, 2016

gvim works well,vim in gnome-terminal works well,only neovim's message and popupmenu well be closed on right click,and this happebd not only when click on the message area,but also on the main area
EDIT: by the way,neovim right click can works well in termintor

Contributor

wsdjeg commented Jan 16, 2016

Anyone can help me ,if you are using ubuntu ,can you try with this issue?

@justinmk justinmk added this to the 0.3 milestone Jan 18, 2016

Contributor

wsdjeg commented Jan 18, 2016

@justinmk I have change to ubuntu 14.04LTS,and this issue is gone.I think it is the issue of gnome-terminal, not neovim itself

@wsdjeg wsdjeg closed this Jan 18, 2016

Owner

justinmk commented Jan 18, 2016

Thanks for followup. Must be libvte https://github.com/GNOME/vte

Contributor

wsdjeg commented Jan 18, 2016

thanks ,by the way,I think there is no need to use the daily build ubuntu os now ,just waitting for the release version.

@justinmk justinmk added tui and removed unconfirmed labels Jan 19, 2016

Contributor

wsdjeg commented Jan 30, 2016

@justinmk I just test in ubuntu 16.04(daily build) in virturlbox,
in gnome-terminal ,neovim still has this issue,gnome-terminal version is 3.18.2;
but now I am using ubuntu 14.04 with gnome-terminal 3.12.3,everything works well.

if need,we can reopen this issue.

@wsdjeg wsdjeg reopened this Feb 1, 2016

Owner

justinmk commented Feb 6, 2016

Sounds like a configuration issue.

@justinmk justinmk closed this Feb 6, 2016

Contributor

wsdjeg commented Feb 7, 2016

not configuration issue,all test in same config,just with different gnome-terminal version

Contributor

ZyX-I commented Feb 7, 2016

@wsdjeg I guess he meant gnom-terminal configuration issue. Also note that we cannot and should not do anything with gnome-terminal sending FocusLost. It it the responsibility of terminal to send FocusLost and if you think it should not send FocusLost on certain events you need to go to to gnome-terminal bug tracker.

But we can and should do something with redraw on FocusLost and it was the meaning of the issue referenced from your previous issue that was closed as duplicate.

Owner

justinmk commented Feb 7, 2016

For reference, FocusLost redraw issue: #3416

Contributor

wsdjeg commented Feb 7, 2016

agree with you @ZyX-I

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment