Problem:

When using a bigger screen than the actual screensize and you tab to frames. Ion sets 
the pointer to the upper left corner of a frame. If a frame is just right out of the 
current visible area, X will scroll only a few pixels right to make the pointer 
visible, thats not enough to see the frames content.

Solution:

in ioncore/focus.c:do_move_pointer_to the Pointer is wrapped to the upper/left 
position of the frame, i changed the code in the way that it wraps three times to let 
X do the scrolling right:

void do_move_pointer_to(WRegion *reg)
{
        ....

        /* first go to the lower/right corner */
        XWarpPointer(wglobal.dpy, None, root, 0, 0, 0, 0,
                                 x+w, y+h);
        /* then to the upper/left, now X has scrolled or frame to be as much visible 
as possible with a preference to the upper/left corner */
        XWarpPointer(wglobal.dpy, None, root, 0, 0, 0, 0,
                                 x, y);
        /* the orginal code gave the pointer a +5 offset*/
        XWarpPointer(wglobal.dpy, None, root, 0, 0, 0, 0,
                                 x+5, y+5);
        /*btw. instead of a static offset, calculating the border thickness+1 would be 
more nice or? (placing the mouse over the tab, no matter how thick the borders are*/
}




As far i can think of this change doesn't impair any problems and won't be noticeable 
if one does not use virtual screens. Maybe there is some other X API to scroll virtual 
screens, but this change is quite minimal and doesn't need any extensions. Please 
consider to apply it into the main code.

Cheers Christian

Reply via email to