On Fri, 5 Jan 1996, Robert Nation 885-9815 wrote:
> >MB> Turns out that this is related to the EdgeResistance setting (I'm using
> >MB> 1500 50).
> >
> >Yes, it is. It sounds like you're only modifying the first parameter,
> >though. From the fvwm man page:
>
> I think MB is right. If you make the first parameter big you *might* expect
> that it would still be possible to quickly move windows accross viewports
> (provided that the second paramter is small), but changing viewports
> just for the sake of changing them would be slow and difficult. Fvwm
> does not work this way. If you set the first parameter to 2500, there is a
> 2.5 second delay when moving windows accross the screen border. Since we
> are changing viewports, this behavior is consistent with the description, but
> is still unexpected, and possibly undesireable, but I'm not sure.
>
> The second parameter was designed to make it easy to line windows up on the
> screen edge, not to make it difficult to change pages. In fact, the second
> parameter kicks in when the moved-window's edge is on the screen edge,
> not when the cursor is on the screen edge.
>
> I think MB wants to have the first edge-resistance parameter ignored when
> he's moving windows. I don't know if this is generally desireable or not.
>
Well, I'm _not_ trying to move into the next virtual screen; just trying to
move the window right to the edge of the screen I'm on. So, I _don't_ want
the parameter ignored when moving windows. The problem is, if the mouse
pointer touches the screen edge during the move (happens easily when quickly
moving a window to the top of the screen by dragging the title bar), then the
ScrollResistance timer (in function HandlePaging in file virtual.c) does not
get canceled if the pointer is immediately RETRACTED from the screen edge.
It looks to me that the XCheckWindowEvent(dpy,Scr.PanFrameXXXXXX.win,
LeaveWindowMask,&Event) events are never being seen when _moving_ a window
and the pointer Leaves the PanFrame windows (remember folks, yesterday I
said I've _never_ done any X programming, so I hope I don't say anything
stupid!). This event should be seen and cancel the timer if the pointer
is retracted from the screen edge. I don't know if the PanFrameXXXXX
windows are just not being seen because the window we are moving is on the
top, or what. So, I modified the HandlePaging function and added a
mouse pointer location check after all the LeaveWindow checks (I have
added the -->> symbols here only to point out the new lines):
total = 0;
while(total < Scr.ScrollResistance)
{
sleep_a_little(10000);
total+=10;
-->> /* should I do the XQueryPointer here??? See below */
if(XCheckWindowEvent(dpy,Scr.PanFrameTop.win,
LeaveWindowMask,&Event))
{
StashEventTime(&Event);
return;
}
if(XCheckWindowEvent(dpy,Scr.PanFrameBottom.win,
LeaveWindowMask,&Event))
{
StashEventTime(&Event);
return;
}
if(XCheckWindowEvent(dpy,Scr.PanFrameLeft.win,
LeaveWindowMask,&Event))
{
StashEventTime(&Event);
return;
}
if(XCheckWindowEvent(dpy,Scr.PanFrameRight.win,
LeaveWindowMask,&Event))
{
StashEventTime(&Event);
return;
}
-->> XQueryPointer(dpy, Scr.Root, &JunkRoot, &JunkChild,
-->> &x, &y, &JunkX, &JunkY, &JunkMask);
-->>
-->> if(( x >= SCROLL_REGION)&&( x < Scr.MyDisplayWidth-SCROLL_REGION)&&
-->> ( y >= SCROLL_REGION)&&( y < Scr.MyDisplayHeight-SCROLL_REGION))
-->> return;
-->>
}
On my quick check last night, this works and properly aborts the timer if the
pointer is retracted from the screen edges when doing a window move.
However, what happens if in between the XCheckWindowEvent's and my
XQueryPointer, X does detect one of the LeaveWindow events. The
XCheckWindowEvent will have missed it, but the XQueryPointer+conditional will
catch it and return. StashEventTime (I'm not even 100% sure what that does)
would never get called for that event since my conditional check can do
nothing but return. Does it put that event in a queue? Then what would
happen to it? Is this even an issue? If so, would it be safer to put the
XQueryPointer right after the 'total+=10;' statement and leave the
conditional check at the bottom (I think probably so).
Thanks for the input.
Mike Blatchley
mikeb_at_maxtor.com
--
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_hpc.uh.edu.
To report problems, send mail to fvwm-owner_at_hpc.uh.edu.
Received on Fri Jan 05 1996 - 13:06:46 GMT