xfreerdp-client: fixed pan constraints
This commit is contained in:
parent
152af5bfc9
commit
84fbc1159c
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user