From 84fbc1159c1d40836b903f3591008ff3f5de2b34 Mon Sep 17 00:00:00 2001 From: C-o-r-E Date: Tue, 14 May 2013 12:43:42 -0400 Subject: [PATCH] xfreerdp-client: fixed pan constraints --- client/X11/xf_keyboard.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/client/X11/xf_keyboard.c b/client/X11/xf_keyboard.c index d70e570ea..498c18373 100644 --- a/client/X11/xf_keyboard.c +++ b/client/X11/xf_keyboard.c @@ -318,8 +318,7 @@ BOOL xf_kbd_handle_special_keys(xfInfo* xfi, KeySym keysym) { xfi->offset_x -= 5; - if(xfi->offset_x < 0) - xfi->offset_x = 0; + xf_draw_screen_scaled(xfi); printf("pan left : %d\n", xfi->offset_x); @@ -334,6 +333,9 @@ BOOL xf_kbd_handle_special_keys(xfInfo* xfi, KeySym keysym) { xfi->offset_x += 5; + if(xfi->offset_x > 0) + xfi->offset_x = 0; + xf_draw_screen_scaled(xfi); printf("pan right : %d\n", xfi->offset_x); return TRUE; @@ -347,9 +349,8 @@ BOOL xf_kbd_handle_special_keys(xfInfo* xfi, KeySym keysym) { xfi->offset_y -= 5; - if(xfi->offset_y < 0) - xfi->offset_y = 0; + xf_draw_screen_scaled(xfi); printf("pan up : %d\n", xfi->offset_y); return TRUE; } @@ -361,6 +362,11 @@ BOOL xf_kbd_handle_special_keys(xfInfo* xfi, KeySym keysym) && (xf_kbd_key_pressed(xfi, XK_Control_L) || xf_kbd_key_pressed(xfi, XK_Control_R))) { xfi->offset_y += 5; + + if(xfi->offset_y > 0) + xfi->offset_y = 0; + + xf_draw_screen_scaled(xfi); printf("pan down : %d\n", xfi->offset_y); return TRUE; }