RE: Mouse offset when using java swing based gui applications

2010-07-15 Thread Richard Evans
There's a bug reported against Java relating to this, with some more
details.  It claims to be fixed, but it still occurs.  There's a small
test case in the bug report.  It makes many Java UI applications
unusable with Cygwin/X.

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6434227

Richard

-Original Message-
From: Jon TURNEY [mailto:jon.tur...@dronecode.org.uk] 
Sent: 15 July 2010 14:38
To: cygwin-xfree@cygwin.com
Cc: jonas_wink...@gmx.de
Subject: Re: Mouse offset when using java swing based gui applications

On 13/07/2010 22:56, Jonas Winkler wrote:
 I just noticed a very strange behaviour of my Cygwin/X-setup. I have a
 laptop running Debian 5.0 and openssh-server 1.5.1. My windows7 x64
 machine is running cygwin 1.7.5 and cygwin/x 1.8.0 (fresh
installation).
 I'm using ssh and x forwarding to use gui applications - especially
 Netbeans 6.9 - on my windows machine.

 So far, all X applications run fine on windows. Using Netbeans is
 somewhat weird. After startup, i can use the menues, edit code, etc.
But
 as soon as I change the window position (moving, maximizing) of
 Netbeans, it seems as if the position of the window actually does not
 change. Clicking works, but selecting a menu item not. I need to click
 and hold on the menu item, drag the mouse to the position where the
menu
 would be before moving the window and then release it.

 Same goes for code completition windows - they pop up where they
should
 be before moving the window.

 I investigated a bit more and build a very basic Java gui application
 using swing (same library used by netbeans to display gui elemets) and
 the problem persists. As said before other applications (tested:
 gnome-terminal, gedit and nautilus) just work fine. So this is a
 swing-related rather than a netbeans-related problem.

 I attached the cygcheck.out. I dont know what other kind of
information
 I should provide, so if there's anything you need, please let me know.

Thanks very much for the clear problem report.

We've had some similar reports before of problems with the mouse
position 
reporting with Java applications, for e.g. [1], but I've never had a
simple 
test case that has allowed me to reproduce it and investigate.

So, I'd be very interested to see your simple Java application which 
demonstrates the problem.

If you could also start the Xserver with the '-logverbose 3' option and
attach 
your /var/log/XWin.0.log, that would be most helpful.

[1] http://sourceware.org/ml/cygwin-xfree/2009-08/msg00060.html

-- 
Jon TURNEY
Volunteer Cygwin/X X Server maintainer

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/



Resizing problem

2010-07-15 Thread Olwe Melwasul
I installed cygwin/xcygwin 1.7.5 with KDE. I tried clicking on XWin
Server from the Start menue, but nothing happened. I tried startx from
the
cygwin basic terminal. Nothing. After some Google archaeology, I found
someone that had done this:

cd \cygwin\bin
ash
PATH=. rebaseall -v

at the DOS command. Good. It worked. Running startx at the cygwin
command did start a twm session. But how the KDE would run, I couldn't
figure out from any amount of documentation or Googling. After some
more Googling, I saw a reference to an Openbox. Guessing along, I got
startx /usr/bin/openbox to give me Openbox. My problem is that I
cannot minimize anything because it goes down below and out of sight.
The XWin container window is sized on start up to my right computer
screen, but when I drag it over to my larger left screen, it can't be
resized. I suspect Openbox has a default size larger (lower?) and down
in the hidden part is no doubt either a task bar with the minimized
apps or the minimized apps themselves, right? Alt-Tab only cycles the
Win7 apps, not the XWin session apps, BTW.

Actually, I don't need the startx version, I could very well use the
startxwin multi-windows version IF I could get Emacs in shell mode to
do cygwin bash. Starting the X server and then Emacs multi-windows
style gets a shell mode that apparently doesn't see cygwin. I'm
guessing it's using the DOS command.

How can I a) get at the minimized apps? or b) how can I get a
stand-alone X server-run Emacs to see cygwin bash?

Olwe Bottorff
Grand Marais, MN

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/



Re: Resizing problem

2010-07-15 Thread Ken Brown

On 7/15/2010 1:02 PM, Olwe Melwasul wrote:

[...]
Actually, I don't need the startx version, I could very well use the
startxwin multi-windows version IF I could get Emacs in shell mode to
do cygwin bash. Starting the X server and then Emacs multi-windows
style gets a shell mode that apparently doesn't see cygwin. I'm
guessing it's using the DOS command.


