From f44798230b1064869760b8c55175908cac783b98 Mon Sep 17 00:00:00 2001 From: roman-b Date: Sat, 3 Sep 2011 17:00:37 +0300 Subject: [PATCH 1/3] keymaps: removed Makefile, which created by cmake. --- keymaps/Makefile | 167 ----------------------------------------------- 1 file changed, 167 deletions(-) delete mode 100644 keymaps/Makefile diff --git a/keymaps/Makefile b/keymaps/Makefile deleted file mode 100644 index 5cffaf704..000000000 --- a/keymaps/Makefile +++ /dev/null @@ -1,167 +0,0 @@ -# CMAKE generated file: DO NOT EDIT! -# Generated by "Unix Makefiles" Generator, CMake Version 2.8 - -# Default target executed when no arguments are given to make. -default_target: all -.PHONY : default_target - -#============================================================================= -# Special targets provided by cmake. - -# Disable implicit rules so canoncical targets will work. -.SUFFIXES: - -# Remove some rules from gmake that .SUFFIXES does not remove. -SUFFIXES = - -.SUFFIXES: .hpux_make_needs_suffix_list - -# Suppress display of executed commands. -$(VERBOSE).SILENT: - -# A target that is always out of date. -cmake_force: -.PHONY : cmake_force - -#============================================================================= -# Set environment variables for the build. - -# The shell in which to execute make rules. -SHELL = /bin/sh - -# The CMake executable. -CMAKE_COMMAND = /usr/bin/cmake - -# The command to remove a file. -RM = /usr/bin/cmake -E remove -f - -# The program to use to edit the cache. -CMAKE_EDIT_COMMAND = /usr/bin/ccmake - -# The top-level source directory on which CMake was run. -CMAKE_SOURCE_DIR = /home/awake/git/apache/FreeRDP-1.0 - -# The top-level build directory on which CMake was run. -CMAKE_BINARY_DIR = /home/awake/git/apache/FreeRDP-1.0 - -#============================================================================= -# Targets provided globally by CMake. - -# Special rule for the target edit_cache -edit_cache: - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake cache editor..." - /usr/bin/ccmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) -.PHONY : edit_cache - -# Special rule for the target edit_cache -edit_cache/fast: edit_cache -.PHONY : edit_cache/fast - -# Special rule for the target install -install: preinstall - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." - /usr/bin/cmake -P cmake_install.cmake -.PHONY : install - -# Special rule for the target install -install/fast: preinstall/fast - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." - /usr/bin/cmake -P cmake_install.cmake -.PHONY : install/fast - -# Special rule for the target install/local -install/local: preinstall - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..." - /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake -.PHONY : install/local - -# Special rule for the target install/local -install/local/fast: install/local -.PHONY : install/local/fast - -# Special rule for the target install/strip -install/strip: preinstall - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..." - /usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake -.PHONY : install/strip - -# Special rule for the target install/strip -install/strip/fast: install/strip -.PHONY : install/strip/fast - -# Special rule for the target list_install_components -list_install_components: - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\"" -.PHONY : list_install_components - -# Special rule for the target list_install_components -list_install_components/fast: list_install_components -.PHONY : list_install_components/fast - -# Special rule for the target rebuild_cache -rebuild_cache: - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." - /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) -.PHONY : rebuild_cache - -# Special rule for the target rebuild_cache -rebuild_cache/fast: rebuild_cache -.PHONY : rebuild_cache/fast - -# The main all target -all: cmake_check_build_system - cd /home/awake/git/apache/FreeRDP-1.0 && $(CMAKE_COMMAND) -E cmake_progress_start /home/awake/git/apache/FreeRDP-1.0/CMakeFiles /home/awake/git/apache/FreeRDP-1.0/keymaps/CMakeFiles/progress.marks - cd /home/awake/git/apache/FreeRDP-1.0 && $(MAKE) -f CMakeFiles/Makefile2 keymaps/all - $(CMAKE_COMMAND) -E cmake_progress_start /home/awake/git/apache/FreeRDP-1.0/CMakeFiles 0 -.PHONY : all - -# The main clean target -clean: - cd /home/awake/git/apache/FreeRDP-1.0 && $(MAKE) -f CMakeFiles/Makefile2 keymaps/clean -.PHONY : clean - -# The main clean target -clean/fast: clean -.PHONY : clean/fast - -# Prepare targets for installation. -preinstall: all - cd /home/awake/git/apache/FreeRDP-1.0 && $(MAKE) -f CMakeFiles/Makefile2 keymaps/preinstall -.PHONY : preinstall - -# Prepare targets for installation. -preinstall/fast: - cd /home/awake/git/apache/FreeRDP-1.0 && $(MAKE) -f CMakeFiles/Makefile2 keymaps/preinstall -.PHONY : preinstall/fast - -# clear depends -depend: - cd /home/awake/git/apache/FreeRDP-1.0 && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 -.PHONY : depend - -# Help Target -help: - @echo "The following are some of the valid targets for this Makefile:" - @echo "... all (the default if no target is provided)" - @echo "... clean" - @echo "... depend" - @echo "... edit_cache" - @echo "... install" - @echo "... install/local" - @echo "... install/strip" - @echo "... list_install_components" - @echo "... rebuild_cache" -.PHONY : help - - - -#============================================================================= -# Special targets to cleanup operation of make. - -# Special rule to run CMake to check the build system integrity. -# No rule that depends on this can have commands that come from listfiles -# because they might be regenerated. -cmake_check_build_system: - cd /home/awake/git/apache/FreeRDP-1.0 && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 -.PHONY : cmake_check_build_system - From 69b4b0318c766f647a24c3bc2b343f511b19705f Mon Sep 17 00:00:00 2001 From: roman-b Date: Sat, 3 Sep 2011 19:50:26 +0300 Subject: [PATCH 2/3] xfreerdp: fix usage of new DEBUG_ macroses for RAIL and X11 Client. --- client/X11/xf_event.c | 3 +-- client/X11/xf_rail.c | 10 ++++------ cmake/ConfigOptions.cmake | 2 ++ config.h.in | 2 ++ libfreerdp-rail/window.c | 2 +- 5 files changed, 10 insertions(+), 9 deletions(-) diff --git a/client/X11/xf_event.c b/client/X11/xf_event.c index b77cb4efa..7b0291f6e 100644 --- a/client/X11/xf_event.c +++ b/client/X11/xf_event.c @@ -486,10 +486,9 @@ boolean xf_event_process(freerdp* instance, XEvent* event) app = True; } -#if WITH_DEBUG_X11 + if (event->type != MotionNotify) DEBUG_X11("%s Event: wnd=0x%04X", X11_EVENT_STRINGS[event->type], (uint32) event->xany.window); -#endif switch (event->type) { diff --git a/client/X11/xf_rail.c b/client/X11/xf_rail.c index b9a3efa13..7e438d04d 100644 --- a/client/X11/xf_rail.c +++ b/client/X11/xf_rail.c @@ -333,16 +333,15 @@ void xf_process_rail_server_minmaxinfo_event(xfInfo* xfi, rdpChanMan* chanman, R xfWindow * window = NULL; window = (xfWindow *) rail_window->extra; - printf("Server Min Max Info PDU: windowId=0x%X " - "maxWidth=%d maxHeight=%d maxPosX=%d maxPosY=%d " - "minTrackWidth=%d minTrackHeight=%d maxTrackWidth=%d maxTrackHeight=%d\n", + DEBUG_X11("windowId=0x%X maxWidth=%d maxHeight=%d maxPosX=%d maxPosY=%d " + "minTrackWidth=%d minTrackHeight=%d maxTrackWidth=%d maxTrackHeight=%d", minmax->windowId, minmax->maxWidth, minmax->maxHeight, (sint16)minmax->maxPosX, (sint16)minmax->maxPosY, minmax->minTrackWidth, minmax->minTrackHeight, minmax->maxTrackWidth, minmax->maxTrackHeight); xf_SetWindowMinMaxInfo(xfi, window, minmax->maxWidth, minmax->maxHeight, minmax->maxPosX, minmax->maxPosY, - minmax->minTrackWidth, minmax->minTrackHeight, minmax->maxTrackWidth, minmax->maxTrackHeight); + minmax->minTrackWidth, minmax->minTrackHeight, minmax->maxTrackWidth, minmax->maxTrackHeight); } } @@ -374,8 +373,7 @@ void xf_process_rail_server_localmovesize_event(xfInfo* xfi, rdpChanMan* chanman xfWindow * window = NULL; window = (xfWindow *) rail_window->extra; - printf("Server Local MoveSize PDU: windowId=0x%X " - "isMoveSizeStart=%d moveSizeType=%s PosX=%d PosY=%d\n", + DEBUG_X11("windowId=0x%X isMoveSizeStart=%d moveSizeType=%s PosX=%d PosY=%d", movesize->windowId, movesize->isMoveSizeStart, movetype_names[movesize->moveSizeType], (sint16)movesize->posX, (sint16)movesize->posY); diff --git a/cmake/ConfigOptions.cmake b/cmake/ConfigOptions.cmake index 295b0cd88..9715771bc 100644 --- a/cmake/ConfigOptions.cmake +++ b/cmake/ConfigOptions.cmake @@ -9,6 +9,8 @@ option(WITH_DEBUG_CERTIFICATE "Print certificate related debug messages." OFF) option(WITH_DEBUG_LICENSE "Print license debug messages." OFF) option(WITH_DEBUG_GDI "Print graphics debug messages." OFF) option(WITH_DEBUG_RFX "Print RemoteFX debug messages." OFF) +option(WITH_DEBUG_X11 "Print X11 Client debug messages" OFF) +option(WITH_DEBUG_RAIL "Print RemoteApp debug messages" OFF) option(WITH_MANPAGES "Generate manpages." ON) option(WITH_PROFILER "Compile profiler." OFF) option(WITH_SSE2 "Use SSE2 optimization." OFF) diff --git a/config.h.in b/config.h.in index 360067bd7..9eea02667 100644 --- a/config.h.in +++ b/config.h.in @@ -31,5 +31,7 @@ #cmakedefine WITH_DEBUG_RFX #cmakedefine WITH_PROFILER #cmakedefine WITH_SSE2 +#cmakedefine WITH_DEBUG_X11 +#cmakedefine WITH_DEBUG_RAIL #endif diff --git a/libfreerdp-rail/window.c b/libfreerdp-rail/window.c index 8dd789d4f..6a41f6121 100644 --- a/libfreerdp-rail/window.c +++ b/libfreerdp-rail/window.c @@ -143,7 +143,7 @@ void window_state_update(rdpWindow* window, WINDOW_ORDER_INFO* orderInfo, WINDOW DEBUG_RAIL("ownerWindowId:0x%08X", window->ownerWindowId); } - DEBUG_RAIL("window_state_update: windowId=0x%X ownerWindowId=0x%X\n", + DEBUG_RAIL("windowId=0x%X ownerWindowId=0x%X", window->windowId, window->ownerWindowId); if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_STYLE) From 14ce6ae7f0b6bc8ef4013a1442054d9a73a69b4a Mon Sep 17 00:00:00 2001 From: roman-b Date: Sat, 3 Sep 2011 23:38:01 +0300 Subject: [PATCH 3/3] xfreerdp: RemoteApp Local Move/Size improvements. Issues: fast mouse moving after left button pressing is create "windows shake" effect. Slow mouse speed after left button press allows to discard this effect. --- client/X11/xf_event.c | 25 ++++++++++++++++++++++--- client/X11/xf_rail.c | 6 +++--- client/X11/xf_window.c | 15 ++++++++------- client/X11/xfreerdp.h | 7 +++++++ 4 files changed, 40 insertions(+), 13 deletions(-) diff --git a/client/X11/xf_event.c b/client/X11/xf_event.c index 7b0291f6e..b1bb040b1 100644 --- a/client/X11/xf_event.c +++ b/client/X11/xf_event.c @@ -148,7 +148,8 @@ boolean xf_event_MotionNotify(xfInfo* xfi, XEvent* event, boolean app) x += xfw->left; y += xfw->top; - input->MouseEvent(input, PTR_FLAGS_MOVE, x, y); + if (!xfw->isLocalMoveSizeModeEnabled) + input->MouseEvent(input, PTR_FLAGS_MOVE, x, y); } } @@ -430,13 +431,31 @@ boolean xf_event_ConfigureNotify(xfInfo* xfi, XEvent* event, boolean app) xfWindow* xfw; xfw = (xfWindow*) window->extra; - if (xfw->isLocalMoveSizeModeEnabled) + DEBUG_X11_LMS("ConfigureNotify: send_event=%d eventWindow=0x%X window=0x%X above=0x%X rc={l=%d t=%d r=%d b=%d} " + "w=%d h=%d override_redirect=%d", + event->xconfigure.send_event, + (uint32)event->xconfigure.event, + (uint32)event->xconfigure.window, + (uint32)event->xconfigure.above, + event->xconfigure.x, + event->xconfigure.y, + event->xconfigure.x + event->xconfigure.width - 1, + event->xconfigure.y + event->xconfigure.height - 1, + event->xconfigure.width, + event->xconfigure.height, + event->xconfigure.override_redirect); + + if (xfw->isLocalMoveSizeModeEnabled && event->xconfigure.above != 0) { uint32 left = event->xconfigure.x; uint32 top = event->xconfigure.y; - uint32 right = event->xconfigure.y + event->xconfigure.width - 1; + uint32 right = event->xconfigure.x + event->xconfigure.width; uint32 bottom = event->xconfigure.y + event->xconfigure.height - 1; + DEBUG_X11_LMS("MoveSendToServer: windowId=0x%X rc={l=%d t=%d r=%d b=%d} w=%d h=%d \n", + (uint32)xfw->handle, left, top, right, bottom, event->xconfigure.width, + event->xconfigure.height); + xf_rail_send_windowmove(xfi, window->windowId, left, top, right, bottom); } diff --git a/client/X11/xf_rail.c b/client/X11/xf_rail.c index 7e438d04d..e475a9342 100644 --- a/client/X11/xf_rail.c +++ b/client/X11/xf_rail.c @@ -333,7 +333,7 @@ void xf_process_rail_server_minmaxinfo_event(xfInfo* xfi, rdpChanMan* chanman, R xfWindow * window = NULL; window = (xfWindow *) rail_window->extra; - DEBUG_X11("windowId=0x%X maxWidth=%d maxHeight=%d maxPosX=%d maxPosY=%d " + DEBUG_X11_LMS("windowId=0x%X maxWidth=%d maxHeight=%d maxPosX=%d maxPosY=%d " "minTrackWidth=%d minTrackHeight=%d maxTrackWidth=%d maxTrackHeight=%d", minmax->windowId, minmax->maxWidth, minmax->maxHeight, (sint16)minmax->maxPosX, (sint16)minmax->maxPosY, @@ -373,11 +373,11 @@ void xf_process_rail_server_localmovesize_event(xfInfo* xfi, rdpChanMan* chanman xfWindow * window = NULL; window = (xfWindow *) rail_window->extra; - DEBUG_X11("windowId=0x%X isMoveSizeStart=%d moveSizeType=%s PosX=%d PosY=%d", + DEBUG_X11_LMS("windowId=0x%X isMoveSizeStart=%d moveSizeType=%s PosX=%d PosY=%d", movesize->windowId, movesize->isMoveSizeStart, movetype_names[movesize->moveSizeType], (sint16)movesize->posX, (sint16)movesize->posY); -#if 0 +#ifdef WITH_DEBUG_X11_LOCAL_MOVESIZE if (movesize->isMoveSizeStart) xf_StartLocalMoveSize(xfi, window, movesize->moveSizeType, (int) movesize->posX, (int) movesize->posY); else diff --git a/client/X11/xf_window.c b/client/X11/xf_window.c index 43db3848f..c5a1f0f48 100644 --- a/client/X11/xf_window.c +++ b/client/X11/xf_window.c @@ -367,7 +367,7 @@ void xf_SetWindowMinMaxInfo(xfInfo* xfi, xfWindow* window, size_hints->max_height = maxTrackHeight; /* to speedup window drawing we need to select optimal value for sizing step. */ - size_hints->width_inc = size_hints->height_inc = 5; + size_hints->width_inc = size_hints->height_inc = 1; XSetWMNormalHints(xfi->display, window->handle, size_hints); XFree(size_hints); @@ -473,10 +473,7 @@ void xf_StopLocalMoveSize(xfInfo* xfi, xfWindow* window, uint16 moveSizeType, in { window->isLocalMoveSizeModeEnabled = False; - if (moveSizeType == RAIL_WMSZ_MOVE) - { - xf_MoveWindow(xfi, window, topLeftX, topLeftY, window->width, window->height); - } + xf_MoveWindow(xfi, window, topLeftX, topLeftY, window->width, window->height); } void xf_MoveWindow(xfInfo* xfi, xfWindow* window, int x, int y, int width, int height) @@ -486,8 +483,8 @@ void xf_MoveWindow(xfInfo* xfi, xfWindow* window, int x, int y, int width, int h if ((width * height) < 1) return; - if (window->isLocalMoveSizeModeEnabled) - return; + DEBUG_X11_LMS("xf_MoveWindow: BEFORE correctness h=0x%X x=%d y=%d w=%d h=%d", + (uint32) window->handle, x, y, width, height); xf_FixWindowCoordinates(xfi, &x, &y, &width, &height); @@ -504,6 +501,10 @@ 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); } void xf_ShowWindow(xfInfo* xfi, xfWindow* window, uint8 state) diff --git a/client/X11/xfreerdp.h b/client/X11/xfreerdp.h index dcdb7a98a..b9ac24783 100644 --- a/client/X11/xfreerdp.h +++ b/client/X11/xfreerdp.h @@ -116,4 +116,11 @@ void xf_toggle_fullscreen(xfInfo* xfi); #define DEBUG_X11(fmt, ...) DEBUG_NULL(fmt, ## __VA_ARGS__) #endif +#ifdef WITH_DEBUG_X11_LOCAL_MOVESIZE +#define DEBUG_X11_LMS(fmt, ...) DEBUG_CLASS(X11_LMS, fmt, ## __VA_ARGS__) +#else +#define DEBUG_X11_LMS(fmt, ...) DEBUG_NULL(fmt, ## __VA_ARGS__) +#endif + + #endif /* __XFREERDP_H */