From 5387a45d03fe4fd3ecc434aa9d968eef795c7dc9 Mon Sep 17 00:00:00 2001 From: hidnplayr Date: Mon, 24 Aug 2015 14:29:14 +0000 Subject: [PATCH] VNC Viewer: Don't send cursorevents to server when cursor is out of window, fixed bug in GUI. git-svn-id: svn://kolibrios.org@5771 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/network/vncc/gui.inc | 4 +--- programs/network/vncc/vncc.asm | 5 +++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/programs/network/vncc/gui.inc b/programs/network/vncc/gui.inc index 11c5f81873..5dcc430ad8 100644 --- a/programs/network/vncc/gui.inc +++ b/programs/network/vncc/gui.inc @@ -163,7 +163,7 @@ draw_gui: test [work], WORK_GUI jnz .redraw cmp [status], STATUS_CONNECTED - je .connected + je connected mcall 23, 10 ; wait for event dec eax ; redraw request ? @@ -176,8 +176,6 @@ draw_gui: jz .mouse jmp .loop - .connected: - ret .key: ; key event handler mcall 2 ; read key diff --git a/programs/network/vncc/vncc.asm b/programs/network/vncc/vncc.asm index 2bc9462daa..68dfbf2aab 100644 --- a/programs/network/vncc/vncc.asm +++ b/programs/network/vncc/vncc.asm @@ -195,9 +195,10 @@ end if @@: ; Present the user with the GUI and wait for network connection - call draw_gui.first_time + jmp draw_gui.first_time ; Create main window +connected: mcall 71, 1, name ; reset window caption (add server name) mov edx, dword[screen] @@ -207,7 +208,7 @@ end if add esi, ypos+xpos mcall 67, 10, 10 ; resize the window - mcall 40, EVM_MOUSE + EVM_MOUSE_FILTER + EVM_KEY + EVM_REDRAW + EVM_BUTTON + mcall 40, EVM_CURSOR_FILTER + EVM_MOUSE_FILTER + EVM_MOUSE + EVM_KEY + EVM_REDRAW + EVM_BUTTON mcall 66, 1, 1 ; Switch keyboard to scancode mode