#
b5a1b443 |
| 03-Mar-2016 |
Eric Blake <eblake@redhat.com> |
ui: Shorten references into InputEvent
An upcoming patch will alter how simple unions, like InputEvent, are laid out, which will impact all lines of the form 'evt->u.XXX' (expanding it to the longer
ui: Shorten references into InputEvent
An upcoming patch will alter how simple unions, like InputEvent, are laid out, which will impact all lines of the form 'evt->u.XXX' (expanding it to the longer 'evt->u.XXX.data'). For better legibility in that patch, and less need for line wrapping, it's better to use a temporary variable to reduce the effect of a layout change to just the variable initializations, rather than every reference within an InputEvent.
There was one instance in hid.c:hid_pointer_event() where the code was referring to evt->u.rel inside the case label where evt->u.abs is the correct name; thankfully, both members of the union have the same type, so it happened to work, but it is now cleaner.
Signed-off-by: Eric Blake <eblake@redhat.com> Message-Id: <1457021813-10704-8-git-send-email-eblake@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
show more ...
|
#
f22d0af0 |
| 12-Jan-2016 |
Gerd Hoffmann <kraxel@redhat.com> |
qapi: rename input buttons
All lowercase, use-dash instead of CamelCase.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Daniel P. Berrange <berrange@redhat.com> Reviewed-by: Markus A
qapi: rename input buttons
All lowercase, use-dash instead of CamelCase.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Daniel P. Berrange <berrange@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
show more ...
|
#
91dbeeda |
| 04-Feb-2016 |
Daniel Serpell <daniel.serpell@gmail.com> |
Adds keycode 86 to the hid_usage_keys translation table.
This key is present in international keyboards, between left shift and the 'Z' key, ant is described in the HID usage tables as "Keyboard Non
Adds keycode 86 to the hid_usage_keys translation table.
This key is present in international keyboards, between left shift and the 'Z' key, ant is described in the HID usage tables as "Keyboard Non-US \ and |": http://www.usb.org/developers/hidpage/Hut1_12v2.pdf
This patch fixes the usb-kbd devices.
Signed-off-by: Daniel Serpell <daniel.serpell@gmail.com> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
show more ...
|
#
0430891c |
| 26-Jan-2016 |
Peter Maydell <peter.maydell@linaro.org> |
hw: Clean up includes
Clean up includes so that osdep.h is included first and headers which it implies are not included manually.
This commit was created with scripts/clean-includes.
Signed-off-by
hw: Clean up includes
Clean up includes so that osdep.h is included first and headers which it implies are not included manually.
This commit was created with scripts/clean-includes.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1453832250-766-38-git-send-email-peter.maydell@linaro.org
show more ...
|
#
d20a580b |
| 18-Nov-2015 |
Eric Blake <eblake@redhat.com> |
qapi: Change munging of CamelCase enum values
When munging enum values, the fact that we were passing the entire prefix + value through camel_to_upper() meant that enum values spelled with CamelCase
qapi: Change munging of CamelCase enum values
When munging enum values, the fact that we were passing the entire prefix + value through camel_to_upper() meant that enum values spelled with CamelCase could be turned into CAMEL_CASE. However, this provides a potential collision (both OneTwo and One-Two would munge into ONE_TWO) for enum types, when the same two names are valid side-by-side as QAPI member names. By changing the generation of enum constants to always be prefix + '_' + c_name(value, False).upper(), and ensuring that there are no case collisions (in the next patches), we no longer have to worry about names that would be distinct as QAPI members but collide as variant tag names, without having to think about what munging the heuristics in camel_to_upper() will actually perform on an enum value.
Making the change will affect enums that did not follow coding conventions, using 'CamelCase' rather than desired 'lower-case'.
Thankfully, there are only two culprits: InputButton and ErrorClass. We already tweaked ErrorClass to make it an alias of QapiErrorClass, where only the alias needs changing rather than the whole tree. So the bulk of this change is modifying INPUT_BUTTON_WHEEL_UP to the new INPUT_BUTTON_WHEELUP (and likewise for WHEELDOWN). That part of this commit may later need reverting if we rename the enum constants from 'WheelUp' to 'wheel-up' as part of moving x-input-send-event to a stable interface; but at least we have documentation bread crumbs in place to remind us (commit 513e7cd), and it matches the fact that SDL constants are also spelled SDL_BUTTON_WHEELUP.
Suggested by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Eric Blake <eblake@redhat.com> Message-Id: <1447836791-369-27-git-send-email-eblake@redhat.com> [Commit message tweaked] Signed-off-by: Markus Armbruster <armbru@redhat.com>
show more ...
|
#
7fb1cf16 |
| 18-Nov-2015 |
Eric Blake <eblake@redhat.com> |
qapi: Don't let implicit enum MAX member collide
Now that we guarantee the user doesn't have any enum values beginning with a single underscore, we can use that for our own purposes. Renaming ENUM_
qapi: Don't let implicit enum MAX member collide
Now that we guarantee the user doesn't have any enum values beginning with a single underscore, we can use that for our own purposes. Renaming ENUM_MAX to ENUM__MAX makes it obvious that the sentinel is generated.
This patch was mostly generated by applying a temporary patch:
|diff --git a/scripts/qapi.py b/scripts/qapi.py |index e6d014b..b862ec9 100644 |--- a/scripts/qapi.py |+++ b/scripts/qapi.py |@@ -1570,6 +1570,7 @@ const char *const %(c_name)s_lookup[] = { | max_index = c_enum_const(name, 'MAX', prefix) | ret += mcgen(''' | [%(max_index)s] = NULL, |+// %(max_index)s | }; | ''', | max_index=max_index)
then running:
$ cat qapi-{types,event}.c tests/test-qapi-types.c | sed -n 's,^// \(.*\)MAX,s|\1MAX|\1_MAX|g,p' > list $ git grep -l _MAX | xargs sed -i -f list
The only things not generated are the changes in scripts/qapi.py.
Rejecting enum members named 'MAX' is now useless, and will be dropped in the next patch.
Signed-off-by: Eric Blake <eblake@redhat.com> Message-Id: <1447836791-369-23-git-send-email-eblake@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> [Rebased to current master, commit message tweaked] Signed-off-by: Markus Armbruster <armbru@redhat.com>
show more ...
|
#
568c73a4 |
| 26-Oct-2015 |
Eric Blake <eblake@redhat.com> |
input: Convert to new qapi union layout
We have two issues with our qapi union layout: 1) Even though the QMP wire format spells the tag 'type', the C code spells it 'kind', requiring some hacks in
input: Convert to new qapi union layout
We have two issues with our qapi union layout: 1) Even though the QMP wire format spells the tag 'type', the C code spells it 'kind', requiring some hacks in the generator. 2) The C struct uses an anonymous union, which places all tag values in the same namespace as all non-variant members. This leads to spurious collisions if a tag value matches a non-variant member's name.
Make the conversion to the new layout for input-related code.
Signed-off-by: Eric Blake <eblake@redhat.com> Message-Id: <1445898903-12082-20-git-send-email-eblake@redhat.com> [Commit message tweaked slightly] Signed-off-by: Markus Armbruster <armbru@redhat.com>
show more ...
|
#
562f9375 |
| 14-Jul-2015 |
Paolo Bonzini <pbonzini@redhat.com> |
hid: clarify hid_keyboard_process_keycode
Coverity thinks the fallthroughs are smelly. They are correct, but everything else in this function is like "wut?".
Refer explicitly to bits 8 and 9 of hs
hid: clarify hid_keyboard_process_keycode
Coverity thinks the fallthroughs are smelly. They are correct, but everything else in this function is like "wut?".
Refer explicitly to bits 8 and 9 of hs->kbd.modifiers instead of shifting right first and using (1 << 7). Document what the scancode is when hid_code is 0xe0. And add plenty of comments.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
show more ...
|
#
0ee4de58 |
| 21-Jan-2015 |
Dinar Valeev <dvaleev@suse.com> |
hw/input/hid.c Fix capslock hid code
When ever USB keyboard is used, e.g. '-usbdevice keyboard' pressing caps lock key send 0x32 hid code, which is treated as backslash. Instead it should be 0x39 co
hw/input/hid.c Fix capslock hid code
When ever USB keyboard is used, e.g. '-usbdevice keyboard' pressing caps lock key send 0x32 hid code, which is treated as backslash. Instead it should be 0x39 code. This affects sending uppercase keys, as they typed whith caps lock active.
While on x86 this can be workarounded by using ps/2 protocol. On Power it is crusial as we don't have anything else than USB.
This is fixes guest automation tasts over vnc.
Signed-off-by: Dinar Valeev <dvaleev@suse.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
show more ...
|
#
ba4d2606 |
| 27-Nov-2014 |
Gerd Hoffmann <kraxel@redhat.com> |
hid: handle full ptr queues in post_load
Cc: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Tested-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: G
hid: handle full ptr queues in post_load
Cc: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Tested-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Gonglei <arei.gonglei@huawei.com>
show more ...
|
#
35e83d10 |
| 14-Jun-2014 |
Christian Burger <christian@krikkel.de> |
input: fix jumpy mouse cursor with USB mouse emulation
Guest mouse pointer was jumpy, when moving host mouse in the vertical direction (see bug #1327800).
Signed-off-by: Christian Burger <christian
input: fix jumpy mouse cursor with USB mouse emulation
Guest mouse pointer was jumpy, when moving host mouse in the vertical direction (see bug #1327800).
Signed-off-by: Christian Burger <christian@krikkel.de> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
show more ...
|
#
5d831be2 |
| 13-Jun-2014 |
Stefan Weil <sw@weilnetz.de> |
Fix new typos (found by codespell)
* accomodate -> accommodate * aquiring -> acquiring * beacuse -> because * loosing -> losing * prefering -> preferring * threshhold -> threshold
Signed-off-by: St
Fix new typos (found by codespell)
* accomodate -> accommodate * aquiring -> acquiring * beacuse -> because * loosing -> losing * prefering -> preferring * threshhold -> threshold
Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
show more ...
|
#
8b84286f |
| 19-May-2014 |
Gerd Hoffmann <kraxel@redhat.com> |
input: switch hid mouse and tablet to the new input layer api.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
#
1ff5eedd |
| 11-Mar-2014 |
Gerd Hoffmann <kraxel@redhat.com> |
input: switch hid keyboard to new input layer api.
Minimal patch to get the switchover done. We continue processing ps/2 scancodes for now as they are part of the live migration stream. Fixing tha
input: switch hid keyboard to new input layer api.
Minimal patch to get the switchover done. We continue processing ps/2 scancodes for now as they are part of the live migration stream. Fixing that, then mapping directly from QKeyValue to HID keycodes is left as excercise for another day.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
show more ...
|
#
bc72ad67 |
| 21-Aug-2013 |
Alex Bligh <alex@alex.org.uk> |
aio / timers: Switch entire codebase to the new timer API
This is an autogenerated patch using scripts/switch-timer-api.
Switch the entire code base to using the new timer API.
Note this patch may
aio / timers: Switch entire codebase to the new timer API
This is an autogenerated patch using scripts/switch-timer-api.
Switch the entire code base to using the new timer API.
Note this patch may introduce some line length issues.
Signed-off-by: Alex Bligh <alex@alex.org.uk> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
show more ...
|
#
5a37532d |
| 24-Apr-2013 |
Gerd Hoffmann <kraxel@redhat.com> |
input: introduce keyboard handler list
Add a linked list of keyboard handlers. Added handlers will go to the head of the list. Removed handlers will be zapped from the list. The head of the list
input: introduce keyboard handler list
Add a linked list of keyboard handlers. Added handlers will go to the head of the list. Removed handlers will be zapped from the list. The head of the list will be used for events.
This fixes the keyboard-dead-after-usb-kbd-unplug issue, key events will be re-routed to the ps/2 kbd instead of being discarded.
[ v2: fix cut+paste bug found my Markus ]
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 1366798118-3248-3-git-send-email-kraxel@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
show more ...
|
#
49ab747f |
| 01-Mar-2013 |
Paolo Bonzini <pbonzini@redhat.com> |
hw: move target-independent files to subdirectories
This patch tackles all files that are compiled once, moving them to subdirectories of hw/.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
#
0d09e41a |
| 05-Feb-2013 |
Paolo Bonzini <pbonzini@redhat.com> |
hw: move headers to include/
Many of these should be cleaned up with proper qdev-/QOM-ification. Right now there are many catch-all headers in include/hw/ARCH depending on cpu.h, and this makes it n
hw: move headers to include/
Many of these should be cleaned up with proper qdev-/QOM-ification. Right now there are many catch-all headers in include/hw/ARCH depending on cpu.h, and this makes it necessary to compile these files per-target. However, fixing this does not belong in these patches.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
83c9f4ca |
| 04-Feb-2013 |
Paolo Bonzini <pbonzini@redhat.com> |
hw: include hw header files with full paths
Done with this script:
cd hw for i in `find . -name '*.h' | sed 's/^..//'`; do echo '\,^#.*include.*["<]'$i'[">], s,'$i',hw/&,' done | sed -i -f - `fin
hw: include hw header files with full paths
Done with this script:
cd hw for i in `find . -name '*.h' | sed 's/^..//'`; do echo '\,^#.*include.*["<]'$i'[">], s,'$i',hw/&,' done | sed -i -f - `find . -type f`
This is so that paths remain valid as files are moved.
Instead, files in hw/dataplane are referenced with the relative path. We know they are not going to move to include/, and they are the only include files that are in subdirectories _and_ move.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
027c03f7 |
| 14-Dec-2012 |
Hans de Goede <hdegoede@redhat.com> |
hid: Change idle handling to use a timer
This leads to cleaner code in usb-hid, and removes up to a 1000 calls / sec to qemu_get_clock_ns(vm_clock) if idle-time is set to its default value of 0.
Si
hid: Change idle handling to use a timer
This leads to cleaner code in usb-hid, and removes up to a 1000 calls / sec to qemu_get_clock_ns(vm_clock) if idle-time is set to its default value of 0.
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
show more ...
|
#
1de7afc9 |
| 17-Dec-2012 |
Paolo Bonzini <pbonzini@redhat.com> |
misc: move include files to include/qemu/
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
#
28ecbaee |
| 28-Nov-2012 |
Paolo Bonzini <pbonzini@redhat.com> |
ui: move files to ui/ and include/ui/
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
#
18f88f11 |
| 04-Sep-2011 |
Blue Swirl <blauwirbel@gmail.com> |
hid: fix misassignment
The code does not have any effect as is, fix it.
Spotted by clang analyzer: /src/qemu/hw/hid.c:99:13: warning: Value stored to 'x1' is never read x1 = 1;
Signed-
hid: fix misassignment
The code does not have any effect as is, fix it.
Spotted by clang analyzer: /src/qemu/hw/hid.c:99:13: warning: Value stored to 'x1' is never read x1 = 1;
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
show more ...
|
#
ccd4ed06 |
| 09-Aug-2011 |
Michael Walle <michael@walle.cc> |
hid: introduce hid vmstate macros
Add VMSTATE macros to describe a HIDState. Based on usb-hid.c descriptions.
Signed-off-by: Michael Walle <michael@walle.cc> Signed-off-by: Gerd Hoffmann <kraxel@re
hid: introduce hid vmstate macros
Add VMSTATE macros to describe a HIDState. Based on usb-hid.c descriptions.
Signed-off-by: Michael Walle <michael@walle.cc> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
show more ...
|
#
bb0db527 |
| 09-Aug-2011 |
Michael Walle <michael@walle.cc> |
hid: register kbd hander in init()
Register the keyboard event handler in hid's init() instead of its reset() function.
Signed-off-by: Michael Walle <michael@walle.cc> Signed-off-by: Gerd Hoffmann
hid: register kbd hander in init()
Register the keyboard event handler in hid's init() instead of its reset() function.
Signed-off-by: Michael Walle <michael@walle.cc> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
show more ...
|