Quantcast

Windows XP (X-Mouse) and new window issues

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Windows XP (X-Mouse) and new window issues

m.brotherston@gmail.com

This is most likely a bug with Windows [what isn't?] but I thought I'd
ask if anyone else experienced this issue, and found a work-around
[other than turning off X-Mouse].

Situation. I downloaded and installed 'TweakUI' for Windows XP. I
turned on the 'X-Mouse :: Activation Follows Mouse' feature, and
selected on 'General :: Focus :: Prevent applications from stealing
focus". - I'm trying to get the closest feel I can to running Linux,
without actually running Linux [requirement]

I use the Windows Version of Vim [downloaded from the vim.org website]
VIM - Vi IMproved 7.1 (2007 May 12, compiled May 12 2007 14:19:39)
MS-Windows 32 bit GUI version with OLE support
Compiled by Bram@KIBAALE

And have a mapping setup for interaction with Cygwin in my .vimrc:
if has("win32")
  set shellslash
  " F2  -- map F2 key to read-write file (autoload should be set for
this!)
  map <silent> <f2>  :silent! !chmod u+w `cygpath "%"`<CR>
  " F3  -- map F3 key to read-only file (autoload should be set for
this!)
  map <silent> <f3>  :silent! !chmod u-w `cygpath "%"`<CR>
else
  " F2  -- map F2 key to read-write file (autoload should be set for
this!)
  map <silent> <f2>  :silent! !chmod u+w %<CR>
  " F3  -- map F3 key to read-only file (autoload should be set for
this!)
  map <silent> <f3>  :silent! !chmod u-w %<CR>
endif

Now every time I press F2/F3 to change permissions of the files, the
mouse jumps half-way across my screen, and I lose focus on Vim. I
think a new window appears/disappears on the screen [like a flicker],
taking the mouse for a ride.
I use this method because I have set up my cpoptions with the value
of: +=W

My Questions:
I heard [somewhere] that the Windows version of vim has some external
application that gets called when attempting to execute external
applications. What is this, and is there another method [other than
using the Cygwin's version of gvim] that I could get gvim to change
file permissions?
Could I recompile gvim to incorporate this external application
directly into gvim, would that help?

Note #1: This mouse jumping also occurs sometimes when I use tag
jumping <ctrl>-] and <ctrl>-T
Note #2: I know I can use the Cygwin's version, however I've had copy/
paste issues between Windows and Cygwin, and while I have 10 instances
of gvim running, I get psst when X crashes!

Thank you for your expertise and understanding,
M

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Windows XP (X-Mouse) and new window issues

Ivan Tishchenko

Maybe, system() will help?

AFAIK, it spawns that console in bg, so it won't steal focus.

I mean,
:call system('chmod ...whatever')

WBR,
Ivan.

> This is most likely a bug with Windows [what isn't?] but I thought I'd
> ask if anyone else experienced this issue, and found a work-around
> [other than turning off X-Mouse].
>
> Situation. I downloaded and installed 'TweakUI' for Windows XP. I
> turned on the 'X-Mouse :: Activation Follows Mouse' feature, and
> selected on 'General :: Focus :: Prevent applications from stealing
> focus". - I'm trying to get the closest feel I can to running Linux,
> without actually running Linux [requirement]
>
> I use the Windows Version of Vim [downloaded from the vim.org website]
> VIM - Vi IMproved 7.1 (2007 May 12, compiled May 12 2007 14:19:39)
> MS-Windows 32 bit GUI version with OLE support
> Compiled by Bram@KIBAALE
>
> And have a mapping setup for interaction with Cygwin in my .vimrc:
> if has("win32")
>   set shellslash
>   " F2  -- map F2 key to read-write file (autoload should be set for
> this!)
>   map <silent> <f2>  :silent! !chmod u+w `cygpath "%"`<CR>
>   " F3  -- map F3 key to read-only file (autoload should be set for
> this!)
>   map <silent> <f3>  :silent! !chmod u-w `cygpath "%"`<CR>
> else
>   " F2  -- map F2 key to read-write file (autoload should be set for
> this!)
>   map <silent> <f2>  :silent! !chmod u+w %<CR>
>   " F3  -- map F3 key to read-only file (autoload should be set for
> this!)
>   map <silent> <f3>  :silent! !chmod u-w %<CR>
> endif
>
> Now every time I press F2/F3 to change permissions of the files, the
> mouse jumps half-way across my screen, and I lose focus on Vim. I
> think a new window appears/disappears on the screen [like a flicker],
> taking the mouse for a ride.
> I use this method because I have set up my cpoptions with the value
> of: +=W
>
> My Questions:
> I heard [somewhere] that the Windows version of vim has some external
> application that gets called when attempting to execute external
> applications. What is this, and is there another method [other than
> using the Cygwin's version of gvim] that I could get gvim to change
> file permissions?
> Could I recompile gvim to incorporate this external application
> directly into gvim, would that help?
>
> Note #1: This mouse jumping also occurs sometimes when I use tag
> jumping <ctrl>-] and <ctrl>-T
> Note #2: I know I can use the Cygwin's version, however I've had copy/
> paste issues between Windows and Cygwin, and while I have 10 instances
> of gvim running, I get psst when X crashes!
>
> Thank you for your expertise and understanding,
> M
>
> >
>
>  


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Windows XP (X-Mouse) and new window issues

