Statistics
| Branch: | Revision:

root / ui / gtk.c @ dccfcd0e

History | View | Annotate | Download (41.8 kB)

# Date Author Comment
dccfcd0e 04/15/2013 07:19 pm Paolo Bonzini

sysemu: avoid proliferation of include/ subdirectories

Signed-off-by: Paolo Bonzini <>

d819cdcc 04/02/2013 04:13 pm Stefan Weil

ui/gtk: Set QEMU window icon

The QEMU icon which is already used for SDL
is now also loaded by GTK.

Signed-off-by: Stefan Weil <>
Message-id:
Signed-off-by: Anthony Liguori <>

d8da9ee8 04/02/2013 04:13 pm Aurelien Jarno

gtk: make more messages translatable

Anthony Liguori <>
Signed-off-by: Aurelien Jarno <>
Reviewed-by: Anthony Liguori <>
Message-id:
Signed-off-by: Anthony Liguori <>

fee204fd 03/27/2013 05:26 pm Hans de Goede

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 <>
Message-id:
Signed-off-by: Anthony Liguori <>

6db253ca 03/25/2013 08:10 pm Jan Kiszka

gtk: Release modifier when graphic console loses keyboard focus

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 <>
Message-id: ...

bc2ed970 03/18/2013 11:21 am Gerd Hoffmann

console: zap displaystate from dcl callbacks

Now that nobody depends on DisplayState in DisplayChangeListener
callbacks any more we can remove the parameter from all callbacks.

Signed-off-by: Gerd Hoffmann <>

7c20b4a3 03/18/2013 11:21 am Gerd Hoffmann

console: fix displaychangelisteners interface

Split callbacks into separate Ops struct. Pass DisplayChangeListener
pointer as first argument to all callbacks. Uninline a bunch of
display functions and move them from console.h to console.c

Signed-off-by: Gerd Hoffmann <>

21ef45d7 03/18/2013 11:21 am Gerd Hoffmann

console: kill DisplayState->opaque

It's broken by design. There can be multiple DisplayChangeListener
instances, so they simply can't store state in the (single) DisplayState
struct. Try 'qemu -display gtk -vnc :0', watch it crash & burn.

With DisplayChangeListenerOps having a more sane interface now we can...

c12aeb86 03/18/2013 11:21 am Gerd Hoffmann

console: rework DisplaySurface handling [dcl/ui side]

Replace the dpy_gfx_resize and dpy_gfx_setdata DisplayChangeListener
callbacks with a dpy_gfx_switch callback which notifies the ui code
when the framebuffer backing storage changes.

Signed-off-by: Gerd Hoffmann <>

9d9801cf 03/18/2013 11:21 am Gerd Hoffmann

gtk: stop using DisplayState

Rework DisplayStateListener callbacks to not use the DisplayState
any more. Factor out the window size handling to a separate function,
so the zoom callbacks can call that directly instead of abusing the
gd_switch DisplayStateListener callback for that....

702ec69c 03/13/2013 11:27 am Gerd Hoffmann

chardev: add vc support to qapi

This patch adds 'vc' support to qapi and also switches over the
vc chardev initialization to the new qapi code path.

Signed-off-by: Gerd Hoffmann <>

ef6413a2 02/26/2013 09:29 pm Daniel P. Berrange

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 <>
Message-id: ...

bc0477c7 02/26/2013 09:29 pm Daniel P. Berrange

Add compat for GDK_KEY_XXX symbols

The GDK_KEY_XXX symbols are new in GTK3 and only the most
recent GTK2 releases. Most versions of GTK2 have simply
used GDK_XXX

Signed-off-by: Daniel P. Berrange <>
Message-id: ...

fe43bca8 02/26/2013 09:29 pm Daniel P. Berrange

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 will
pre-create the cairo drawing context & set the clip mask.
Since the drawing code is already structured in a nice way,...

530daf82 02/26/2013 09:29 pm Daniel P. Berrange

Replace gtk_menu_append with gtk_menu_shell_append

The gtk_menu_append method has long been deprecated in favour
of the gtk_menu_shell_append method. The former is now entirely
gone in GTK3, so switch all code to the latter which works on
both GTK2 and GTK3...

8906de76 02/26/2013 09:29 pm Daniel P. Berrange

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 GdkDevice
instead associated with the event being processed.

Signed-off-by: Daniel P. Berrange <>...

1ed76b59 02/26/2013 09:29 pm Daniel P. Berrange

Conditionalize use of gtk_widget_size_request

The gtk_widget_size_request method has been replaced by
the gtk_widget_get_preferred_size method in GTK3. Conditionally
call the new method in GTK3

Signed-off-by: Daniel P. Berrange <>
Message-id: ...

cba68834 02/26/2013 09:29 pm Daniel P. Berrange

