Statistics
| Branch: | Revision:

root / ui @ f487b677

# Date Author Comment
43f420f8 06/28/2013 10:03 pm Gerd Hoffmann

console: Hook QemuConsoles into qom tree

Put them named "console[$index]" below "/backend", so you can
list & inspect them via QMP.

Signed-off-by: Gerd Hoffmann <>
Message-id:
Signed-off-by: Anthony Liguori <>

f0875536 06/28/2013 10:03 pm Gerd Hoffmann

gtk: add support for surface conversion

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

9fbbf0d1 06/24/2013 10:33 pm Anthony Liguori

Merge remote-tracking branch 'spice/spice.v71' into staging

  1. By Gerd Hoffmann (1) and Hans de Goede (1)
  2. Via Gerd Hoffmann
    • spice/spice.v71:
      spice: Add -spice disable-agent-file-transfer cmdline option (rhbz#961850)
      qxl: fix Coverity scan SIGN_EXTENSION error...
5ad24e5f 06/24/2013 09:23 am Hans de Goede

spice: Add -spice disable-agent-file-transfer cmdline option (rhbz#961850)

Signed-off-by: Hans de Goede <>
Signed-off-by: Gerd Hoffmann <>

2c8cf549 06/21/2013 09:52 pm Michael Tokarev

vnc: use booleans for vnc_connect, vnc_listen_read and vnc_display_add_client

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

030b4b7d 06/17/2013 04:00 am Stefan Weil

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

4efeabbb 06/14/2013 01:28 pm Michael Tokarev

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

787ba4f0 06/11/2013 10:45 pm Peter Wu

gtk: implement -full-screen

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

bd5c51ee 06/10/2013 07:38 pm Michael Roth

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

f7da9c17 06/10/2013 07:36 pm Anthony Liguori

gtk: use better icon

The current icon looks pretty terrible rendered in Gnome. This
switches to a transparent SVG which looks much nicer.

Signed-off-by: Anthony Liguori <>

17139240 06/04/2013 12:14 am Anthony Liguori

gtk: don't use g_object_unref on GdkCursor

It's not a GObject.

Cc: Gerd Hoffman <>
Reported-by: Michael Tokarev <>
Signed-off-by: Anthony Liguori <>
---
v1 -> v2
- Fix summary to agree with code (Peter)

41686a96 06/03/2013 11:36 pm Anthony Liguori

gtk: don't resize window when enabling scaling

Signed-off-by: Anthony Liguori <>

2ba9de6e 05/29/2013 02:28 am Peter Maydell

cocoa: Avoid deprecated NSOpenPanel beginSheetForDirectory

In MacOSX 10.6 and above the NSOpenPanel beginSheetForDirectory
method is deprecated. Use the preferred replacements instead.
We retain the original code for use on earlier MacOSX versions
because the replacement methods don't exist before 10.6....

8bb3f1e3 05/29/2013 02:24 am Peter Maydell

cocoa: Avoid deprecated NSOpenPanel filename method

Avoid the NSOpenPanel filename method (deprecated in MacOSX 10.6)
in favour of using the URL method and extracting the path from the
resulting NSUrl object.

Signed-off-by: Peter Maydell <>...

42a5dfe7 05/29/2013 02:23 am Peter Maydell

cocoa: Avoid deprecated CPS* functions

The functions CPSGetCurrentProcess and CPSEnableForegroundOperation
are deprecated in newer versions of MacOSX and cause warning messages
to be logged to the system log. Instead, use the new preferred method
of promoting our console process up to a graphical app with menubar...

6e657e64 05/29/2013 02:22 am Peter Maydell

cocoa: Fix leaks of NSScreen and NSConcreteMapTable

On MacOSX 10.8 QEMU provokes system log messages:
11/03/2013 17:03:29.998 qemu-system-arm42586: objc42586: Object
0x7ffbf9c2f3b0 of class NSScreen autoreleased with no pool in place - just
leaking - break on objc_autoreleaseNoPool() to debug...

b2d1674b 05/23/2013 04:58 pm Amos Kong

ui/input.c: replace magic numbers with macros

It's clearer to use defined macros than magic numbers.

Signed-off-by: Amos Kong <>
Reviewed-by: Lei Li <>
Signed-off-by: Luiz Capitulino <>

1483adcf 05/15/2013 04:48 pm Lei Li

vnc: Make ledstate comparison before modifiers updated

The ledstate should be compared before modifiers updated,
otherwise the ledstate would be the same as current_led_state.

Reported-by: Gerd Hoffmann <>
Signed-off-by: Lei Li <>...

7791dba3 05/14/2013 04:53 pm Paolo Bonzini

portability: pty.h is glibc-specific

This should fix building the GTK+ front-end on BSDs.

Signed-off-by: Paolo Bonzini <>
Message-id:
Signed-off-by: Anthony Liguori <>

b087143b 05/13/2013 05:52 pm Igor Mitsyanko

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 function
is marked as deprecated since GTK-3.0, and triggers warning (error with -Werror)...

0057a0d5 05/03/2013 08:04 pm Tim Hardeck

TLS support for VNC Websockets

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

ab99e5c1 04/29/2013 04:28 pm Lei Li

vnc: Support for LED state extension

Signed-off-by: Lei Li <>
Reviewed-by: Anthony Liguori <>
Message-id:
Signed-off-by: Anthony Liguori <>

e7b2aacc 04/29/2013 04:28 pm Lei Li

vnc: Adjust lock state sync logic with VNC_FEATURE_LED_STATE

Signed-off-by: Lei Li <>
Reviewed-by: Anthony Liguori <>
Message-id:
Signed-off-by: Anthony Liguori <>

96f3d174 04/29/2013 04:28 pm Lei Li

vnc: Add SCROLL lock key to kbd_leds

Signed-off-by: Lei Li <>
Reviewed-by: Anthony Liguori <>
Message-id:
Signed-off-by: Anthony Liguori <>

bf9b255f 04/26/2013 04:48 pm Anthony Liguori

gtk: refactor menu creation

Signed-off-by: Anthony Liguori <>

95be0669 04/25/2013 10:45 pm Gerd Hoffmann

console: qom-ify QemuConsole

Just the minimal bits to turn QemuConsoles into Objects.

Signed-off-by: Gerd Hoffmann <>

aa2beaa1 04/25/2013 10:45 pm Gerd Hoffmann

console: add device link to QemuConsoles

So it is possible to figure which qemu console displays which device.

Signed-off-by: Gerd Hoffmann <>

14a93649 04/25/2013 10:45 pm Gerd Hoffmann

console: add qemu_console_lookup_by_device

Look up the QemuConsole for a given device, using the new link.

Signed-off-by: Gerd Hoffmann <>

cdd5b937 04/25/2013 10:45 pm Gerd Hoffmann

console: switch ppm_save to qemu_open

... so it works with fdset.

Signed-off-by: Gerd Hoffmann <>

5209089f 04/25/2013 10:45 pm Gerd Hoffmann

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

d3002b04 04/25/2013 10:45 pm Gerd Hoffmann

console: add dummy surface for guests without graphic card

So users get a notification instead of a crash.

Signed-off-by: Gerd Hoffmann <>

72711efb 04/24/2013 07:50 pm Gerd Hoffmann

input: make QEMUPutLEDEntry + QEMUPutMouseEntry private

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

5a37532d 04/24/2013 07:50 pm Gerd Hoffmann

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

571253d4 04/23/2013 06:37 pm Ozan Çağlayan

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

d6394988 04/22/2013 04:04 pm Anthony Liguori

Merge remote-tracking branch 'luiz/queue/qmp' into staging

  1. By Amos Kong (1) and Luiz Capitulino (1)
  2. Via Luiz Capitulino
    • luiz/queue/qmp:
      virtio-balloon: fix integer overflow in BALLOON_CHANGE QMP event
      monitor: fix the wrong order of releasing keys...
68c0aa6e 04/21/2013 07:44 pm Peter Maydell

ui/cocoa.m: Fix recent compile breakage

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

153d02e3 04/19/2013 03:32 pm Amos Kong

monitor: fix the wrong order of releasing keys

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

e6f53fd5 04/17/2013 06:28 pm Markus Armbruster

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...]...
9697f5d2 04/16/2013 10:26 am Gerd Hoffmann

gtk: custom cursor support

Makes gtk ui play nicely with qxl (and vmware_svga)
as you can actually see your pointer now ;)