m.brotherston@gmail.com

This doesn't seem to work. I've tried the following and the mouse
still jumps across the screen:

map <f3> :call system("time")<CR>

I believe the 'external' application I referred to in my original post
is called 'vimrun.exe'.

Other vimrc points of interest [which I forgot to include in the first
post]:
if has("win32")
    set shell=c:\bin\bash
else
    set shell=/bin/bash
endif

Cygwin is installed in the root [even though Cygwin screams about not
doing this... this was a mandated install location.]

--
M


On Oct 6, 12:40 pm, Ivan Tishchenko <[hidden email]> wrote:

> Maybe, system() will help?
>
> AFAIK, it spawns that console in bg, so it won't steal focus.
>
> I mean,
> :call system('chmod ...whatever')
>
> WBR,
> Ivan.
>
> > This is most likely a bug with Windows [what isn't?] but I thought I'd
> > ask if anyone else experienced this issue, and found a work-around
> > [other than turning off X-Mouse].
>
> > Situation. I downloaded and installed 'TweakUI' for Windows XP. I
> > turned on the 'X-Mouse :: Activation Follows Mouse' feature, and
> > selected on 'General :: Focus :: Prevent applications from stealing
> > focus". - I'm trying to get the closest feel I can to running Linux,
> > without actually running Linux [requirement]
>
> > I use the Windows Version of Vim [downloaded from the vim.org website]
> > VIM - Vi IMproved 7.1 (2007 May 12, compiled May 12 2007 14:19:39)
> > MS-Windows 32 bit GUI version with OLE support
> > Compiled by Bram@KIBAALE
>
> > And have a mapping setup for interaction with Cygwin in my .vimrc:
> > if has("win32")
> >   set shellslash
> >   " F2  -- map F2 key to read-write file (autoload should be set for
> > this!)
> >   map <silent> <f2>  :silent! !chmod u+w `cygpath "%"`<CR>
> >   " F3  -- map F3 key to read-only file (autoload should be set for
> > this!)
> >   map <silent> <f3>  :silent! !chmod u-w `cygpath "%"`<CR>
> > else
> >   " F2  -- map F2 key to read-write file (autoload should be set for
> > this!)
> >   map <silent> <f2>  :silent! !chmod u+w %<CR>
> >   " F3  -- map F3 key to read-only file (autoload should be set for
> > this!)
> >   map <silent> <f3>  :silent! !chmod u-w %<CR>
> > endif
>
> > Now every time I press F2/F3 to change permissions of the files, the
> > mouse jumps half-way across my screen, and I lose focus on Vim. I
> > think a new window appears/disappears on the screen [like a flicker],
> > taking the mouse for a ride.
> > I use this method because I have set up my cpoptions with the value
> > of: +=W
>
> > My Questions:
> > I heard [somewhere] that the Windows version of vim has some external
> > application that gets called when attempting to execute external
> > applications. What is this, and is there another method [other than
> > using the Cygwin's version of gvim] that I could get gvim to change
> > file permissions?
> > Could I recompile gvim to incorporate this external application
> > directly into gvim, would that help?
>
> > Note #1: This mouse jumping also occurs sometimes when I use tag
> > jumping <ctrl>-] and <ctrl>-T
> > Note #2: I know I can use the Cygwin's version, however I've had copy/
> > paste issues between Windows and Cygwin, and while I have 10 instances
> > of gvim running, I get psst when X crashes!
>
> > Thank you for your expertise and understanding,
> > M
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Windows XP (X-Mouse) and new window issues

Gary Johnson

On 2008-10-06, "[hidden email]" <[hidden email]> wrote:

> This doesn't seem to work. I've tried the following and the mouse
> still jumps across the screen:
>
> map <f3> :call system("time")<CR>
>
> I believe the 'external' application I referred to in my original post
> is called 'vimrun.exe'.
>
> Other vimrc points of interest [which I forgot to include in the first
> post]:
> if has("win32")
>     set shell=c:\bin\bash
> else
>     set shell=/bin/bash
> endif
>
> Cygwin is installed in the root [even though Cygwin screams about not
> doing this... this was a mandated install location.]

I tried a couple of experiments, too, including this:

   :set shell=C:\cygwin\bin\date.exe
   :set shellcmdflag=
   :echo system('')

but the mouse pointer still moved.  I found some discussion of the
vimrun command here:

   :help win32-vimrun

