Skip to content

Commit

Permalink
Bump minimum GTK version to 4.6.1
Browse files Browse the repository at this point in the history
GTK 4.6.1 fixes a crash that happens on WMs/DEs that use the ZWP idle
inhibit protocol.

Fixes #738.
  • Loading branch information
gnome-mpv committed Feb 12, 2022
1 parent 6436384 commit 8b68f56
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ mpv's powerful playback capabilities.
- pkg-config (build)
- gcc (build)
- glib >= 2.66
- gtk >= 4.0
- gtk >= 4.6.1
- mpv >= 0.32
- epoxy
- lua (optional)
Expand Down
6 changes: 3 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,14 @@ AS_IF([test "x$GLIB_GENMARSHAL" = "x"], [
AC_MSG_ERROR([Could not find glib-genmarshal])
])

PKG_CHECK_MODULES(DEPS, [gtk4 glib-2.0 >= 2.66 mpv >= 1.107 epoxy])
PKG_CHECK_MODULES(DEPS, [gtk4 >= 4.6.1 glib-2.0 >= 2.66 mpv >= 1.107 epoxy])
AC_SEARCH_LIBS([sqrt], [m])

AC_DEFINE([GLIB_VERSION_MIN_REQUIRED], [GLIB_VERSION_2_66], [Dont warn using older APIs])
AC_DEFINE([GLIB_VERSION_MAX_ALLOWED], [GLIB_VERSION_2_66], [Prevents using newer APIs])

AC_DEFINE([GDK_VERSION_MIN_REQUIRED], [GDK_VERSION_4_0], [Dont warn using older APIs])
AC_DEFINE([GDK_VERSION_MAX_ALLOWED], [GDK_VERSION_4_0], [Prevents using newer APIs])
AC_DEFINE([GDK_VERSION_MIN_REQUIRED], [GDK_VERSION_4_6], [Dont warn using older APIs])
AC_DEFINE([GDK_VERSION_MAX_ALLOWED], [GDK_VERSION_4_6], [Prevents using newer APIs])

AC_DEFINE_UNQUOTED([G_LOG_DOMAIN], "$PACKAGE_NAME", [Default logging facility])

Expand Down
6 changes: 3 additions & 3 deletions src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ sources += custom_target('authors',
]
)

libgtk = dependency('gtk4')
libgtk = dependency('gtk4', version: '>=4.6.1')
localedir = join_paths(get_option('prefix'), get_option('localedir'))
cflags = [
'-DG_SETTINGS_ENABLE_BACKEND',
Expand All @@ -60,8 +60,8 @@ cflags = [
'-DG_LOG_DOMAIN="@0@"'.format(meson.project_name()),
'-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_66',
'-DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_66',
'-DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_4_0',
'-DGDK_VERSION_MAX_ALLOWED=GDK_VERSION_4_0'
'-DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_4_6',
'-DGDK_VERSION_MAX_ALLOWED=GDK_VERSION_4_6'
]

if get_option('buildtype') == 'release'
Expand Down

0 comments on commit 8b68f56

Please sign in to comment.