input: two bugfixes.
Hi,
Two bugs in the input layer rewrite poped up,
here are the bugfixes for then.
please pull,
Gerd
The following changes since commit f53f3d0a00b6df39ce8dfca942608e5b6a9a4f71:
Merge remote-tracking branch 'remotes/kvaneesh/for-upstream' into staging (2014-03-08 12:38:43 +0000)
are available in the git repository at:
git://git.kraxel.org/qemu tags/pull-input-5
for you to fetch changes up to dbb2a1326a7af6159861d3d7976c251a15ce0f92:
input: map INPUT_BUTTON_WHEEL_{UP,DOWN} to legacy input z axis moves. (2014-03-10 13:49:44 +0100)
----------------------------------------------------------------
input: fixes for the rewrite.
----------------------------------------------------------------
Gerd Hoffmann (2):
input: sdl: fix guest_cursor logic.
input: map INPUT_BUTTON_WHEEL_{UP,DOWN} to legacy input z axis moves.
ui/input-legacy.c | 14 ++++++++++++++ ui/sdl.c | 18 +++++++++++------- 2 files changed, 25 insertions(+), 7 deletions(-)
[Qemu-devel] [PULL 2/2] input: map INPUT_BUTTON_WHEEL_{UP, DOWN} to legacy input z axis moves.
Unbreaks mouse wheel.
--- ui/input-legacy.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
ui/input-legacy.c +14 -0
@@ -359,6 +359,20 @@ static void legacy_mouse_event(DeviceState *dev, QemuConsole *src, }else { s->buttons &= ~bmap[evt->btn->button]; } +if (evt->btn->down && evt->btn->button ==INPUT_BUTTON_WHEEL_UP ) { + s->qemu_put_mouse_event (s->qemu_put_mouse_event_opaque, + s->axis[INPUT_AXIS_X ], + s->axis[INPUT_AXIS_Y ], +-1 , + s->buttons); + } +if (evt->btn->down && evt->btn->button ==INPUT_BUTTON_WHEEL_DOWN ) { + s->qemu_put_mouse_event (s->qemu_put_mouse_event_opaque, + s->axis[INPUT_AXIS_X ], + s->axis[INPUT_AXIS_Y ], +1 , + s->buttons); + }break ;case INPUT_EVENT_KIND_ABS : s->axis[evt->abs->axis] = evt->abs->value;
Signature · 1 line
1.8.3.1
[Qemu-devel] [PULL 1/2] input: sdl: fix guest_cursor logic.
In reply to Gerd HoffmannUnbreaks relative mouse mode with SDL.
--- ui/sdl.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-)
ui/sdl.c +11 -7
@@ -455,13 +455,17 @@ static void sdl_send_mouse_event(int dx, int dy, int x, int y, int state) real_screen->w);qemu_input_queue_abs (dcl->con,INPUT_AXIS_Y , y, real_screen->h); - }else if (guest_cursor) { - x -= guest_x; - y -= guest_y; - guest_x += x; - guest_y += y; -qemu_input_queue_rel (dcl->con,INPUT_AXIS_X , x); -qemu_input_queue_rel (dcl->con,INPUT_AXIS_Y , y); + }else { +if (guest_cursor) { + x -= guest_x; + y -= guest_y; + guest_x += x; + guest_y += y; + dx = x; + dy = y; + } +qemu_input_queue_rel (dcl->con,INPUT_AXIS_X , dx); +qemu_input_queue_rel (dcl->con,INPUT_AXIS_Y , dy); }qemu_input_event_sync (); }
Signature · 1 line
1.8.3.1
Peter Maydell
AppliedQuoted 24 lines · Gerd Hoffmann
Hi,
Two bugs in the input layer rewrite poped up,
here are the bugfixes for then.please pull,
GerdThe following changes since commit
f53f3d0a00b6df39ce8dfca942608e5b6a9a4f71:Merge remote-tracking branch 'remotes/kvaneesh/for-upstream' into staging (2014-03-08 12:38:43 +0000)
are available in the git repository at:
git://git.kraxel.org/qemutags/pull-input-5for you to fetch changes up to
dbb2a1326a7af6159861d3d7976c251a15ce0f92:input: map INPUT_BUTTON_WHEEL_{UP,DOWN} to legacy input z axis moves. (2014-03-10 13:49:44 +0100)
----------------------------------------------------------------
input: fixes for the rewrite.
Quoted 9 lines
----------------------------------------------------------------
Gerd Hoffmann (2):
input: sdl: fixguest_cursorlogic.
input: map INPUT_BUTTON_WHEEL_{UP,DOWN} to legacy input z axis moves.ui/input-legacy.c | 14 ++++++++++++++ ui/sdl.c | 18 +++++++++++------- 2 files changed, 25 insertions(+), 7 deletions(-)
Applied, thanks.
-- PMM