Remove xf_rail_FilterWindowInfo() function. This function incorrectly calculated a new width for windows that had a negative origin (that is, windows partially off the desktop to the left). The function subtracted twice the window offset from the width. To be correct this function needed to keep track of the old and new window positions and just subtract the difference.

It turns out none of this was necessary.  X will handle windows placed partially off-screen and draw them correctly, just as it does for windows dragged partially off the screen to the left.  Removing this function fixed a number of drawing issues including tool tips being incorrectly drawn and windows not being drawn correctly after they'd been placed partially off-screen to the right.
This commit is contained in:
David Sundstrom 2011-11-02 10:42:58 -05:00
parent 0790c22683
commit c5b9667825

View File

@ -66,15 +66,6 @@ void xf_rail_paint(xfInfo* xfi, rdpRail* rail, uint32 uleft, uint32 utop, uint32
} }
} }
void xf_rail_FilterWindowInfo(rdpRail* rail, rdpWindow* window)
{
if (window->windowOffsetX < 0)
{
window->windowWidth += (window->windowOffsetX * 2);
window->windowOffsetX = 0;
}
}
void xf_rail_CreateWindow(rdpRail* rail, rdpWindow* window) void xf_rail_CreateWindow(rdpRail* rail, rdpWindow* window)
{ {
xfInfo* xfi; xfInfo* xfi;
@ -82,8 +73,6 @@ void xf_rail_CreateWindow(rdpRail* rail, rdpWindow* window)
xfi = (xfInfo*) rail->extra; xfi = (xfInfo*) rail->extra;
xf_rail_FilterWindowInfo(rail, window);
xfw = xf_CreateWindow((xfInfo*) rail->extra, window, xfw = xf_CreateWindow((xfInfo*) rail->extra, window,
window->windowOffsetX, window->windowOffsetY, window->windowOffsetX, window->windowOffsetY,
window->windowWidth, window->windowHeight, window->windowWidth, window->windowHeight,
@ -105,8 +94,6 @@ void xf_rail_MoveWindow(rdpRail* rail, rdpWindow* window)
xfi = (xfInfo*) rail->extra; xfi = (xfInfo*) rail->extra;
xfw = (xfWindow*) window->extra; xfw = (xfWindow*) window->extra;
xf_rail_FilterWindowInfo(rail, window);
xf_MoveWindow((xfInfo*) rail->extra, xfw, xf_MoveWindow((xfInfo*) rail->extra, xfw,
window->windowOffsetX, window->windowOffsetY, window->windowOffsetX, window->windowOffsetY,
window->windowWidth, window->windowHeight); window->windowWidth, window->windowHeight);