I can't comment on the first part of your post, but I'm Cygwin's emacs 
maintainer and can try to help you get emacs running.  If you want to 
run emacs under X, install the emacs-X11 package and then type 'emacs' 
in an xterm window.  If something doesn't work the way you expect, 
please give a precise recipe for reproducing the problem.  I don't know 
what you mean by a shell mode that apparently doesn't see cygwin.


Ken

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/



Re: Resizing problem

2010-07-15 Thread Olwe Melwasul
Yes, I am using the emacs-X11 and yes, I started it (after starting
the X server to get multiwindowed mode) with emacs  at the cygwin
command. Emacs-X11 comes up fine, looking good. Then I do M-x shell
to get a shell environment inside of Emacs. But what comes up is not
bash. I'm not sure what it is, but it sees no cygwin apps: It doesn't
know what ls or which diff or any other GNU/cygwin stuff is. I
assume it is the DOS shell. Oddly, if I start emacs-X11 inside the
windowed mode (startx) and do emacs shell mode, it does see bash and
the rest of the GNU/cygwin apps.

O
GM, MN

On Thu, Jul 15, 2010 at 1:12 PM, Ken Brown kbr...@cornell.edu wrote:
 On 7/15/2010 1:02 PM, Olwe Melwasul wrote:

 [...]
 Actually, I don't need the startx version, I could very well use the
 startxwin multi-windows version IF I could get Emacs in shell mode to
 do cygwin bash. Starting the X server and then Emacs multi-windows
 style gets a shell mode that apparently doesn't see cygwin. I'm
 guessing it's using the DOS command.

 I can't comment on the first part of your post, but I'm Cygwin's emacs
 maintainer and can try to help you get emacs running.  If you want to run
 emacs under X, install the emacs-X11 package and then type 'emacs' in an
 xterm window.  If something doesn't work the way you expect, please give a
 precise recipe for reproducing the problem.  I don't know what you mean by
 a shell mode that apparently doesn't see cygwin.

 Ken

 --
 Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
 Problem reports:       http://cygwin.com/problems.html
 Documentation:         http://x.cygwin.com/docs/
 FAQ:                   http://x.cygwin.com/docs/faq/



--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/



Re: Resizing problem

2010-07-15 Thread Ken Brown

On 7/15/2010 3:51 PM, Olwe Melwasul wrote:

Yes, I am using the emacs-X11 and yes, I started it (after starting
the X server to get multiwindowed mode) with emacs at the cygwin
command. Emacs-X11 comes up fine, looking good. Then I do M-x shell
to get a shell environment inside of Emacs. But what comes up is not
bash. I'm not sure what it is, but it sees no cygwin apps: It doesn't
know what ls or which diff or any other GNU/cygwin stuff is. I
assume it is the DOS shell. Oddly, if I start emacs-X11 inside the
windowed mode (startx) and do emacs shell mode, it does see bash and
the rest of the GNU/cygwin apps.


