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; }