Signed-off-by: Gerd Hoffmann <>

dea1b0bd 04/16/2013 10:26 am Gerd Hoffmann

xen: re-enable refresh interval reporting for xenfb

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

81c0d5a6 04/16/2013 10:26 am Gerd Hoffmann

console: add qemu_console_is_*

Signed-off-by: Gerd Hoffmann <>

284d1c6b 04/16/2013 10:26 am Gerd Hoffmann

console: allow pinning displaychangelisteners to consoles

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

380cd056 04/16/2013 10:03 am Gerd Hoffmann

console: add GraphicHwOps

Pass a single GraphicHwOps struct pointer to graphic_console_init,
instead of a bunch of function pointers.

Signed-off-by: Gerd Hoffmann <>

0f7b2864 04/16/2013 10:03 am Gerd Hoffmann

console: gui timer fixes

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

1dbfa005 04/16/2013 10:03 am Gerd Hoffmann

console: rename vga_hw_*, add QemuConsole param

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

321f048d 04/16/2013 10:03 am Gerd Hoffmann

console: give each QemuConsole its own DisplaySurface

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

2c62f08d 04/16/2013 10:03 am Gerd Hoffmann

console: simplify screendump

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

36671fbd 04/16/2013 10:03 am Gerd Hoffmann

console: zap g_width + g_height

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

98a9ad90 04/16/2013 10:03 am Gerd Hoffmann

console: move gui_update+gui_setup_refresh from vl.c into console.c

Pure code motion, no functional changes.

Signed-off-by: Gerd Hoffmann <>

