mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
Merge pull request #79 from roman-b/rail
RemoteApp Local Move/Size improvements and some fixes with DEBUG_ macroses.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -486,10 +505,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)
|
||||
{
|
||||
|
||||
@@ -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_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,
|
||||
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,12 +373,11 @@ 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_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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -31,5 +31,7 @@
|
||||
#cmakedefine WITH_DEBUG_RFX
|
||||
#cmakedefine WITH_PROFILER
|
||||
#cmakedefine WITH_SSE2
|
||||
#cmakedefine WITH_DEBUG_X11
|
||||
#cmakedefine WITH_DEBUG_RAIL
|
||||
|
||||
#endif
|
||||
|
||||
167
keymaps/Makefile
167
keymaps/Makefile
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user