summaryrefslogtreecommitdiffstats
path: root/ui
Commit message (Collapse)AuthorAgeFilesLines
* gtk: Support keyboard translation for hosts running WindowsStefan Weil2014-01-201-3/+15
| | | | | | | GTK uses different hardware keycodes on Windows hosts, so some special handling is needed to get the QEMU keycode. Signed-off-by: Stefan Weil <sw@weilnetz.de>
* ui/cocoa: Remove stray tabsPeter Maydell2014-01-121-3/+3
| | | | | | | | The ui/cocoa.m file has just three lines with hardcoded tabs; fix them. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Stefan Weil <sw@weilnetz.de> Message-id: 1387886052-27067-1-git-send-email-peter.maydell@linaro.org
* ui/cocoa: Draw black rectangle if we have no data yetPeter Maydell2014-01-121-1/+6
| | | | | | | | | | If our redraw method is called before we have any data from the guest, then draw a black rectangle rather than leaving the window empty. This mostly only matters when the guest machine has no framebuffer device, but it is more in line with the behaviour of other QEMU UIs. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1387853507-26298-3-git-send-email-peter.maydell@linaro.org
* ui/cocoa: Redraw at correct size when switching surfacePeter Maydell2014-01-121-7/+17
| | | | | | | | | | | | | | | | | | | | | If the surface switch involved a resize, we were doing the redraw at the old size rather than the new, because the update of screen.width and screen.height was being done after the setFrame method calls which triggered a redraw. Normally this isn't very noticeable because typically after the guest triggers the window resize it also draws something to it, which will in turn cause us to redraw. However, the combination of a guest which never draws to the display and a command line setting of a screen size larger than the default can reveal odd effects. Move most of the handling of resizes to the top of the method, and guard it with a check that the surface size actually changed, to avoid unnecessary operations (including some user visible ones like "recenter the window on the screen") if the surface is the same size as the old one. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1387853507-26298-2-git-send-email-peter.maydell@linaro.org
* ui/cocoa: Fix code for starting QEMU via image file load dialogPeter Maydell2014-01-121-6/+6
| | | | | | | | | | | | | | | | Fix a number of bugs in the code for starting QEMU via the image file load dialog: * use the actual argv[0] rather than "qemu": this avoids failures to find BIOS image files caused by not looking in the correct directory relative to the executable path * allocate a large enough argv array to NULL terminate it * use g_strdup(X) rather than g_strdup_printf("%s", X) or g_strdup_printf(X) * disable the printing of the simulated command line argument (which is presumably intended for debug only) Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1386543546-31919-6-git-send-email-peter.maydell@linaro.org
* ui/cocoa: Add ".qcow2" to extension list for image load dialogPeter Maydell2014-01-121-1/+1
| | | | | | | | | Add ".qcow2" to the list of file extensions which are accepted by the initial disk image load dialog which is displayed if the user runs QEMU without any command line arguments. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1386543546-31919-5-git-send-email-peter.maydell@linaro.org
* ui/cocoa: Send warning message to stderr, not stdoutPeter Maydell2014-01-121-1/+1
| | | | | | | | Bring a warning message into line with the others in this file by sending it to stderr, not stdout. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1386543546-31919-4-git-send-email-peter.maydell@linaro.org
* ui/cocoa: Correct typos in comments and variable namesPeter Maydell2014-01-121-14/+14
| | | | | | | | Fix various non-user-visible typos in comments and variable names. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Stefan Weil <sw@weilnetz.de> Message-id: 1386543546-31919-3-git-send-email-peter.maydell@linaro.org
* ui/cocoa: Pass command key through to guest when VM has mousegrabPeter Maydell2014-01-121-7/+18
| | | | | | | | | | | | | | | | The guest might want to be able to use the command key for its won purposes (as command if it is MacOS X, or for the Windows key if it is a PC guest, for instance). In line with other UI frontends, pass it through if the guest has mousegrab, and only use it for UI menu accelerators if not grabbed. Thanks to John Arbuckle for reporting this problem, helping us work through what the best solution would be and providing a patch which was the initial inspiration for this one. Reported-by: John Arbuckle <programmingkidx@gmail.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1386543546-31919-2-git-send-email-peter.maydell@linaro.org
* ui/cocoa: Use macro ARRAY_SIZE where possibleStefan Weil2013-12-231-3/+2
| | | | | | | | | | This improves readability and simplifies the code. Cc: Andreas Färber <andreas.faerber@web.de> Cc: Anthony Liguori <aliguori@amazon.com> Signed-off-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* spice: move spice_server_vm_{start,stop} calls into qemu_spice_display_*()Gerd Hoffmann2013-12-161-2/+2
| | | | | | | So calling spice server to start/stop the worker goes hand in hand with the status variable update. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* spice: move qemu_spice_display_*() from spice-graphics to spice-coreGerd Hoffmann2013-12-162-17/+16
| | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* spice: flip streaming video mode to off by defaultGerd Hoffmann2013-12-161-0/+2
| | | | | | | | | | | | | Video streaming detection heuristics in spice-server have problems keeping modern desktop animations (as done by gnome shell) and real video playback apart. This leads to jpeg compression artefacts on your desktop, due to spice using mjpeg to send what it thinks is a video stream. Turn off video detection by default to avoid these artifacts. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Alon Levy <alevy@redhat.com>
* Don't crash on keyboard input with no handlerDon Koch2013-12-021-1/+1
| | | | | | | | | | Prevent a call to put_kbd if null. On shutdown of some OSes, the keyboard handler goes away before the system is down. If a key is typed during this window, qemu crashes. Signed-off-by: Don Koch <dkoch@verizon.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* misc: Replace 'struct QEMUTimer' by 'QEMUTimer'Stefan Weil2013-12-021-1/+1
| | | | | | | | Most code already used QEMUTimer without the redundant 'struct' keyword. Signed-off-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* gtk: Replace conditional debug messages by trace methodsStefan Weil2013-12-021-14/+5
| | | | | Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* console: Replace conditional debug messages by trace methodsStefan Weil2013-12-021-8/+3
| | | | | | Signed-off-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* trace: Remove trace.h from console.h (less dependencies)Stefan Weil2013-12-021-0/+1
| | | | | | | | This reduces the dependencies on trace.h. Only two source files which need console.h also need trace.h. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* curses: fixup SIGWINCH handler messGerd Hoffmann2013-11-251-16/+28
| | | | | | | | | | | Don't run code in the signal handler, only set a flag. Use sigaction(2) to avoid non-portable signal(2) semantics. Make #ifdefs less messy. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Message-id: 1385130903-20531-1-git-send-email-kraxel@redhat.com Signed-off-by: Anthony Liguori <aliguori@amazon.com>
* console: Remove unused debug codeStefan Weil2013-11-131-33/+0
| | | | | | | | | The local function console_print_text_attributes is no longer used since commit 7d6ba01c3741bc32ae252bf64a5fd3f930c2df4f. Signed-off-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* qemu-char: add missing characters used in keymapsJan Krupa2013-11-131-0/+365
| | | | | | | | | | | | | | | | | | | | | | | | This patch adds all missing characters used in regional keymap files which already exist in QEMU. I checked for the missing characters by going through all of the keymaps and matching that with records in vnc_keysym.h. If the key wasn't found I looked it up in libxkbcommon library [1]. If I understood it correctly this is also the same place where most of the keymaps were exported from according to the comment on the first line in those files. I was able to find all symbols except "quotebl" used in Netherland keymap. I tested this update with Czech keyboard by myself. I also asked Matej Serc to test Slovenian keyboard layout - he reported problems with it few days ago on this mailing list. Both layouts seems to work fine. I wasn't able to test the remaining layouts but since this change doesn't modify any existing symbols, just adds new ones, I don't expect any sideeffects. [1] http://cgit.freedesktop.org/xorg/lib/libxkbcommon Signed-off-by: Jan Krupa <jkrupa@suse.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* qemu-char: add support for U-prefixed symbolsJan Krupa2013-11-131-0/+6
| | | | | | | | | | | | This patch adds support for Unicode symbols in keymap files. This feature was already used in some keyboard layouts in QEMU generated from XKB (e.g. Arabic) but it wasn't implemented in QEMU source code. There is no need for check of validity of the hex string after U character because strtol returns 0 in case the conversion was unsuccessful. Signed-off-by: Jan Krupa <jkrupa@suse.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* qemu-char: add Czech characters to VNC keysymsJan Krupa2013-11-131-0/+8
| | | | | | | This patch adds missing Czech characters to the VNC keysym table. Signed-off-by: Jan Krupa <jkrupa@suse.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* sdl: Reverse support for video mode settingLei Li2013-11-061-4/+19
| | | | | | | | | | | | | Currently, If the setting of video mode failed, qemu will exit. It should go back to the previous setting if the new screen resolution failed. This patch fixes LP#1216368, add support to revert to existing surface for the failure of video mode setting. Reported-by: Sascha Krissler <sascha@srlabs.de> Signed-off-by: Lei Li <lilei@linux.vnet.ibm.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Message-id: 1378285636-7091-1-git-send-email-lilei@linux.vnet.ibm.com Signed-off-by: Anthony Liguori <aliguori@amazon.com>
* misc: Spelling and grammar fixes in commentsStefan Weil2013-10-261-1/+1
| | | | | | | | | | * it's -> its * grammar fix in ui/vnc-enc-zywrle.h Signed-off-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: Don Koch <dkoch@verizon.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* Merge remote-tracking branch 'bonzini/configure' into stagingAnthony Liguori2013-10-181-2/+0
|\ | | | | | | | | | | | | | | | | | | | | # By Peter Maydell (3) and Ákos Kovács (2) # Via Paolo Bonzini * bonzini/configure: ui/Makefile.objs: delete unnecessary cocoa.o dependency default-configs/: CONFIG_GDBSTUB_XML removed Makefile.target: CONFIG_NO_* variables removed rules.mak: New string testing functions rules.mak: New logical functions for handling y/n values
| * ui/Makefile.objs: delete unnecessary cocoa.o dependencyPeter Maydell2013-10-161-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Delete an unnecessary dependency for cocoa.o; we already have a general rule that tells Make that we can build a .o file from a .m source using an ObjC compiler, so this specific rule is unnecessary. Further, it is using the dubious construct "$(SRC_PATH)/$(obj)" to get at the source directory, which will break when $(obj) is redefined as part of the preparation for per-object library support. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* | spice: fix multihead supportGerd Hoffmann2013-10-172-7/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes spice display initialization to handle multihead properly. spice-core now keeps track of which QemuConsole has a spice display channel attached to it and which has not. It also manages display channel ids. spice-display looks at all QemuConsoles and will pick up any graphic console not yet bound to a spice channel (which in practice are all non-qxl graphic devices). Result is that (a) you'll get a spice client window for each graphical device now (first only without this patch), and (b) mixing qxl and non-qxl vga cards works properly. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | spice-display: add display channel id to the debug messages.Gerd Hoffmann2013-10-171-13/+14
| | | | | | | | | | | | And s/__FUNCTION__/__func__/ while being at it. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | Fix VNC SASL authentication when using a QXL deviceChristophe Fergeau2013-10-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ui/vnc.c:vnc_display_open() and spice-server/server/reds.c:do_spice_init() are both calling sasl_server_init(). If spice_server_set_sasl_appname() hasn't been called, spice-server will call it with "spice" as an appname, causing cyrus-sasl to try to use a /etc/sasl2/spice.conf config file rather than the /etc/sasl2/qemu.conf file that QEMU uses. When using -spice sasl on the command line, QEMU properly calls spice_server_set_sasl_appname() to set the SASL appname as "qemu", but when using a QXL device without using SPICE, spice_server_init() is called from qemu_spice_add_interface() without setting the appname to "qemu", which then causes the VNC code to try to use spice.conf instead of qemu.conf. Signed-off-by: Christophe Fergeau <cfergeau@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | spice: replace use of deprecated APIMarc-André Lureau2013-10-172-13/+12
|/ | | | | | hose API are deprecated since 0.11, and qemu depends on 0.12 already. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* spice-core: Use g_strdup_printf instead of snprintfChristophe Fergeau2013-09-101-14/+14
| | | | | | | | Several places in spice-core.c were using either g_malloc+snprintf or snprintf+g_strdup to achieve the same result as g_strdup_printf. Signed-off-by: Christophe Fergeau <cfergeau@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* gtk: Remove unused include statements which are not portableStefan Weil2013-08-271-4/+0
| | | | | | | These include files don't exist for MinGW and are not needed for Linux (and hopefully for other hosts as well), so remove them. Signed-off-by: Stefan Weil <sw@weilnetz.de>
* aio / timers: Switch entire codebase to the new timer APIAlex Bligh2013-08-223-23/+23
| | | | | | | | | | | 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>
* aio / timers: Untangle include filesAlex Bligh2013-08-223-1/+3
| | | | | | | | | | include/qemu/timer.h has no need to include main-loop.h and doing so causes an issue for the next patch. Unfortunately various files assume including timers.h will pull in main-loop.h. Untangle this mess. Signed-off-by: Alex Bligh <alex@alex.org.uk> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* spice: fix display initializationGerd Hoffmann2013-07-301-0/+5
| | | | | | | | | | | | | | | Spice has two display interface implementations: One integrated into the qxl graphics card, and one generic which can operate with every qemu-emulated graphics card. The generic one is activated in case spice is used without qxl. The logic for that only caught the "-vga qxl" case, "-device qxl-vga" goes unnoticed. Fix that by adding a check in the spice interface registration so we'll notice the qxl card no matter how it is created. https://bugzilla.redhat.com/show_bug.cgi?id=981094 Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* migration: fix spice migrationStefan Hajnoczi2013-07-291-1/+1
| | | | | | | | | | | | | | | | | Commit 29ae8a4133082e16970c9d4be09f4b6a15034617 ("rdma: introduce MIG_STATE_NONE and change MIG_STATE_SETUP state transition") changed the state transitions during migration setup. Spice used to be notified with MIG_STATE_ACTIVE and it detected this using migration_is_active(). Spice is now notified with MIG_STATE_SETUP and migration_is_active() no longer works. Replace migration_is_active() with migration_in_setup() to fix spice migration. Cc: Michael R. Hines <mrhines@us.ibm.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* gtk: Fix accelerator filteringJan Kiszka2013-07-221-21/+18
| | | | | | | | | | | | | | This is in fact very simply: When the input in grabbed, everything should be exclusively passed to the guest - except it has our magic CTRL-ALT modifier set. Then let GTK filter out those accels that are in use. When checking the modifier state, we just need to filter out NUM and CAPS lock. Note: Filtering based on hard-coded modifiers breaks overriding accelerators. Needs to be fixed at a later point. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* console: Hook QemuConsoles into qom treeGerd Hoffmann2013-06-281-0/+10
| | | | | | | | | Put them named "console[$index]" below "/backend", so you can list & inspect them via QMP. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 1372150171-8707-1-git-send-email-kraxel@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* gtk: add support for surface conversionGerd Hoffmann2013-06-281-23/+40
| | | | | | | | | | | | | | | | Also use CAIRO_FORMAT_RGB24 unconditionally. DisplaySurfaces will never ever see 8bpp surfaces. And using CAIRO_FORMAT_RGB16_565 for the 16bpp case doesn't seem to be a good idea too. <quote src="/usr/include/cairo/cairo.h"> * @CAIRO_FORMAT_RGB16_565: This format value is deprecated. It has * never been properly implemented in cairo and should not be used * by applications. (since 1.2) </quote> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 1372150134-8590-1-git-send-email-kraxel@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Merge remote-tracking branch 'spice/spice.v71' into stagingAnthony Liguori2013-06-241-0/+13
|\ | | | | | | | | | | | | | | | | | | | | # By Gerd Hoffmann (1) and Hans de Goede (1) # Via Gerd Hoffmann * spice/spice.v71: spice: Add -spice disable-agent-file-transfer cmdline option (rhbz#961850) qxl: fix Coverity scan SIGN_EXTENSION error Message-id: 1372060666-18182-1-git-send-email-kraxel@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
| * spice: Add -spice disable-agent-file-transfer cmdline option (rhbz#961850)Hans de Goede2013-06-241-0/+13
| | | | | | | | | | Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | vnc: use booleans for vnc_connect, vnc_listen_read and vnc_display_add_clientMichael Tokarev2013-06-211-7/+8
|/ | | | | | | | | | Some arguments to these functions are booleans - either by declaration, or by actual usage, but sometimes value of 0 or 1 is passed for a bool, and sometimes it is declared as int but a bool value, or true/false, is passed to it instead. Clean it up a bit. Cc: liguang <lig.fnst@cn.fujitsu.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* gtk: Fix compiler warning (GTK 3 deprecated function)Stefan Weil2013-06-161-0/+4
| | | | | | | | | | | | | | With GTK 3, the function gdk_cursor_unref is deprecated: qemu/ui/gtk.c: In function ‘gd_cursor_define’: qemu/ui/gtk.c:380:5: error: ‘gdk_cursor_unref’ is deprecated (declared at /usr/include/gtk-3.0/gdk/gdkcursor.h:233): Use 'g_object_unref' instead [-Werror=deprecated-declarations] Fix the gcc compiler warning by using conditional compilation. Signed-off-by: Stefan Weil <sw@weilnetz.de> Message-id: 1371391987-10795-1-git-send-email-sw@weilnetz.de Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* create qemu_openpty_raw() helper function and move it to a separate fileMichael Tokarev2013-06-141-9/+3
| | | | | | | | | | | | | | | | | | | | | | | | | In two places qemu uses openpty() which is very system-dependent, and in both places the pty is switched to raw mode as well. Make a wrapper function which does both steps, and move all the system-dependent complexity into a separate file, together with static/local implementations of openpty() and cfmakeraw() from qemu-char.c. It is in a separate file, not part of oslib-posix.c, because openpty() often resides in -lutil which is not linked to every program qemu builds. This change removes #including of <pty.h>, <termios.h> and other rather specific system headers out of qemu-common.h, which isn't a place for such specific headers really. This version has been verified to build correctly on Linux, OpenBSD, FreeBSD and OpenIndiana. On the latter it lets qemu to be built with gtk gui which were not possible there due to missing openpty() and cfmakeraw(). Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> Tested-by: Andreas Färber <andreas.faerber@web.de>
* gtk: implement -full-screenPeter Wu2013-06-111-1/+5
| | | | | | | | | | | | | | | | Aiming for GTK as replacement for SDL, a feature like -full-screen should also be implemented. Bringing the window into full-screen mode is done by activating the "Fullscreen" menu item. This is done after showing the windows to make the cursor and menu hidden. v2: drop -no-frame implementation, use booleans instead of ints and ensure consistency between ui state and menu. Signed-off-by: Peter Wu <lekensteyn@gmail.com> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* qemu-char: don't issue CHR_EVENT_OPEN in a BHMichael Roth2013-06-102-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When CHR_EVENT_OPENED was initially added, it was CHR_EVENT_RESET, and it was issued as a bottom-half: 86e94dea5b740dad65446c857f6959eae43e0ba6 Which we basically used to print out a greeting/prompt for the monitor. AFAICT the only reason this was ever done in a BH was because in some cases we'd modify the chr_write handler for a new chardev backend *after* the site where we issued the reset (see: 86e94d:qemu_chr_open_stdio()) At some point this event was renamed to CHR_EVENT_OPENED, and we've maintained the use of this BH ever since. However, due to 9f939df955a4152aad69a19a77e0898631bb2c18, we schedule the BH via g_idle_add(), which is causing events to sometimes be delivered after we've already begun processing data from backends, leading to: known bugs: QMP: session negotation resets with OPENED event, in some cases this is causing new sessions to get sporadically reset potential bugs: hw/usb/redirect.c: can_read handler checks for dev->parser != NULL, which may be true if CLOSED BH has not been executed yet. In the past, OPENED quiesced outstanding CLOSED events prior to us reading client data. If it's delayed, our check may allow reads to occur even though we haven't processed the OPENED event yet, and when we do finally get the OPENED event, our state may get reset. qtest.c: can begin session before OPENED event is processed, leading to a spurious reset of the system and irq_levels gdbstub.c: may start a gdb session prior to the machine being paused To fix these, let's just drop the BH. Since the initial reasoning for using it still applies to an extent, work around that by deferring the delivery of CHR_EVENT_OPENED until after the chardevs have been fully initialized, toward the end of qmp_chardev_add() (or some cases, qemu_chr_new_from_opts()). This defers delivery long enough that we can be assured a CharDriverState is fully initialized before CHR_EVENT_OPENED is sent. Also, rather than requiring each chardev to do an explicit open, do it automatically, and allow the small few who don't desire such behavior to suppress the OPENED-on-init behavior by setting a 'explicit_be_open' flag. We additionally add missing OPENED events for stdio backends on w32, which were previously not being issued, causing us to not recieve the banner and initial prompts for qmp/hmp. Reported-by: Stefan Priebe <s.priebe@profihost.ag> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Message-id: 1370636393-21044-1-git-send-email-mdroth@linux.vnet.ibm.com Cc: qemu-stable@nongnu.org Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* gtk: use better iconAnthony Liguori2013-06-101-1/+1
| | | | | | | The current icon looks pretty terrible rendered in Gnome. This switches to a transparent SVG which looks much nicer. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* gtk: don't use g_object_unref on GdkCursorAnthony Liguori2013-06-031-1/+1
| | | | | | | | | | | It's not a GObject. Cc: Gerd Hoffman <kraxel@redhat.com> Reported-by: Michael Tokarev <mjt@tls.msk.ru> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> --- v1 -> v2 - Fix summary to agree with code (Peter)
* gtk: don't resize window when enabling scalingAnthony Liguori2013-06-031-1/+3
| | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
OpenPOWER on IntegriCloud