On Wed, 17 Jul 2002, Lionel Ulmer wrote:
> > I'm willing to work on it - it would be a very cool feature. It could
> > use the same hooks that xkbvleds used to detect the scroll lock key.
> > Here's my theory: a function is called to scroll the viewport when the
> > pointer hits the screen edge. Seems to me making one additional check
> > against a keyboard condition before branching to the function shouldn't be too
> > hard. I'll pull the cvs tree off xfree86.org, and take a look. I'd appreciate a
> > little help if you can give it.
>
> Well, what a coincidence, I just started to work on that on monday (without
> reading this thread as I need this for a project of mine)... I should have a
> patch ready tomorrow (or on Friday, depending on my free time :-) ).
>
> What I planned to do is to add a function called 'XF86VidModeLockViewPort'
> that would enable one to prevent the viewport to scroll when the mouse it at
> the border of the screen (if the parameter is True, if False, let the
> scrolling happen).
>
Extending the vidmode extension is one way. Hotkeys are another.
Hotkeys are handled in common/xf86Events.c:xf86PostKbdEvent().
Keeping the server from panning would involve some modification
in common/xf86Cursor.c. Note that there's already a "zoomLocked"
field in the ScrnInfoRec. A panLocked field may be in order, but
note that any additions to the ScrnInfoRec must go at the END of
that structure or you'll break binary compatibility.
Modifcations to xf86Cursor.c should prevent the frameX0, etc...
fields from getting modified and the driver's AdjustFrame
function from being called. But there are probably some
complications with clamping the pointer position, particularly
in multihead environments. You possibly have to warp the
pointer back when you see that it's gone outside of the viewport.
Mark.
_______________________________________________
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert