vtop
vtop copied to clipboard
Multi monitor issue
Hello,
I've got a multi monitor setup in which one monitor is smaller than the other.
If vtop is opened in the bigger one and the mouse cursor goes off the smaller monitor bounds, vtop quits.
Cheers
Ah no way. That's a nice juicy edge case. I have two monitors at the office so I'll give it a whirl.
What's platform/terminal are you using?
I'm using Ubuntu 14.04 (gnome).
Cheers
On Wed, Jul 2, 2014 at 5:22 PM, James Hall [email protected] wrote:
Ah no way. That's a nice juicy edge case. I have two monitors at the office so I'll give it a whirl.
What's platform/terminal are you using?
— Reply to this email directly or view it on GitHub https://github.com/MrRio/vtop/issues/40#issuecomment-47830709.
More observations.
It seems that the terminal window must be maximized to reproduce it.
Also, even though the monitors are different in width and height, it seems that the problem only occurs with width not height (i.e. vtop does not quits when the mouse cursor reaches the bottom of the bigger one).
Now I wonder if the monitor size difference is really the source of the problem...
I can confirm this issue on Ubuntu 14.10. For me it happens when I maximize the window. It quits, and my terminal ends up with this: C�ZC�ZC�ZC�ZC�ZC�ZC�ZC�ZC
This is the mouse reporting mode.
There are several modes the terminal can use to report the mouse position, unfortunately, there is no good way of detecting which can be used (the terminal can send a sequence that basically says "I'm a real XTerm version number 277" but this is BAD).
The second unfortunate thing is that the original XTerm encoding uses bare bytes to send the responses not the decimal SGR
mode. The result is that a careless terminal emulator will start sending control characters in it's mouse report if the cursor goes past column 230.
The best an application can do is to turn off the mouse if the screen is over 230 characters wide and we're not using SGR mode. (It may also be reasonable to force SGR mode in that case)