Add compat for gdk_drawable_get_size on GTK3

GTK3 lacks the gdk_drawable_get_size method, so we create a
stub impl which gets the get_width/get_height mehtods instead

Signed-off-by: Daniel P. Berrange <>
Message-id: ...

66962f14 02/26/2013 09:29 pm Daniel P. Berrange

Remove use of gdk_drawable_get_{screen, display}

The gdk_drawable_get_screen and gdk_drawable_get_display
methods don't exist in GDK3. Fortunately, even on GTK2
they are not required - we can call the equivalent
gtk_widget_get_screen/gtk_widget_get_display methods...

655199da 02/26/2013 09:29 pm Daniel P. Berrange

Conditionalize use of gdk_keyboard_grab / gdk_keyboard_ungrab

On GTK3 there is support for multiple keyboard devices, so
rather than using gdk_keyboard_grab / gdk_keyboard_ungrab
we should iterate over all devices, grabbing each one in
turn

Signed-off-by: Daniel P. Berrange <>...

2a05485d 02/26/2013 09:29 pm Daniel P. Berrange

Conditionalize use of gdk_pointer_grab / gdk_pointer_ungrab

On GTK3 there is support for multiple pointer devices, so
rather than using gdk_pointer_grab / gdk_pointer_ungrab
we should iterate over all devices, grabbing each one in
turn

Signed-off-by: Daniel P. Berrange <>...

51572ab0 02/26/2013 09:29 pm Daniel P. Berrange

Remove use of GtkVBox in GTK3

The GtkVBox class is deprecated, in favour of just using the
GtkBox class directly. Eventually even GtkBox will be
deprecated in favour of GtkGrid, but that is a bigger fix
which can wait.

Signed-off-by: Daniel P. Berrange <>...

30e8f22b 02/22/2013 10:49 pm Jan Kiszka

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 nice
added-value for the GTK UI.

We use "pause" as the term for stopping the machine here. So reword also
the related caption tag....

10409282 02/22/2013 10:49 pm Stefan Weil

ui/gtk: Use menu item from stock for full screen

This reduces the required translations and gives a nicer menu
with 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....

28d2e5b2 02/22/2013 10:48 pm Stefan Weil

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 <>...

c95e3080 02/22/2013 10:48 pm Kevin Wolf

Reenable -Wstrict-prototypes

One part of this patch reverts commit 22bc9a46, which disabled the
warning. The rest of it deals with the warning by adding a #pragma for
newer gcc and by disabling -Werror for compilers that can't deal with
the #pragma.

Signed-off-by: Kevin Wolf <>...

3f58eade 02/22/2013 03:17 pm Stefan Weil

ui/gtk: Fix build (missing include for setlocale)

At least for Ubuntu Linux locale.h is needed.

Signed-off-by: Stefan Weil <>
Message-id:
Signed-off-by: Anthony Liguori <>

73d4dc71 02/22/2013 12:34 am Anthony Liguori

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 to
handle this generally speaking.

Signed-off-by: Anthony Liguori <>...

a4ccabcf 02/22/2013 12:34 am Anthony Liguori

ui: add basic GTK gui (v5)

This is minimalistic and just contains the basic widget infrastructure. The GUI
consists of a menu and a GtkNotebook. To start with, the notebook has its tabs
hidden which provides a UI that looks very similar to SDL with the exception of...

d861def3 02/22/2013 12:34 am Anthony Liguori

gtk: add virtual console support (v2)

This enables VteTerminal to be used to render the text consoles. VteTerminal is
the same widget used by gnome-terminal which means it's VT100 emulation is as
good as they come.

It's also screen reader accessible, supports copy/paste, proper scrolling and...

5104a1f6 02/22/2013 12:34 am Anthony Liguori

gtk: add support for input grabbing (v2)

There is a small deviation from SDL's behavior here. Instead of Ctrl+Alt
triggering grab, we now use Ctrl-Alt-g to trigger grab.

GTK will not accept Ctrl+Alt as an accelerator since it just consists of
modifiers. Having grab as a proper accelerator is important as it allows a user...

c6158483 02/22/2013 12:34 am Anthony Liguori

gtk: add support for screen scaling and full screen (v5)

Basic menu items to enter full screen mode and zoom in/out. Unlike SDL, we
don't allow arbitrary scaling based on window resizing. The current behavior
with SDL causes a lot of problems for me.

Sometimes I accidentally resize the window a tiny bit while trying to move it...

834574ea 02/22/2013 12:34 am Anthony Liguori

gtk: add translation support (v5)

This includes a de_DE translation from Kevin Wolf and an it translation from
Paolo Bonzini.

Cc: Paolo Bonzini <>
Cc: Kevin Wolf <>
Cc: Stefan Hajnoczi <>
Signed-off-by: Anthony Liguori <>...