27be5587 04/16/2013 10:03 am Gerd Hoffmann

console: make DisplayState private to console.c

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

867c538f 04/16/2013 10:03 am Gerd Hoffmann

pixman: add qemu_pixman_color()

Helper function to map qemu colors (32bit integer + matching PixelFormat)
into pixman_color_t.

Signed-off-by: Gerd Hoffmann <>

b7627952 04/16/2013 10:03 am Gerd Hoffmann

pixman: render vgafont glyphs into pixman images

Add helper functions to create pixman mask images for glyphs
and to render these glyphs into a pixman image.

Signed-off-by: Gerd Hoffmann <>

68db6dc5 04/16/2013 10:03 am Gerd Hoffmann

console: use pixman for fill+blit

Zap homegrown pixel shuffeling code, use pixman calls instead.

Signed-off-by: Gerd Hoffmann <>

7d6ba01c 04/16/2013 10:03 am Gerd Hoffmann

console: use pixman for font rendering

Zap homegrown font rendering code, use pixman calls instead.

Signed-off-by: Gerd Hoffmann <>

e27bd65a 04/16/2013 10:03 am Gerd Hoffmann

console: switch color_table_rgb to pixman_color_t

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

437fe106 04/16/2013 10:03 am Gerd Hoffmann

console: add trace events

Signed-off-by: Gerd Hoffmann <>

64840c66 04/16/2013 10:03 am Gerd Hoffmann

console: displaystate init revamp

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

dccfcd0e 04/15/2013 07:19 pm Paolo Bonzini

sysemu: avoid proliferation of include/ subdirectories

Signed-off-by: Paolo Bonzini <>

162cbbd1 04/02/2013 10:07 pm Anthony Liguori

Merge remote-tracking branch 'luiz/queue/qmp' into staging

  1. By Stefan Hajnoczi
  2. 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...
f9e8cacc 04/02/2013 06:47 pm Stefan Hajnoczi

oslib-posix: rename socket_set_nonblock() to qemu_set_nonblock()

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 <>
Reviewed-by: Eric Blake <>...

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

8510d91e 03/19/2013 02:59 pm Peter Maydell

ui/cocoa.m: Fix compile failures introduced by recent console changes

Fix various compilation failures introduced by the recent console
changes.

Signed-off-by: Peter Maydell <>
Message-id: ...

8db9bae9 03/18/2013 11:21 am Gerd Hoffmann

sdl: stop using DisplayState

Rework DisplayStateListener callbacks to not use the DisplayState
any more.

Signed-off-by: Gerd Hoffmann <>

71874c17 03/18/2013 11:21 am Gerd Hoffmann

spice: stop using DisplayState

Rework DisplayStateListener callbacks to not use the DisplayState
any more.

Signed-off-by: Gerd Hoffmann <>

5e00d3ac 03/18/2013 11:21 am Gerd Hoffmann

cocoa: stop using DisplayState

Rework DisplayStateListener callbacks to not use the DisplayState
any more.

Signed-off-by: Gerd Hoffmann <>

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

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

console: stop using DisplayState in gfx hardware emulation

Use QemuConsole instead. Updates interfaces in console.[ch] and adapts
gfx hardware emulation code.

Signed-off-by: Gerd Hoffmann <>

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

console: zap color_table

qemu_create_surface hands out 32bpp surfaces.
So we can just use color_table_rgb directly.

Signed-off-by: Gerd Hoffmann <>

1562e531 03/18/2013 11:21 am Gerd Hoffmann

console: remove ds_get_* helper functions

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

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

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

spice: zap sdpy global

DisplayChangeListener is passed now to all DisplayChangeListenerOps
callbacks, so we can use that to access the spice display state and
kill the sdpy global variable.

Signed-off-by: Gerd Hoffmann <>

468dfd6d 03/18/2013 11:21 am Gerd Hoffmann

sdl: drop dead code

DisplayAllocator removal (commit
187cd1d9f30d13f0d0ef682e4d91cfa3e4cbd472) made this a nop.

Signed-off-by: Gerd Hoffmann <>

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

console: rework DisplaySurface handling [vga emu side]

Decouple DisplaySurface allocation & deallocation from DisplayState.
Replace dpy_gfx_resize + dpy_gfx_setdata with a dpy_gfx_replace_surface
function.

This handles the graphic hardware emulation.

Signed-off-by: Gerd Hoffmann <>

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

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

vnc: stop using DisplayState

Rework DisplayStateListener callbacks to not use the DisplayState
any more.

Signed-off-by: Gerd Hoffmann <>

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

01f45d98 03/08/2013 09:57 pm Anthony Liguori

qemu-char: move text console init to console.c

Signed-off-by: Anthony Liguori <>
Signed-off-by: Amit Shah <>
Message-id:
Signed-off-by: Anthony Liguori <>

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

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

Ensure x_keymap.o is built when GTK is enabled

The x_keymap.o file is required by both GTK and SDL builds,
so it must be explicitly listed as a GTK dep to ensure the
linker works when SDL is disabled

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

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