summaryrefslogtreecommitdiffstats
path: root/ui/gtk-egl.c
diff options
context:
space:
mode:
authorPeter Maydell2018-10-12 18:24:23 +0200
committerPeter Maydell2018-10-12 18:24:23 +0200
commit046936ed7179cfa413dfb2668b03d7e684bb7dbd (patch)
tree48e7b42ee75bd201de31a7ab455455f9cee3c8f2 /ui/gtk-egl.c
parentMerge remote-tracking branch 'remotes/kraxel/tags/ui-20181012-pull-request' i... (diff)
parentui: increase min required GTK3 version to 3.14.0 (diff)
downloadqemu-046936ed7179cfa413dfb2668b03d7e684bb7dbd.tar.gz
qemu-046936ed7179cfa413dfb2668b03d7e684bb7dbd.tar.xz
qemu-046936ed7179cfa413dfb2668b03d7e684bb7dbd.zip
Merge remote-tracking branch 'remotes/kraxel/tags/ui2-20181012-pull-request' into staging
ui: drop gtk2 support. # gpg: Signature made Fri 12 Oct 2018 15:05:25 BST # gpg: using RSA key 4CB6D8EED3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" # Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138 * remotes/kraxel/tags/ui2-20181012-pull-request: ui: increase min required GTK3 version to 3.14.0 ui: remove support for GTK2 in favour of GTK3 Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'ui/gtk-egl.c')
-rw-r--r--ui/gtk-egl.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c
index fb00ad12ec..a77c25b490 100644
--- a/ui/gtk-egl.c
+++ b/ui/gtk-egl.c
@@ -48,11 +48,7 @@ void gd_egl_init(VirtualConsole *vc)
return;
}
-#if GTK_CHECK_VERSION(3, 0, 0)
Window x11_window = gdk_x11_window_get_xid(gdk_window);
-#else
- Window x11_window = gdk_x11_drawable_get_xid(gdk_window);
-#endif
if (!x11_window) {
return;
}
@@ -82,7 +78,8 @@ void gd_egl_draw(VirtualConsole *vc)
vc->gfx.esurface, vc->gfx.ectx);
window = gtk_widget_get_window(vc->gfx.drawing_area);
- gdk_drawable_get_size(window, &ww, &wh);
+ ww = gdk_window_get_width(window);
+ wh = gdk_window_get_height(window);
surface_gl_setup_viewport(vc->gfx.gls, vc->gfx.ds, ww, wh);
surface_gl_render_texture(vc->gfx.gls, vc->gfx.ds);
@@ -265,7 +262,8 @@ void gd_egl_scanout_flush(DisplayChangeListener *dcl,
vc->gfx.esurface, vc->gfx.ectx);
window = gtk_widget_get_window(vc->gfx.drawing_area);
- gdk_drawable_get_size(window, &ww, &wh);
+ ww = gdk_window_get_width(window);
+ wh = gdk_window_get_height(window);
egl_fb_setup_default(&vc->gfx.win_fb, ww, wh);
if (vc->gfx.cursor_fb.texture) {
egl_texture_blit(vc->gfx.gls, &vc->gfx.win_fb, &vc->gfx.guest_fb,