History | View | Annotate | Download (45.2 kB)
gtk: add support for surface conversion
Also use CAIRO_FORMAT_RGB24 unconditionally. DisplaySurfaces will neverever see 8bpp surfaces. And using CAIRO_FORMAT_RGB16_565 for the 16bppcase doesn't seem to be a good idea too.
<quote src="/usr/include/cairo/cairo.h">...
gtk: Fix compiler warning (GTK 3 deprecated function)
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]...
create qemu_openpty_raw() helper function and move it to a separate file
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...
gtk: implement -full-screen
Aiming for GTK as replacement for SDL, a feature like -full-screen should alsobe 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...
qemu-char: don't issue CHR_EVENT_OPEN in a BH
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...
gtk: use better icon
The current icon looks pretty terrible rendered in Gnome. Thisswitches 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 GdkCursor
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 scaling
portability: pty.h is glibc-specific
This should fix building the GTK+ front-end on BSDs.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Message-id: 1368533121-30796-1-git-send-email-pbonzini@redhat.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
ui/gtk.c: do not use gdk_display_warp_pointer when GTK ver >3.0
Commit 9697f5d2d38e5dd1e64e8e0d64436e6d44e7b1fe "gtk: custom cursor support" introduced unconditional usage of gdk_display_warp_pointer(). This functionis marked as deprecated since GTK-3.0, and triggers warning (error with -Werror)...
gtk: refactor menu creation
console: zap ds arg from register_displaychangelistener
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>
ui/gtk: Use gtk_widget_get_window() to support both gtk2 and gtk3
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.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
Fix warnings suppressors to honor --disable-werror
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...]...
gtk: custom cursor support
Makes gtk ui play nicely with qxl (and vmware_svga)as you can actually see your pointer now ;)
console: allow pinning displaychangelisteners to consoles
DisplayChangeListener gets a new QemuConsole field, which can be set tonon-NULL before registering. This will pin the QemuConsole, so thatparticular DisplayChangeListener will not follow console switches....
console: rename vga_hw_*, add QemuConsole param
Add QemuConsole parameter to vga_hw_*, so the interface allows to updatenon-active consoles (the actual code can't handle this yet, see nextpatch). Passing NULL is allowed and updates the active console, like...
sysemu: avoid proliferation of include/ subdirectories
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
ui/gtk: Set QEMU window icon
The QEMU icon which is already used for SDLis now also loaded by GTK.
Signed-off-by: Stefan Weil <sw@weilnetz.de>Message-id: 1364653300-26813-1-git-send-email-sw@weilnetz.deSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
gtk: make more messages translatable
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.netSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
qemu-char: Rename qemu_chr_generic_open to qemu_chr_be_generic_open
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.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
gtk: Release modifier when graphic console loses keyboard focus
This solves, e.g., sticky ALT when selecting a GTK menu, switching to adifferent window or selecting a different virtual console.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Message-id: 514F417A.6010908@web.de...
console: zap displaystate from dcl callbacks
Now that nobody depends on DisplayState in DisplayChangeListenercallbacks any more we can remove the parameter from all callbacks.
console: fix displaychangelisteners interface
Split callbacks into separate Ops struct. Pass DisplayChangeListenerpointer as first argument to all callbacks. Uninline a bunch ofdisplay functions and move them from console.h to console.c
console: kill DisplayState->opaque
It's broken by design. There can be multiple DisplayChangeListenerinstances, so they simply can't store state in the (single) DisplayStatestruct. Try 'qemu -display gtk -vnc :0', watch it crash & burn.
With DisplayChangeListenerOps having a more sane interface now we can...
console: rework DisplaySurface handling [dcl/ui side]
Replace the dpy_gfx_resize and dpy_gfx_setdata DisplayChangeListenercallbacks with a dpy_gfx_switch callback which notifies the ui codewhen the framebuffer backing storage changes.
gtk: stop using DisplayState
Rework DisplayStateListener callbacks to not use the DisplayStateany more. Factor out the window size handling to a separate function,so the zoom callbacks can call that directly instead of abusing thegd_switch DisplayStateListener callback for that....
chardev: add vc support to qapi
This patch adds 'vc' support to qapi and also switches over thevc chardev initialization to the new qapi code path.
Add compat macro for gtk_widget_get_realized
The gtk_widget_get_realized method only arrived in GTK 2.20,so defined a compat macro for earlier GTK
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>Message-id: 1361805646-6425-13-git-send-email-berrange@redhat.com...
Add compat for GDK_KEY_XXX symbols
The GDK_KEY_XXX symbols are new in GTK3 and only the mostrecent GTK2 releases. Most versions of GTK2 have simplyused GDK_XXX
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>Message-id: 1361805646-6425-14-git-send-email-berrange@redhat.com...
Replace expose-event handler with draw handler in GTK3
In GTK3 the 'expose-event' signal has been replaced by a new'draw' signal. The only difference is that the latter willpre-create the cairo drawing context & set the clip mask.Since the drawing code is already structured in a nice way,...
Replace gtk_menu_append with gtk_menu_shell_append
The gtk_menu_append method has long been deprecated in favourof the gtk_menu_shell_append method. The former is now entirelygone in GTK3, so switch all code to the latter which works onboth GTK2 and GTK3...
Conditionalize use of gdk_display_warp_pointer
In GTK3 the gdk_display_warp_pointer method is deprecated.Instead we should use gdk_device_warp on the GdkDeviceinstead associated with the event being processed.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>...
Conditionalize use of gtk_widget_size_request
The gtk_widget_size_request method has been replaced bythe gtk_widget_get_preferred_size method in GTK3. Conditionallycall the new method in GTK3
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>Message-id: 1361805646-6425-9-git-send-email-berrange@redhat.com...
Add compat for gdk_drawable_get_size on GTK3
GTK3 lacks the gdk_drawable_get_size method, so we create astub impl which gets the get_width/get_height mehtods instead
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>Message-id: 1361805646-6425-2-git-send-email-berrange@redhat.com...
Remove use of gdk_drawable_get_{screen, display}
The gdk_drawable_get_screen and gdk_drawable_get_displaymethods don't exist in GDK3. Fortunately, even on GTK2they are not required - we can call the equivalentgtk_widget_get_screen/gtk_widget_get_display methods...
Conditionalize use of gdk_keyboard_grab / gdk_keyboard_ungrab
On GTK3 there is support for multiple keyboard devices, sorather than using gdk_keyboard_grab / gdk_keyboard_ungrabwe should iterate over all devices, grabbing each one inturn
Conditionalize use of gdk_pointer_grab / gdk_pointer_ungrab
On GTK3 there is support for multiple pointer devices, sorather than using gdk_pointer_grab / gdk_pointer_ungrabwe should iterate over all devices, grabbing each one inturn
Remove use of GtkVBox in GTK3
The GtkVBox class is deprecated, in favour of just using theGtkBox class directly. Eventually even GtkBox will bedeprecated in favour of GtkGrid, but that is a bigger fixwhich can wait.
gtk: Rename File to Machine menu and add pause, reset and power down items
This adds basic guest control commands to the "Machine" menu - a niceadded-value for the GTK UI.
We use "pause" as the term for stopping the machine here. So reword alsothe related caption tag....
ui/gtk: Use menu item from stock for full screen
This reduces the required translations and gives a nicer menuwith an icon.
The full screen menu item is no longer a check menu item.A checked item is not visible in full screen mode,so it is not needed for this special menu item....
ui/gtk: Support versions of VTE before 0.26
This is needed for current Debian stable (Squeeze).
VTE versions before 0.26 did not support VtePty.
Lower the version requirement and use alternate code which works for Debian.
Signed-off-by: Stefan Weil <sw@weilnetz.de>...
Reenable -Wstrict-prototypes
One part of this patch reverts commit 22bc9a46, which disabled thewarning. The rest of it deals with the warning by adding a #pragma fornewer gcc and by disabling -Werror for compilers that can't deal withthe #pragma.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>...
ui/gtk: Fix build (missing include for setlocale)
At least for Ubuntu Linux locale.h is needed.
Signed-off-by: Stefan Weil <sw@weilnetz.de>Message-id: 1361514481-26164-1-git-send-email-sw@weilnetz.deSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
gtk: suppress accelerators from the File menu when grab is active
If you're full screen, you probably expect Ctrl-Q to go to the guest,not the host. I think restricting certain menus is the right way tohandle this generally speaking.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>...
ui: add basic GTK gui (v5)
This is minimalistic and just contains the basic widget infrastructure. The GUIconsists of a menu and a GtkNotebook. To start with, the notebook has its tabshidden which provides a UI that looks very similar to SDL with the exception of...
gtk: add virtual console support (v2)
This enables VteTerminal to be used to render the text consoles. VteTerminal isthe same widget used by gnome-terminal which means it's VT100 emulation is asgood as they come.
It's also screen reader accessible, supports copy/paste, proper scrolling and...
gtk: add support for input grabbing (v2)
There is a small deviation from SDL's behavior here. Instead of Ctrl+Alttriggering grab, we now use Ctrl-Alt-g to trigger grab.
GTK will not accept Ctrl+Alt as an accelerator since it just consists ofmodifiers. Having grab as a proper accelerator is important as it allows a user...
gtk: add support for screen scaling and full screen (v5)
Basic menu items to enter full screen mode and zoom in/out. Unlike SDL, wedon't allow arbitrary scaling based on window resizing. The current behaviorwith SDL causes a lot of problems for me.
Sometimes I accidentally resize the window a tiny bit while trying to move it...
gtk: add translation support (v5)
This includes a de_DE translation from Kevin Wolf and an it translation fromPaolo Bonzini.
Cc: Paolo Bonzini <pbonzini@redhat.com>Cc: Kevin Wolf <kwolf@redhat.com>Cc: Stefan Hajnoczi <stefanha@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>...