summaryrefslogtreecommitdiffstats
path: root/ui
Commit message (Collapse)AuthorAgeFilesLines
* TLS support for VNC WebsocketsTim Hardeck2013-05-035-42/+176
| | | | | | | | | | | | | | | | | | | | | | | Added TLS support to the VNC QEMU Websockets implementation. VNC-TLS needs to be enabled for this feature to be used. The required certificates are specified as in case of VNC-TLS with the VNC parameter "x509=<path>". If the server certificate isn't signed by a rooth authority it needs to be manually imported in the browser because at least in case of Firefox and Chrome there is no user dialog, the connection just gets canceled. As a side note VEncrypt over Websocket doesn't work atm because TLS can't be stacked in the current implementation. (It also didn't work before) Nevertheless to my knowledge there is no HTML 5 VNC client which supports it and the Websocket connection can be encrypted with regular TLS now so it should be fine for most use cases. Signed-off-by: Tim Hardeck <thardeck@suse.de> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Message-id: 1366727581-5772-1-git-send-email-thardeck@suse.de Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vnc: Adjust lock state sync logic with VNC_FEATURE_LED_STATELei Li2013-04-291-0/+5
| | | | | | | Signed-off-by: Lei Li <lilei@linux.vnet.ibm.com> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Message-id: 1366867752-11578-4-git-send-email-lilei@linux.vnet.ibm.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vnc: Support for LED state extensionLei Li2013-04-292-0/+48
| | | | | | | Signed-off-by: Lei Li <lilei@linux.vnet.ibm.com> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Message-id: 1366867752-11578-3-git-send-email-lilei@linux.vnet.ibm.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vnc: Add SCROLL lock key to kbd_ledsLei Li2013-04-291-1/+5
| | | | | | | Signed-off-by: Lei Li <lilei@linux.vnet.ibm.com> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Message-id: 1366867752-11578-2-git-send-email-lilei@linux.vnet.ibm.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* gtk: refactor menu creationAnthony Liguori2013-04-261-37/+56
| | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* console: add dummy surface for guests without graphic cardGerd Hoffmann2013-04-251-2/+32
| | | | | | So users get a notification instead of a crash. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* console: zap ds arg from register_displaychangelistenerGerd Hoffmann2013-04-257-11/+11
| | | | | | | We don't have multiple DisplayStates any more, so passing it in as argument is not needed. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* console: switch ppm_save to qemu_openGerd Hoffmann2013-04-251-2/+4
| | | | | | ... so it works with fdset. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* console: add qemu_console_lookup_by_deviceGerd Hoffmann2013-04-251-0/+19
| | | | | | Look up the QemuConsole for a given device, using the new link. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* console: add device link to QemuConsolesGerd Hoffmann2013-04-251-1/+14
| | | | | | So it is possible to figure which qemu console displays which device. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* console: qom-ify QemuConsoleGerd Hoffmann2013-04-251-1/+14
| | | | | | Just the minimal bits to turn QemuConsoles into Objects. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* input: introduce keyboard handler listGerd Hoffmann2013-04-241-12/+25
| | | | | | | | | | | | | | | 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>
* input: make QEMUPutLEDEntry + QEMUPutMouseEntry privateGerd Hoffmann2013-04-241-0/+18
| | | | | | | | | | There is no need for anybody outside ui/input.c to access the struct elements. Move the definitions, leaving only the typedefs in the header files. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 1366798118-3248-2-git-send-email-kraxel@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* ui/gtk: Use gtk_widget_get_window() to support both gtk2 and gtk3Ozan Çağlayan2013-04-231-2/+2
| | | | | | | | This fixes build with gtk+-3.0. Signed-off-by: Ozan Çağlayan <ozancag@gmail.com> Message-id: 1366711402-1750-1-git-send-email-ozancag@gmail.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Merge remote-tracking branch 'luiz/queue/qmp' into stagingAnthony Liguori2013-04-221-5/+3
|\ | | | | | | | | | | | | | | | | | | | | # By Amos Kong (1) and Luiz Capitulino (1) # Via Luiz Capitulino * luiz/queue/qmp: virtio-balloon: fix integer overflow in BALLOON_CHANGE QMP event monitor: fix the wrong order of releasing keys Message-id: 1366375833-995-1-git-send-email-lcapitulino@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
| * monitor: fix the wrong order of releasing keysAmos Kong2013-04-191-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | (qemu) sendkey ctrl_r-scroll_lock-scroll_lock Executing this command could not let Windows guest panic, it caused by the wrong order of releasing keys. This problem was introduced by commit e4c8f004c55d9da3eae3e14df740238bf805b5d6. The right release order should be starting from last item. Signed-off-by: Amos Kong <akong@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* | ui/cocoa.m: Fix recent compile breakagePeter Maydell2013-04-211-4/+4
|/ | | | | | | | | | Fix failures to compile introduced by recent console commits 1dbfa00503, 81c0d5a6) which removed is_graphic_console() and vga_hw_update() without updating the cocoa UI backend to match. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Fix warnings suppressors to honor --disable-werrorMarkus Armbruster2013-04-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | | Replace #pragma GCC diagnostic ignored FOO [Troublesome code...] #pragma GCC diagnostic error FOO by #pragma GCC diagnostic push #pragma GCC diagnostic ignored FOO [Troublesome code...] #pragma GCC diagnostic pop Broken in commit 3f4349d, commit 092bb30, and commit c95e308. Signed-off-by: Markus Armbruster <armbru@redhat.com> Tested-by: Alexey Kardashevskiy <aik@ozlabs.ru> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Message-id: 1366113066-1340-1-git-send-email-armbru@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* gtk: custom cursor supportGerd Hoffmann2013-04-161-0/+33
| | | | | | | Makes gtk ui play nicely with qxl (and vmware_svga) as you can actually see your pointer now ;) Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* console: allow pinning displaychangelisteners to consolesGerd Hoffmann2013-04-163-36/+81
| | | | | | | | | | | DisplayChangeListener gets a new QemuConsole field, which can be set to non-NULL before registering. This will pin the QemuConsole, so that particular DisplayChangeListener will not follow console switches. spice+gtk (which don't support text console input anyway) are switched over to be pinned to console 0, which usually is the graphical display. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* console: add qemu_console_is_*Gerd Hoffmann2013-04-164-44/+52
| | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* xen: re-enable refresh interval reporting for xenfbGerd Hoffmann2013-04-161-0/+6
| | | | | | | | | xenfb informs the guest about the gui refresh interval so it can avoid pointless work. That logic was temporarely disabled for the DisplayState reorganization. Restore it now, with a proper interface for it. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* console: gui timer fixesGerd Hoffmann2013-04-164-63/+54
| | | | | | | | | Make gui update rate adaption code in gui_update() actually work. Sprinkle in a tracepoint so you can see the code at work. Remove the update rate adaption code in vnc and make vnc simply use the generic bits instead. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* console: add GraphicHwOpsGerd Hoffmann2013-04-161-17/+16
| | | | | | | Pass a single GraphicHwOps struct pointer to graphic_console_init, instead of a bunch of function pointers. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* console: make DisplayState private to console.cGerd Hoffmann2013-04-161-0/+8
| | | | | | | With gui_* being moved to console.c nobody outside console.c needs access to DisplayState fields any more. Make the struct private. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* console: move gui_update+gui_setup_refresh from vl.c into console.cGerd Hoffmann2013-04-161-0/+50
| | | | | | Pure code motion, no functional changes. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* console: zap g_width + g_heightGerd Hoffmann2013-04-161-23/+9
| | | | | | | | We have a surface per QemuConsole now, so there is no need to keep track of the QemuConsole size any more as we can query the surface size directly at any time. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* console: simplify screendumpGerd Hoffmann2013-04-161-19/+53
| | | | | | | | | | | | | | | | | | | Screendumps are alot simpler as we can update non-active QemuConsoles now. So we only need to update the QemuConsole we want write out, then dump the DisplaySurface content into a ppm file. Done. No console switching needed. No special support code in the gfx card emulation needed. Zap it all. Also move ppm_save out of the vga code and next to the qmp_screendump function. For now screen dumping is limited to console #0 (like it used to be), even though it is dead simple to extend it to other consoles. I wanna finish the console cleanup before setting new qapi interfaces into stone. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Tested-by: Igor Mitsyanko <i.mitsyanko@gmail.com>
* console: give each QemuConsole its own DisplaySurfaceGerd Hoffmann2013-04-161-27/+69
| | | | | | | | | Go away from the global DisplaySurface, give one to each QemuConsole instead. With this patch applied it is possible to call graphics_hw_* functions with qemu consoles which are not the current foreground console. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* console: rename vga_hw_*, add QemuConsole paramGerd Hoffmann2013-04-166-38/+49
| | | | | | | | | | | | Add QemuConsole parameter to vga_hw_*, so the interface allows to update non-active consoles (the actual code can't handle this yet, see next patch). Passing NULL is allowed and updates the active console, like the functions do today. While touching all vga_hw_* calls anyway rename that to the functions to hardware-neutral graphics_hw_* Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* console: displaystate init revampGerd Hoffmann2013-04-161-39/+34
| | | | | | | | | | We have only one DisplayState, so there is no need for the "next" linking, rip it. Also consolidate all displaystate initialization into init_displaystate(). This function is called by vl.c after creating the devices (and thus all QemuConsoles) and before initializing DisplayChangeListensers (aka gtk/sdl/vnc/spice ui). Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* console: add trace eventsGerd Hoffmann2013-04-161-0/+4
| | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* console: switch color_table_rgb to pixman_color_tGerd Hoffmann2013-04-161-16/+8
| | | | | | | Now that all text console rendering uses pixman we can easily switch the color tables to use pixman_color_t directly. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* console: use pixman for font renderingGerd Hoffmann2013-04-161-99/+11
| | | | | | Zap homegrown font rendering code, use pixman calls instead. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* console: use pixman for fill+blitGerd Hoffmann2013-04-161-55/+10
| | | | | | Zap homegrown pixel shuffeling code, use pixman calls instead. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* pixman: render vgafont glyphs into pixman imagesGerd Hoffmann2013-04-161-0/+43
| | | | | | | Add helper functions to create pixman mask images for glyphs and to render these glyphs into a pixman image. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* pixman: add qemu_pixman_color()Gerd Hoffmann2013-04-161-0/+11
| | | | | | | Helper function to map qemu colors (32bit integer + matching PixelFormat) into pixman_color_t. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* sysemu: avoid proliferation of include/ subdirectoriesPaolo Bonzini2013-04-152-2/+2
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* Merge remote-tracking branch 'luiz/queue/qmp' into stagingAnthony Liguori2013-04-021-1/+1
|\ | | | | | | | | | | | | | | | | | | # By Stefan Hajnoczi # Via Luiz Capitulino * luiz/queue/qmp: chardev: clear O_NONBLOCK on SCM_RIGHTS file descriptors qemu-socket: set passed fd non-blocking in socket_connect() net: ensure "socket" backend uses non-blocking fds oslib-posix: rename socket_set_nonblock() to qemu_set_nonblock()
| * oslib-posix: rename socket_set_nonblock() to qemu_set_nonblock()Stefan Hajnoczi2013-04-021-1/+1
| | | | | | | | | | | | | | | | | | The fcntl(fd, F_SETFL, O_NONBLOCK) flag is not specific to sockets. Rename to qemu_set_nonblock() just like qemu_set_cloexec(). Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* | ui/gtk: Set QEMU window iconStefan Weil2013-04-021-0/+13
| | | | | | | | | | | | | | | | | | The QEMU icon which is already used for SDL is now also loaded by GTK. Signed-off-by: Stefan Weil <sw@weilnetz.de> Message-id: 1364653300-26813-1-git-send-email-sw@weilnetz.de Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | gtk: make more messages translatableAurelien Jarno2013-04-021-2/+2
|/ | | | | | | | Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Message-id: 1364836326-8707-2-git-send-email-aurelien@aurel32.net Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qemu-char: Rename qemu_chr_generic_open to qemu_chr_be_generic_openHans de Goede2013-03-272-2/+2
| | | | | | | | To better reflect that it is for handling a backend being opened. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Message-id: 1364292483-16564-3-git-send-email-hdegoede@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* gtk: Release modifier when graphic console loses keyboard focusJan Kiszka2013-03-251-2/+51
| | | | | | | | | This solves, e.g., sticky ALT when selecting a GTK menu, switching to a different window or selecting a different virtual console. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Message-id: 514F417A.6010908@web.de Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* ui/cocoa.m: Fix compile failures introduced by recent console changesPeter Maydell2013-03-191-3/+6
| | | | | | | | | Fix various compilation failures introduced by the recent console changes. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1363638501-29603-1-git-send-email-peter.maydell@linaro.org Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* console: remove ds_get_* helper functionsGerd Hoffmann2013-03-181-63/+79
| | | | | | | | | | | | | Switch the few remaining ds_get_* uses in console.c over to the new surface_* accessors. While doing so tripped over a few leftovers from commit a93a4a226a2afba147ba5df688b85d844f537c68 (code using depth == 0 as indicator for textmode rendering). Fixed them up. Finally dropped ds_get_* helper helpers. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* console: zap color_tableGerd Hoffmann2013-03-181-77/+6
| | | | | | | qemu_create_surface hands out 32bpp surfaces. So we can just use color_table_rgb directly. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* console: stop using DisplayState in gfx hardware emulationGerd Hoffmann2013-03-182-51/+53
| | | | | | | Use QemuConsole instead. Updates interfaces in console.[ch] and adapts gfx hardware emulation code. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* console: zap displaystate from dcl callbacksGerd Hoffmann2013-03-187-42/+20
| | | | | | | Now that nobody depends on DisplayState in DisplayChangeListener callbacks any more we can remove the parameter from all callbacks. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* cocoa: stop using DisplayStateGerd Hoffmann2013-03-181-25/+10
| | | | | | | Rework DisplayStateListener callbacks to not use the DisplayState any more. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
OpenPOWER on IntegriCloud