Unwanted cursor and menu offset/warpage

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Unwanted cursor and menu offset/warpage

Skip Montanaro
My work environment is suboptimal. I do all my work on Linux machines
(they pay me to program for that general platform). However, they see
fit to plop a Windows 7 box on my desk and I've so far been unable to
convince them to give me something more suitable. My typical Emacs
setup scenario is to use PuTTY to connect to a Linux box and run Emacs
there, with DISPLAY pointed back at the Windows thing. On that box
runs something called VcXsrv.

I actually don't recall if the problem described here is recent or
ongoing, but it's pretty annoying. If, for example, I'm running an
Emacs started with -q, then click a menu item in the title bar, the
menu pops up offset several hundred pixels away from the mouse. This
is as annoying as you might suspect, but since it's so in-your-face,
it's obvious that it's happened, and I can usually move the mouse with
care to pounce on the menu before it disappears or is replaced by the
menu for the adjacent title bar entry.

Worse is the behavior of the pointer while exiting ediff-anything.
Again, with the -q flag (none of my customizations should be active,
right?) if I execute ediff-revision on a file modified from some repo,
it displays the little window/frame, but warps the cursor about 1000
pixels to the right (I have three monitors side-by-side-by-side and
configured Windows to use focus-follows-mouse because I so despised
its click-to-type semantics). Consequently, any keys I press go to the
wrong place. Once I drag the cursor back where it belongs, finish my
ediff session and quit, it warps it again.

The cursor warpage is more problematic than the offset menus because
it involves a much subtler visual change to my environment. I wonder
if anybody might have some suggestions about how to debug this issue,
or have seen and conquered either problem. (I assume they are related
because they both involve screen addressing offsets, but they may well
not be.)

I am going to take a plunge into WinEmacs, see if it behaves any
better in this regard, and see how well it works with Tramp. Of
course, most of the files, directories and mount points I use on Linux
are invisible to Windows...

Skip

Reply | Threaded
Open this post in threaded view
|

Re: Unwanted cursor and menu offset/warpage

Robert Pluim
Skip Montanaro <[hidden email]> writes:

> My work environment is suboptimal. I do all my work on Linux machines
> (they pay me to program for that general platform). However, they see
> fit to plop a Windows 7 box on my desk and I've so far been unable to
> convince them to give me something more suitable. My typical Emacs
> setup scenario is to use PuTTY to connect to a Linux box and run Emacs
> there, with DISPLAY pointed back at the Windows thing. On that box
> runs something called VcXsrv.
>
> I actually don't recall if the problem described here is recent or
> ongoing, but it's pretty annoying. If, for example, I'm running an
> Emacs started with -q, then click a menu item in the title bar, the
> menu pops up offset several hundred pixels away from the mouse. This
> is as annoying as you might suspect, but since it's so in-your-face,
> it's obvious that it's happened, and I can usually move the mouse with
> care to pounce on the menu before it disappears or is replaced by the
> menu for the adjacent title bar entry.
>

Which version of Emacs is this? There were some changes recently
regarding HiDpi screen geometry and menu placement that might improve
matters.

> Worse is the behavior of the pointer while exiting ediff-anything.
> Again, with the -q flag (none of my customizations should be active,
> right?) if I execute ediff-revision on a file modified from some repo,
> it displays the little window/frame, but warps the cursor about 1000
> pixels to the right (I have three monitors side-by-side-by-side and
> configured Windows to use focus-follows-mouse because I so despised
> its click-to-type semantics). Consequently, any keys I press go to the
> wrong place. Once I drag the cursor back where it belongs, finish my
> ediff session and quit, it warps it again.
>
> The cursor warpage is more problematic than the offset menus because
> it involves a much subtler visual change to my environment. I wonder
> if anybody might have some suggestions about how to debug this issue,
> or have seen and conquered either problem. (I assume they are related
> because they both involve screen addressing offsets, but they may well
> not be.)
>
> I am going to take a plunge into WinEmacs, see if it behaves any
> better in this regard, and see how well it works with Tramp. Of
> course, most of the files, directories and mount points I use on Linux
> are invisible to Windows...

If you can persuade your WinEmacs to use some kind of ssh, all your
Linux files will become accessible

Robert

Reply | Threaded
Open this post in threaded view
|

Re: Unwanted cursor and menu offset/warpage

Skip Montanaro
> Which version of Emacs is this? There were some changes recently
> regarding HiDpi screen geometry and menu placement that might improve
> matters.

Apologies. Shortly after posting, I realized I failed to give enough
context. I'm currently using 24.5.1 which comes from our internal
shared Conda environment. (Not sure why the Conda folks felt the need
to build/install Emacs, but they did. I've also tried 24.3.1 (another
locally installed version) and 23.1.1 (/usr/bin/emacs). They all
exhibit the problem to greater or lesser degrees.

It looks like 25.2 is available through Conda. Installed that. No menu
problem so far. Unfortunately, that seems to do a horrible job with
fonts (for example, no antialiasing and extremely limited font
selection).

