FreeRDP/FreeRDP — Issue #274: Wrong macro used for WITH_DEBUG_X11_LOCAL_MOVESIZE
Author: sunds
Created: 2011-12-14 00:47:25+00:00
State: open

In commit 31d47302ef246797ca81c22d8d235103e9110457 a macro was added in #ifdef called WITH_DEBUG_X11_LMS. The correct macro is WITH_DEBUG_X11_LOCAL_MOVESIZE.

To reproduce run cmake with -DWITH_DEBUG_X11_LOCAL_MOVESIZE=ON

When I get a second I can submit a pull request with a fix.

[ 95%] Building C object client/X11/CMakeFiles/xfreerdp.dir/xf_window.c.o
/home/sunds/FreeRDP/client/X11/xf_window.c: In function ‘xf_StartLocalMoveSize’:
/home/sunds/FreeRDP/client/X11/xf_window.c:480:2: error: ‘wnd’ undeclared (first use in this function)
/home/sunds/FreeRDP/client/X11/xf_window.c:480:2: note: each undeclared identifier is reported only once for each function it appears in
/home/sunds/FreeRDP/client/X11/xf_window.c: In function ‘xf_EndLocalMoveSize’:
/home/sunds/FreeRDP/client/X11/xf_window.c:517:2: error: ‘wnd’ undeclared (first use in this function)
/home/sunds/FreeRDP/client/X11/xf_window.c: In function ‘xf_MoveWindow’:
/home/sunds/FreeRDP/client/X11/xf_window.c:565:2: error: ‘wnd’ undeclared (first use in this function)
make[2]: *** [client/X11/CMakeFiles/xfreerdp.dir/xf_window.c.o] Error 1
make[1]: *** [client/X11/CMakeFiles/xfreerdp.dir/all] Error 2
make: *** [all] Error 2

Patch:

diff --git a/client/X11/xf_window.c b/client/X11/xf_window.c
index 002415a..188e855 100644
--- a/client/X11/xf_window.c
+++ b/client/X11/xf_window.c
@@ -473,7 +473,7 @@ void xf_StartLocalMoveSize(xfInfo* xfi, xfWindow* window, int direction, int x,
{
Window child_window;

-#ifdef WITH_DEBUG_X11_LMS
+#ifdef WITH_DEBUG_X11_LOCAL_MOVESIZE
rdpWindow* wnd = window->window;
#endif

@@ -510,7 +510,7 @@ void xf_StartLocalMoveSize(xfInfo* xfi, xfWindow* window, int direction, int x,

void xf_EndLocalMoveSize(xfInfo *xfi, xfWindow *window, boolean cancel)
{
-#ifdef WITH_DEBUG_X11_LMS
+#ifdef WITH_DEBUG_X11_LOCAL_MOVESIZE
rdpWindow* wnd = window->window;
#endif

@@ -549,7 +549,7 @@ void xf_MoveWindow(xfInfo* xfi, xfWindow* window, int x, int y, int width, int h
{
boolean resize = false;

-#ifdef WITH_DEBUG_X11_LMS
+#ifdef WITH_DEBUG_X11_LOCAL_MOVESIZE
rdpWindow* wnd = window->window;
#endif