summaryrefslogtreecommitdiffstats
path: root/ui/gtk-egl.c
diff options
context:
space:
mode:
authorDaniel P. Berrangé2018-08-22 15:15:52 +0200
committerGerd Hoffmann2018-10-12 15:22:18 +0200
commit89d85cde75143325205e332dd97bf1bb8402d7c1 (patch)
tree6b7eec2dc32791ab4f5b3ffc5c6ec3b7383700d0 /ui/gtk-egl.c
parentMerge remote-tracking branch 'remotes/cohuck/tags/s390x-20181012' into staging (diff)
downloadqemu-89d85cde75143325205e332dd97bf1bb8402d7c1.tar.gz
qemu-89d85cde75143325205e332dd97bf1bb8402d7c1.tar.xz
qemu-89d85cde75143325205e332dd97bf1bb8402d7c1.zip
ui: remove support for GTK2 in favour of GTK3
GTK2 was deprecated in the 2.12.0 release with: commit b7715af2b31f47060cc5b4be930d16c13be93fa9 Author: Daniel P. Berrange <berrange@redhat.com> Date: Tue Dec 12 11:34:40 2017 +0000 ui: deprecate use of GTK 2.x in favour of 3.x series The GTK 3.0 release was made in Feb, 2011: https://blog.gtk.org/2011/02/10/gtk-3-0-released/ That will soon be 7 years ago, which is enough time to consider the 3.x series widely supported. Thus we deprecate the GTK 2.x support, which will allow us to delete it in the last release of 2018. By this time, GTK 3.x will be almost 8 years old. Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 20171212113440.16483-1-berrange@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> It is thus able to be removed in the 3.1.0 release. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Message-id: 20180822131554.3398-2-berrange@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
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,