Buttons2&3 'fall through' Dock to X wins
Brought to you by:
torrey
Right-click or middle-click while the cursor is in the
Dock and XDarwin is frontmost will still send an
X11 event through to any X11 window that may lie
behind. (Even though right-click will still produce
the dock's pop-up menu. -i.e. the right-click has *
two* actions, one on the dock, and one on the X11
window behind it.)
Note: this also happens with interleaving switched
on in OroborOSX, with any other OSX window as
well as the Dock (i.e. while XDarwin is in front, an
X11 window behind an OSX window will still
receive right/middle-click events).
This only happens with *real* right/middle-click
(i.e. not emulated).
Adrian
Logged In: YES
user_id=313617
Is this related to the way that right/middle buttons go
through NX_SYSDEFINED (NSSystemDefined) instead
of through NX_RMOUSEDOWN/UP
(NSRightMouseDown/Up -and the undocumented 25/
26 for middle-click)?
NSSystemDefined does not get through while XDarwin
is behind, but NSRightMouseDown/Up/25/26 do.
However, NSRightMouseDown/Up/25/26 don't get
through on right/middle-clicking in the dock or an OSX
window, but NSSystemDefined does 'fall through' if an
X11 window is below it and XDarwin is frontmost.
I note the mention of problems with older kernels not
handling button 2 correctly (comment in darwin.c),
hence the need to go through NX_SYSDEFINED.
I also came across the patch at http://mrcla.com/XonX/
patch, which seems to be where this relevant code was
changed -back in August 2000...
And I found thison the darwin-developers list:
http://www.darwinfo.org/lists/darwin-development/
current/2404.html
It looks to me like everything should work fine by going
back to NX_RMOUSEDOWN/UP (and undocumented
25/26 for middle-click). -This is on OSX10.1.2, at least...
I'll try it on my TiBook (10.0.3) and let you know if that
looks OK, too.
Do you know which kernel versions will not work?
Pre OSX10.0?
Any further elucidation on these points...?
Thanks!
Adrian
Logged In: YES
user_id=313617
Is this related to the way that right/middle buttons go
through NX_SYSDEFINED (NSSystemDefined) instead
of through NX_RMOUSEDOWN/UP
(NSRightMouseDown/Up -and the undocumented 25/
26 for middle-click)?
NSSystemDefined does not get through while XDarwin
is behind, but NSRightMouseDown/Up/25/26 do.
However, NSRightMouseDown/Up/25/26 don't get
through on right/middle-clicking in the dock or an OSX
window, but NSSystemDefined does 'fall through' if an
X11 window is below it and XDarwin is frontmost.
I note the mention of problems with older kernels not
handling button 2 correctly (comment in darwin.c),
hence the need to go through NX_SYSDEFINED.
I also came across the patch at http://mrcla.com/XonX/
patch, which seems to be where this relevant code was
changed -back in August 2000...
And I found thison the darwin-developers list:
http://www.darwinfo.org/lists/darwin-development/
current/2404.html
It looks to me like everything should work fine by going
back to NX_RMOUSEDOWN/UP (and undocumented
25/26 for middle-click). -This is on OSX10.1.2, at least...
I'll try it on my TiBook (10.0.3) and let you know if that
looks OK, too.
Do you know which kernel versions will not work?
Pre OSX10.0?
Any further elucidation on these points...?
Thanks!
Adrian
Logged In: YES
user_id=37183
The Right Thing to do is probably: trap mouse events only at the NSView level, not at the application level, and use the now-documented NS[Left|Right|Other]Mouse events, eliminating NSSystemDefined completely. However, this will only work on 10.1 or later, because AppKit doesn't know how to handle the NSOtherMouse events on 10.0 so they never get to the NSView.
NX_SYSDEFINED should only be necessary for pure Darwin and maybe for full-screen, where there's no Dock anyway.
Logged In: YES
user_id=313617
Just a note to say that I've been using this modification to
XDarwin for a while now on both a Quicksilver 867 G4
OSX10.1.1 (not 10.1.2 -dunno why I said that...), and a
TiBook 400 OSX10.0.3.
It's also in the modifications for the 'hacked XDarwin'
included with the two latest "preview" versions of OroborOSX,
and I've not (yet!) had anyone complaining they could not
middle/right-click anything!
Of course, it's still not at the NSView level - would I be
correct in thinking the only major drawback to it not being
at the NSView level (apart from lack of 'neatness' and
'correctness') is the problem with the prefs window (can't
type into it unless cursor is in menubar)? Is there anything
else I've missed?
Adrian