Here's an untested idea:  Use Cygwin's run in place of Vim's vimrun.  
Rename vim's vimrun.exe to something else, then copy Cygwin's
/bin/run.exe to where vimrun.exe was and name it vimrun.exe.  I've
used Cygwin's run command to start commands without the annoying DOS
window in other situations--it just might work here.

Regards,
Gary


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Windows XP (X-Mouse) and new window issues

m.brotherston@gmail.com



On Oct 6, 5:48 pm, Gary Johnson <[hidden email]> wrote:

> On 2008-10-06, "[hidden email]" <[hidden email]> wrote:
>
>
>
> > This doesn't seem to work. I've tried the following and the mouse
> > still jumps across the screen:
>
> > map <f3> :call system("time")<CR>
>
> > I believe the 'external' application I referred to in my original post
> > is called 'vimrun.exe'.
>
> > Other vimrc points of interest [which I forgot to include in the first
> > post]:
> > if has("win32")
> >     set shell=c:\bin\bash
> > else
> >     set shell=/bin/bash
> > endif
>
> > Cygwin is installed in the root [even though Cygwin screams about not
> > doing this... this was a mandated install location.]
>
> I tried a couple of experiments, too, including this:
>
>    :set shell=C:\cygwin\bin\date.exe
>    :set shellcmdflag=
>    :echo system('')
>
> but the mouse pointer still moved.  I found some discussion of the
> vimrun command here:
>
>    :help win32-vimrun
>
> Here's an untested idea:  Use Cygwin's run in place of Vim's vimrun.  
> Rename vim's vimrun.exe to something else, then copy Cygwin's
> /bin/run.exe to where vimrun.exe was and name it vimrun.exe.  I've
> used Cygwin's run command to start commands without the annoying DOS
> window in other situations--it just might work here.
>
> Regards,
> Gary

I tested copying the run.exe found in /usr/X11R6/bin/ over vimrun.exe
but this failed miserably. I didn't have a vimrun.exe anywhere else
[other than the win32 version]. I also tried compiling the
'vimrun.exe' as a 'gui' application using WinMain instead of the
simple 'main' but that doesn't seem to do anything [though I must
admit, I'm not familiar with 'windows' programming].

Does anyone know the history on why windows requires the 'vimrun.exe'
anyways? Something about handling Ctrl-C, but that's all I know.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Windows XP (X-Mouse) and new window issues

m.brotherston@gmail.com

On Oct 14, 1:29 pm, "[hidden email]"
<[hidden email]> wrote:

> On Oct 6, 5:48 pm, Gary Johnson <[hidden email]> wrote:
>
>
>
> > On 2008-10-06, "[hidden email]" <[hidden email]> wrote:
>
> > > This doesn't seem to work. I've tried the following and the mouse
> > > still jumps across the screen:
>
> > > map <f3> :call system("time")<CR>
>
> > > I believe the 'external' application I referred to in my original post
> > > is called 'vimrun.exe'.
>
> > > Other vimrc points of interest [which I forgot to include in the first
> > > post]:
> > > if has("win32")
> > >     set shell=c:\bin\bash
> > > else
> > >     set shell=/bin/bash
> > > endif
>
> > > Cygwin is installed in the root [even though Cygwin screams about not
> > > doing this... this was a mandated install location.]
>
> > I tried a couple of experiments, too, including this:
>
> >    :set shell=C:\cygwin\bin\date.exe
> >    :set shellcmdflag=
> >    :echo system('')
>
> > but the mouse pointer still moved.  I found some discussion of the
> > vimrun command here:
>
> >    :help win32-vimrun
>
> > Here's an untested idea:  Use Cygwin's run in place of Vim's vimrun.  
> > Rename vim's vimrun.exe to something else, then copy Cygwin's
> > /bin/run.exe to where vimrun.exe was and name it vimrun.exe.  I've
> > used Cygwin's run command to start commands without the annoying DOS
> > window in other situations--it just might work here.
>
> > Regards,
> > Gary
>
> I tested copying the run.exe found in /usr/X11R6/bin/ over vimrun.exe
> but this failed miserably. I didn't have a vimrun.exe anywhere else
> [other than the win32 version]. I also tried compiling the
> 'vimrun.exe' as a 'gui' application using WinMain instead of the
> simple 'main' but that doesn't seem to do anything [though I must
> admit, I'm not familiar with 'windows' programming].
>
> Does anyone know the history on why windows requires the 'vimrun.exe'
> anyways? Something about handling Ctrl-C, but that's all I know.

I figured out the problem. Though I'll have to ask the vim_dev mailing
list for further guidance.

The problem is related to the call to CreateProcess in os_win32.c. I
needed to change CREATE_NEW_CONSOLE to CREATE_NO_WINDOW to stop the
separate console from 'stealing' the mouse focus.

 Thank you for all who looked into this.
M
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Loading...