Anyone know what the intent of the surface member in xf_window was
for?  A pixmap is being maintained, but no one is using it.

--- a/client/X11/xf_window.h
+++ b/client/X11/xf_window.h
@@ -31,21 +31,20 @@ typedef struct xf_window xfWindow;

 struct xf_window
 {
        GC gc;
        int left;
        int top;
        int right;
        int bottom;
        int width;
        int height;
        Window handle;
-       Pixmap surface;
        boolean fullscreen;
        boolean decorations;
        rdpWindow* window;
        boolean localMoveSize;
 };

@@ -364,21 +371,20 @@ xfWindow* xf_CreateWindow(xfInfo* xfi,
rdpWindow* wnd, int x, int y, int width,
        input_mask =
                KeyPressMask | KeyReleaseMask | ButtonPressMask |
ButtonReleaseMask |
                VisibilityChangeMask | FocusChangeMask | StructureNotifyMask |
                PointerMotionMask | ExposureMask;

        XSelectInput(xfi->display, window->handle, input_mask);
        XMapWindow(xfi->display, window->handle);

        memset(&gcv, 0, sizeof(gcv));
        window->gc = XCreateGC(xfi->display, window->handle,
GCGraphicsExposures, &gcv);
-       window->surface = XCreatePixmap(xfi->display, window->handle,
window->width, window->height, xfi->depth);

        xf_MoveWindow(xfi, window, x, y, width, height);

        return window;
 }


@@ -462,22 +473,20 @@ void xf_MoveWindow(xfInfo* xfi, xfWindow*
window, int x, int y, int width, int h
        window->bottom = y + height - 1;
        window->width = width;
        window->height = height;

        DEBUG_X11_LMS("xf_MoveWindow: window=0x%X rc={l=%d t=%d r=%d
b=%d} w=%d h=%d",
                        (uint32) window->handle, window->left,
window->top, window->right, window->bottom,
                        window->width, window->height);

        if (resize)
        {
-               XFreePixmap(xfi->display, window->surface);
-               window->surface = XCreatePixmap(xfi->display,
window->handle, width, height, xfi->depth);
                xf_UpdateWindowArea(xfi, window, 0, 0, width, height);
        }
 }



@@ -625,21 +634,18 @@ boolean xf_IsWindowBorder(xfInfo* xfi, xfWindow*
xfw, int x, int y)
 }

 void xf_DestroyWindow(xfInfo* xfi, xfWindow* window)
 {
        if (window == NULL)
                return;

        if (window->gc)
                XFreeGC(xfi->display, window->gc);

-       if (window->surface)
-               XFreePixmap(xfi->display, window->surface);
-
        if (window->handle)
        {
                XUnmapWindow(xfi->display, window->handle);
                XDestroyWindow(xfi->display, window->handle);
        }

        xfree(window);
 }



I can remove this without ill effect.

------------------------------------------------------------------------------
RSA® Conference 2012
Save $700 by Nov 18
Register now!
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
Freerdp-devel mailing list
Freerdp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freerdp-devel

Reply via email to