While launching all these different versions, I noticed that (ignoring
25.2) if the Emacs window is near the left edge of my main (middle)
display or anywhere on my left display, the menu displays properly. If
it's in the middle of the main screen or anywhere to the right of that
(including anywhere on my right screen), the menus come up way to the
left of the actual Emacs window. (At least that gives me a workaround
with version <= 24.)

>> I am going to take a plunge into WinEmacs, see if it behaves any
>> better in this regard, and see how well it works with Tramp. Of
>> course, most of the files, directories and mount points I use on Linux
>> are invisible to Windows...
>
> If you can persuade your WinEmacs to use some kind of ssh, all your
> Linux files will become accessible

Yes, Tramp really shines here. It used (I think) the pscp method,
which I'd never heard of. Unfortunately, things I use all the time,
like ediff, are completely borked by the lack of a working diff
command. Also, with a shared $HOME across Linux and Windows, the Linux
and Windows versions clashed over the subject of which font to use.
Windows wanted to use some proportionally spaced font, and when I
overrode that to Courier New and saved my options, the next time the
Linux Emacs was fired up, it used something totally bizarre. So I
quickly abandoned WinEmacs.

S

Reply | Threaded
Open this post in threaded view
|

Re: Unwanted cursor and menu offset/warpage

Robert Thorpe-2
In reply to this post by Skip Montanaro
Skip Montanaro <[hidden email]> writes:

> My work environment is suboptimal. I do all my work on Linux machines
> (they pay me to program for that general platform). However, they see
> fit to plop a Windows 7 box on my desk and I've so far been unable to
> convince them to give me something more suitable. My typical Emacs
> setup scenario is to use PuTTY to connect to a Linux box and run Emacs
> there, with DISPLAY pointed back at the Windows thing. On that box
> runs something called VcXsrv.

I suggest you switch to using VNC rather than VcXsrv.

At the place I work many people are in the same situation.  The best
solution is to setup a VNC server (most distros come with one), then
install a VNC client on your MS Windows machine.  Then you can do
everything on the remote machine.

VNC suffers from far fewer of these graphical problems.  We use RealVNC,
the GPL version.

BR,
Robert Thorpe


Reply | Threaded
Open this post in threaded view
|

Re: Unwanted cursor and menu offset/warpage

Skip Montanaro
> I suggest you switch to using VNC rather than VcXsrv.

Thanks. Unfortunately, that decision is completely out of my control.
As far as I know, VNC is nowhere to be found where I work, and I can't
take it upon myself to download my own tools.

Skip

Reply | Threaded
Open this post in threaded view
|

Re: Unwanted cursor and menu offset/warpage

Robert Thorpe-2
Skip Montanaro <[hidden email]> writes:

>> I suggest you switch to using VNC rather than VcXsrv.
>
> Thanks. Unfortunately, that decision is completely out of my control.
> As far as I know, VNC is nowhere to be found where I work, and I can't
> take it upon myself to download my own tools.

If that's the case you'll have the same problem getting Emacs for MS
Windows installed.  Then you'll have the same problem installing each of
the support programs (e.g. diff, grep, etc).

But, if you can install VNC then that's the only program you need.  Then you
can use all of the tools on *nix side that are already there.  Would
your IT department be more favourable to allowing you to install half a dozen programs, or only one?

Also, do you have to ask your IT department before installing anything?  Or,
do you have to ask before using a program with an proper installer?

The latter scheme is quite common.  In that case you shouldn't have any
trouble.  Emacs, the GNUWin32 tools, Eli's windows ports and RealVNC all
install without the use of an installer.

BR,
Robert Thorpe


Reply | Threaded
Open this post in threaded view
|

Re: Unwanted cursor and menu offset/warpage

Skip Montanaro
> If that's the case you'll have the same problem getting Emacs for MS
> Windows installed.  Then you'll have the same problem installing each of
> the support programs (e.g. diff, grep, etc).

Correct. Emacs for Windows is available, and Tramp works. Unfortunately
diff (at least) isn't available, so things like ediff don't work.

I'm just going to live with it for now. If I position Emacs to the left
half of my overall display surface, the menus popup where they should.

Skip
Reply | Threaded
Open this post in threaded view
|

Re: Unwanted cursor and menu offset/warpage

ken-93
On 09/23/2017 02:30 PM, Skip Montanaro wrote:

>> If that's the case you'll have the same problem getting Emacs for MS
>> Windows installed.  Then you'll have the same problem installing each of
>> the support programs (e.g. diff, grep, etc).
> Correct. Emacs for Windows is available, and Tramp works. Unfortunately
> diff (at least) isn't available, so things like ediff don't work.
>
> I'm just going to live with it for now. If I position Emacs to the left
> half of my overall display surface, the menus popup where they should.
>
> Skip

Not that long ago I got around such limitations by installing all
verboten software on a personal USB stick that I took home with me at
night. I know, but sometimes you have use ridiculousness in your favor
to get their work done.