Ui2 20181012 patches
The following changes since commit 69ac8c4cb93f2685839ff7b857cef306b388ff3c:
Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20181012' into staging (2018-10-12 12:40:04 +0100)
are available in the git repository at:
git://git.kraxel.org/qemu tags/ui2-20181012-pull-request
for you to fetch changes up to 58296cb61866195297510e946a51acc5f0b9639e:
ui: increase min required GTK3 version to 3.14.0 (2018-10-12 15:22:18 +0200)
----------------------------------------------------------------
ui: drop gtk2 support.
----------------------------------------------------------------
Daniel P. Berrangé (2):
ui: remove support for GTK2 in favour of GTK3
ui: increase min required GTK3 version to 3.14.0
configure | 51 ++----------- include/ui/gtk.h | 9 --- ui/gtk-egl.c | 10 +-- ui/gtk.c | 202 ++++----------------------------------------------- qemu-deprecated.texi | 7 -- 5 files changed, 26 insertions(+), 253 deletions(-)
Signature · 1 line
2.9.3
[Qemu-devel] [PULL 2/2] ui: increase min required GTK3 version to 3.14.0
From: Daniel P. Berrangé <[email protected]>
Per supported platforms doc[1], the various min GTK3 on relevant distros is:
RHEL-7.0: 3.8.8
RHEL-7.2: 3.14.13
RHEL-7.4: 3.22.10
RHEL-7.5: 3.22.26
Debian (Stretch): 3.22.11
Debian (Jessie): 3.14.5
OpenBSD (Ports): 3.22.30
FreeBSD (Ports): 3.22.29
OpenSUSE Leap 15: 3.22.30
SLE12-SP2: Unknown
Ubuntu (Xenial): 3.18.9
macOS (Homebrew): 3.22.30
This suggests that a minimum GTK3 of 3.14.0 is a reasonable target, as users are unlikely to be stuck on RHEL-7.0/7.1 still
[1] https://qemu.weilnetz.de/doc/qemu-doc.html#Supported-build-platforms
Message-id: [email protected]
--- configure | 2 +- ui/gtk.c | 10 ---------- 2 files changed, 1 insertion(+), 11 deletions(-)
configure +1 -1
@@ -2644,7 +2644,7 @@ fi if test "$gtk" != "no"; then gtkpackage="gtk+-3.0" gtkx11package="gtk+-x11-3.0" - gtkversion="3.0.0" + gtkversion="3.14.0" if $pkg_config --exists "$gtkpackage >= $gtkversion"; then gtk_cflags=$($pkg_config --cflags $gtkpackage) gtk_libs=$($pkg_config --libs $gtkpackage)
ui/gtk.c +0 -10
@@ -998,7 +998,6 @@ static gboolean gd_scroll_event(GtkWidget *widget, GdkEventScroll *scroll, btn =INPUT_BUTTON_WHEEL_UP ; } else if (scroll->direction == GDK_SCROLL_DOWN) { btn =INPUT_BUTTON_WHEEL_DOWN ; -#if GTK_CHECK_VERSION (3 ,4 ,0 ) } else if (scroll->direction == GDK_SCROLL_SMOOTH) { gdouble delta_x, delta_y; if (!gdk_event_get_scroll_deltas((GdkEvent *)scroll,
@@ -1010,7 +1009,6 @@ static gboolean gd_scroll_event(GtkWidget *widget, GdkEventScroll *scroll, }else { btn =INPUT_BUTTON_WHEEL_UP ; } -#endif }else {return TRUE; }
@@ -1672,11 +1670,9 @@ static GSList *gd_vc_menu_init(GtkDisplayState *s, VirtualConsole *vc,gtk_accel_group_connect (s->accel_group,GDK_KEY_1 + idx,HOTKEY_MODIFIERS ,0 ,g_cclosure_new_swap (G_CALLBACK (gd_accel_switch_vc), vc,NULL )); -#if GTK_CHECK_VERSION (3 ,8 ,0 )gtk_accel_label_set_accel (GTK_ACCEL_LABEL (gtk_bin_get_child (GTK_BIN (vc->menu_item))),GDK_KEY_1 + idx,HOTKEY_MODIFIERS ); -#endif g_signal_connect (vc->menu_item,"activate" ,G_CALLBACK (gd_menu_switch_vc), s);
@@ -2175,11 +2171,9 @@ static GtkWidget *gd_create_menu_view(GtkDisplayState *s) TRUE);gtk_accel_group_connect (s->accel_group, GDK_KEY_m,HOTKEY_MODIFIERS ,0 ,g_cclosure_new_swap (G_CALLBACK (gd_accel_show_menubar), s,NULL )); -#if GTK_CHECK_VERSION (3 ,8 ,0 )gtk_accel_label_set_accel (GTK_ACCEL_LABEL (gtk_bin_get_child (GTK_BIN (s->show_menubar_item))), GDK_KEY_m,HOTKEY_MODIFIERS ); -#endif gtk_menu_shell_append (GTK_MENU_SHELL (view_menu), s->show_menubar_item);return view_menu;
@@ -2229,11 +2223,7 @@ static void gtk_display_init(DisplayState *ds, DisplayOptions *opts) s->opts = opts; s->window =gtk_window_new (GTK_WINDOW_TOPLEVEL ); -#if GTK_CHECK_VERSION (3 ,2 ,0 ) s->vbox =gtk_box_new (GTK_ORIENTATION_VERTICAL ,0 ); -#else - s->vbox =gtk_vbox_new (FALSE,0 ); -#endif s->notebook =gtk_notebook_new (); s->menu_bar =gtk_menu_bar_new ();
Signature · 1 line
2.9.3
[Qemu-devel] [PULL 1/2] ui: remove support for GTK2 in favour of GTK3
In reply to Gerd HoffmannFrom: Daniel P. Berrangé <[email protected]>
GTK2 was deprecated in the 2.12.0 release with:
commit b7715af2b31f47060cc5b4be930d16c13be93fa9
Author: Daniel P. Berrange <[email protected]>
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.
Message-id: [email protected]
It is thus able to be removed in the 3.1.0 release.
Message-id: [email protected]
--- configure | 51 +++----------- include/ui/gtk.h | 9 --- ui/gtk-egl.c | 10 ++- ui/gtk.c | 192 ++++----------------------------------------------- qemu-deprecated.texi | 7 -- 5 files changed, 26 insertions(+), 243 deletions(-)
configure +8 -43
@@ -454,7 +454,6 @@ glusterfs_discard="no" glusterfs_fallocate="no" glusterfs_zerofill="no" gtk="" -gtkabi="" gtk_gl="no" tls_priority="NORMAL" gnutls=""
@@ -1370,8 +1369,6 @@ for opt do ;; --disable-pvrdma) pvrdma="no" ;; - --with-gtkabi=*) gtkabi="$optarg" - ;; --disable-vte) vte="no" ;; --enable-vte) vte="yes"
@@ -1659,7 +1656,6 @@ disabled with --disable-FEATURE, default is enabled if available: sdl SDL UI --with-sdlabi select preferred SDL ABI 1.2 or 2.0 gtk gtk UI - --with-gtkabi select preferred GTK ABI 2.0 or 3.0 vte vte support for the gtk UI curses curses UI vnc VNC UI support
@@ -2646,24 +2642,9 @@ fi # GTK probe if test "$gtk" != "no"; then - if test "$gtkabi" = ""; then - # The GTK ABI was not specified explicitly, so try whether 3.0 is available. - # Use 2.0 as a fallback if that is available. - if $pkg_config --exists "gtk+-3.0 >= 3.0.0"; then - gtkabi=3.0 - elif $pkg_config --exists "gtk+-2.0 >= 2.18.0"; then - gtkabi=2.0 - else - gtkabi=3.0 - fi - fi - gtkpackage="gtk+-$gtkabi" - gtkx11package="gtk+-x11-$gtkabi" - if test "$gtkabi" = "3.0" ; then - gtkversion="3.0.0" - else - gtkversion="2.18.0" - fi + gtkpackage="gtk+-3.0" + gtkx11package="gtk+-x11-3.0" + gtkversion="3.0.0" if $pkg_config --exists "$gtkpackage >= $gtkversion"; then gtk_cflags=$($pkg_config --cflags $gtkpackage) gtk_libs=$($pkg_config --libs $gtkpackage)
@@ -2907,16 +2888,11 @@ fi # VTE probe if test "$vte" != "no"; then - if test "$gtkabi" = "3.0"; then - vteminversion="0.32.0" - if $pkg_config --exists "vte-2.91"; then - vtepackage="vte-2.91" - else - vtepackage="vte-2.90" - fi + vteminversion="0.32.0" + if $pkg_config --exists "vte-2.91"; then + vtepackage="vte-2.91" else - vtepackage="vte" - vteminversion="0.24.0" + vtepackage="vte-2.90" fi if $pkg_config --exists "$vtepackage >= $vteminversion"; then vte_cflags=$($pkg_config --cflags $vtepackage)
@@ -2924,11 +2900,7 @@ if test "$vte" != "no"; then vteversion=$($pkg_config --modversion $vtepackage) vte="yes" elif test "$vte" = "yes"; then - if test "$gtkabi" = "3.0"; then - feature_not_found "vte" "Install libvte-2.90/2.91 devel" - else - feature_not_found "vte" "Install libvte devel" - fi + feature_not_found "vte" "Install libvte-2.90/2.91 devel" else vte="no" fi
@@ -6109,12 +6081,6 @@ if test "$sdl_too_old" = "yes"; then echo "-> Your SDL version is too old - please upgrade to have SDL support" fi -if test "$gtkabi" = "2.0"; then - echo - echo "WARNING: Use of GTK 2.0 is deprecated and will be removed in" - echo "WARNING: future releases. Please switch to using GTK 3.0" -fi - if test "$sdlabi" = "1.2"; then echo echo "WARNING: Use of SDL 1.2 is deprecated and will be removed in"
@@ -6431,7 +6397,6 @@ if test "$bluez" = "yes" ; then fi if test "$gtk" = "yes" ; then echo "CONFIG_GTK=m" >> $config_host_mak - echo "CONFIG_GTKABI=$gtkabi" >> $config_host_mak echo "GTK_CFLAGS=$gtk_cflags" >> $config_host_mak echo "GTK_LIBS=$gtk_libs" >> $config_host_mak if test "$gtk_gl" = "yes" ; then
include/ui/gtk.h +0 -9
@@ -27,15 +27,6 @@#include "ui/egl-context.h" #endif -/* Compatibility define to let us build on both Gtk2 and Gtk3 */ -#if GTK_CHECK_VERSION (3 ,0 ,0 ) -static inline void gdk_drawable_get_size (GdkWindow *w,gint *ww,gint *wh) -{ - *ww =gdk_window_get_width (w); - *wh =gdk_window_get_height (w); -} -#endif -typedef struct GtkDisplayState GtkDisplayState ; typedef struct VirtualGfxConsole {
ui/gtk-egl.c +4 -6
@@ -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,
ui/gtk.c +14 -178
362 lines not on this page · raw message
qemu-deprecated.texi +0 -7
@@ -19,13 +19,6 @@ deprecated. @section Build options -@subsection GTK 2.x - -Previously QEMU has supported building against both GTK 2.x -and 3.x series APIs. Support for the GTK 2.x builds will be -discontinued, so maintainers should switch to using GTK 3.x, -which is the default. - @subsection SDL 1.2 Previously QEMU has supported building against both SDL 1.2
Signature · 1 line
2.9.3
Peter Maydell
AppliedQuoted 21 lines · Gerd Hoffmann
The following changes since commit
69ac8c4cb93f2685839ff7b857cef306b388ff3c:Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20181012' into staging (2018-10-12 12:40:04 +0100)
are available in the git repository at:
git://git.kraxel.org/qemutags/ui2-20181012-pull-requestfor you to fetch changes up to
58296cb61866195297510e946a51acc5f0b9639e:ui: increase min required GTK3 version to 3.14.0 (2018-10-12 15:22:18 +0200)
----------------------------------------------------------------
ui: drop gtk2 support.----------------------------------------------------------------
Daniel P. Berrangé (2):
ui: remove support for GTK2 in favour of GTK3
ui: increase min required GTK3 version to 3.14.0
Quoted 6 lines
configure | 51 ++----------- include/ui/gtk.h | 9 --- ui/gtk-egl.c | 10 +-- ui/gtk.c | 202 ++++----------------------------------------------- qemu-deprecated.texi | 7 -- 5 files changed, 26 insertions(+), 253 deletions(-)
Applied, thanks.
-- PMM