[Please don't top-post.]

I think the problem is that your PATH isn't set correctly inside emacs. 
 How are you starting the X server?  If you use the start menu shortcut 
(with target C:\cygwin\bin\run.exe /usr/bin/bash.exe -l -c 
/usr/bin/startxwin.exe) you shouldn't have that problem.  Notice that it 
uses 'bash -l' precisely so that the environment, including PATH, is set 
up in the normal way.


Ken

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/



Re: Resizing problem

2010-07-15 Thread Olwe Melwasul
On Thu, Jul 15, 2010 at 4:20 PM, Ken Brown kbr...@cornell.edu wrote:
 On 7/15/2010 3:51 PM, Olwe Melwasul wrote:

 Yes, I am using the emacs-X11 and yes, I started it (after starting
 the X server to get multiwindowed mode) with emacs at the cygwin
 command. Emacs-X11 comes up fine, looking good. Then I do M-x shell
 to get a shell environment inside of Emacs. But what comes up is not
 bash. I'm not sure what it is, but it sees no cygwin apps: It doesn't
 know what ls or which diff or any other GNU/cygwin stuff is. I
 assume it is the DOS shell. Oddly, if I start emacs-X11 inside the
 windowed mode (startx) and do emacs shell mode, it does see bash and
 the rest of the GNU/cygwin apps.

 [Please don't top-post.]

 I think the problem is that your PATH isn't set correctly inside emacs.  How
 are you starting the X server?  If you use the start menu shortcut (with
 target C:\cygwin\bin\run.exe /usr/bin/bash.exe -l -c /usr/bin/startxwin.exe)
 you shouldn't have that problem.  Notice that it uses 'bash -l' precisely so
 that the environment, including PATH, is set up in the normal way.

 Ken

I started the X-server with the menu shortcut (which has the execute
string you listed) and ... after ... a full minute it delivers a
stand-alone xterm. I then click on the Emacs-X11, and after a long
wait, it comes up. I do an M-x shell -- and get a sh-3.2$ prompt. I
try some commands, and it only seems to know a few. cd does get me
to /home/Olwe which tells me it must have something to do with
cygwin, but it knows no other GNU/cygwin other than perhaps pwd.

Next, I kill it and start Emacs-X11 in the xterm emacs . It comes
up fine. I do M-x shell -- and get the identical prompt I got in
xterm, namely,

o...@olwe-pc
$

I type commands and they work -- it sees the GNU/cygwin apps fine --
but it leaves odd characters after it returns, e.g.

$ which diff
/usr/bin/diff
^[]0;~^G

The last string is not random, it has some method to its madness. For example

$ ls
dbus-4xiZFwCMPa  dbus-U6vB5c6MSd  dbus-hdtwMyVbXA  dbus-yXQ8LOSIN3
]0;/tmp

Actually, I copied the above output and lost the ^[ and the ^G, but
they show up on the emacs shell output.

Next, I kill emacs-X11 stand-alone and start emacs -nw in the xterm.
Same funky characters. I try other consoles -- same funky characters.
Again, the windowed mode doesn't have these problems, just the issues
with minimized apps disappearing beyond the bottom of Openbox.

If I could just get rid of the funky xterm characters, I'd call it a day

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/



Re: Resizing problem

2010-07-15 Thread Ken Brown

On 7/15/2010 9:26 PM, Olwe Melwasul wrote:

On Thu, Jul 15, 2010 at 4:20 PM, Ken Brownkbr...@cornell.edu  wrote:

On 7/15/2010 3:51 PM, Olwe Melwasul wrote:


Yes, I am using the emacs-X11 and yes, I started it (after starting
the X server to get multiwindowed mode) with emacs at the cygwin
command. Emacs-X11 comes up fine, looking good. Then I do M-x shell
to get a shell environment inside of Emacs. But what comes up is not
bash. I'm not sure what it is, but it sees no cygwin apps: It doesn't
know what ls or which diff or any other GNU/cygwin stuff is. I
assume it is the DOS shell. Oddly, if I start emacs-X11 inside the
windowed mode (startx) and do emacs shell mode, it does see bash and
the rest of the GNU/cygwin apps.


[Please don't top-post.]

I think the problem is that your PATH isn't set correctly inside emacs.  How
are you starting the X server?  If you use the start menu shortcut (with
target C:\cygwin\bin\run.exe /usr/bin/bash.exe -l -c /usr/bin/startxwin.exe)
you shouldn't have that problem.  Notice that it uses 'bash -l' precisely so
that the environment, including PATH, is set up in the normal way.

Ken


I started the X-server with the menu shortcut (which has the execute
string you listed) and ... after ... a full minute it delivers a
stand-alone xterm. I then click on the Emacs-X11, and after a long


It sounds like you're using the Emacs-X11 start menu shortcut that's 
created by the X-start-menu-icons package.  Don't use it.  It doesn't 
set up the environment properly before starting emacs.  To get a useful 
shortcut, you can use the script /usr/bin/make-emacs-shortcut that comes 
with the emacs package.



wait, it comes up. I do an M-x shell -- and get a sh-3.2$ prompt. I
try some commands, and it only seems to know a few. cd does get me
to /home/Olwe which tells me it must have something to do with
cygwin, but it knows no other GNU/cygwin other than perhaps pwd.

Next, I kill it and start Emacs-X11 in the xterm emacs. It comes
up fine. I do M-x shell -- and get the identical prompt I got in
xterm, namely,

o...@olwe-pc
$

I type commands and they work -- it sees the GNU/cygwin apps fine --
but it leaves odd characters after it returns, e.g.

$ which diff
/usr/bin/diff
^[]0;~^G


This is ugly but harmless.  It's an escape sequence that's part of the 
shell prompt, which is controlled by the PS1 environment variable.  (In 
a normal shell, as opposed to one in emacs, you don't see it directly; I 
think it affects the color of the current directory, displayed as part 
of the prompt.)



The last string is not random, it has some method to its madness. For example

$ ls
dbus-4xiZFwCMPa  dbus-U6vB5c6MSd  dbus-hdtwMyVbXA  dbus-yXQ8LOSIN3
]0;/tmp

Actually, I copied the above output and lost the ^[ and the ^G, but
they show up on the emacs shell output.

Next, I kill emacs-X11 stand-alone and start emacs -nw in the xterm.
Same funky characters. I try other consoles -- same funky characters.
Again, the windowed mode doesn't have these problems, just the issues
with minimized apps disappearing beyond the bottom of Openbox.

If I could just get rid of the funky xterm characters, I'd call it a day


Read about the PS1 environment variable in the bash manual (or google).

Ken

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/



Re: Resizing problem

2010-07-15 Thread Ken Brown

On 7/15/2010 10:03 PM, Ken Brown wrote:

On 7/15/2010 9:26 PM, Olwe Melwasul wrote:

On Thu, Jul 15, 2010 at 4:20 PM, Ken Brownkbr...@cornell.edu   wrote:

On 7/15/2010 3:51 PM, Olwe Melwasul wrote:


Yes, I am using the emacs-X11 and yes, I started it (after starting
the X server to get multiwindowed mode) with emacs at the cygwin
command. Emacs-X11 comes up fine, looking good. Then I do M-x shell
to get a shell environment inside of Emacs. But what comes up is not
bash. I'm not sure what it is, but it sees no cygwin apps: It doesn't
know what ls or which diff or any other GNU/cygwin stuff is. I
assume it is the DOS shell. Oddly, if I start emacs-X11 inside the
windowed mode (startx) and do emacs shell mode, it does see bash and
the rest of the GNU/cygwin apps.


[Please don't top-post.]

I think the problem is that your PATH isn't set correctly inside emacs.  How
are you starting the X server?  If you use the start menu shortcut (with
target C:\cygwin\bin\run.exe /usr/bin/bash.exe -l -c /usr/bin/startxwin.exe)
you shouldn't have that problem.  Notice that it uses 'bash -l' precisely so
that the environment, including PATH, is set up in the normal way.

Ken


I started the X-server with the menu shortcut (which has the execute
string you listed) and ... after ... a full minute it delivers a
stand-alone xterm. I then click on the Emacs-X11, and after a long


It sounds like you're using the Emacs-X11 start menu shortcut that's
created by the X-start-menu-icons package.  Don't use it.  It doesn't
set up the environment properly before starting emacs.  To get a useful
shortcut, you can use the script /usr/bin/make-emacs-shortcut that comes
with the emacs package.


I should have added that you should see 
/usr/share/doc/Cygwin/emacs.README for more information about that 
script and the shortcut it creates.


Ken

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/



Re: Bug or WAD? Midnight Commander F10 different in xterm than native or rxvt

2010-07-15 Thread Peter Farley
--- On Tue, 7/13/10, Jon TURNEY wrote:
 From: Jon TURNEY
 Subject: Re: Bug or WAD? Midnight Commander F10 different in xterm than 
 native or rxvt
 To: cygwin-xfree@cygwin.com
 Date: Tuesday, July 13, 2010, 3:21 PM
 On 09/07/2010 07:58, Marco Atzeri wrote:
Snipped
  on my Win-XP SP2 under cygwin/X
  MC with F10 exits in the current directory
 
  Peter,
  as mc is an alias
  alias mc='. /usr/share/mc/bin/mc-wrapper.sh'
 
  I guess that under X this wrapper is working
  differently than under console
 
 Perhaps more likely, the alias isn't setup by the shell
 init scripts under xterm because of the way the xterm
 was started (which the OP hasn't said) (but is being
 setup for cmd.exe or rxvt)
 
 Note that it's impossible for mc to change the current
 directory of the parent shell without this alias.

For the record, the xterm I used for this test was the one started from the 
cygwin-X start menu item.

I still have not found the round tuits to compile a debugging version of MC to 
check this out in more detail, but I hope to do so sometime in the next 30 days 
(lots of RL intruding).

I will reply again when I have more information.

Thank you all for your advice and help.

Peter



  

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/



Re: Resizing problem

2010-07-15 Thread Olwe Melwasul
On Thu, Jul 15, 2010 at 9:20 PM, Ken Brown kbr...@cornell.edu wrote:

 I should have added that you should see /usr/share/doc/Cygwin/emacs.README
 for more information about that script and the shortcut it creates.

 Ken


make-emacs-shortcut was in /bin. There was nothing in the .../README
about it, though. README talked about a source code compile and
install of Emacs. So what exactly should I do with
make-emacs-shortcut? I clicked on it from WinManager and it did
something, now I get normal bash behavior from the non-X11 console
(e.g. default cygwin console and mintty) when I start emacs no window.
When I start multiwindowed, same good behavior. Will look into PS1
environment stuff. And BTW, thank you very much.

Olwe
Grand Marais, MN

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/