app: Use gtk_window_present for activation

GTK 3.24.7 has fixed the gtk_window_present() not working in Wayland
issue described here: https://gitlab.gnome.org/GNOME/gtk/issues/624.

Since this has been fixed update our minimum GTK version and use the
present() function.

Signed-off-by: Alistair Francis <alistair@alistair23.me>
This commit is contained in:
Alistair Francis 2019-07-02 21:26:36 -07:00
parent 95ee205a06
commit de8c3cb677
2 changed files with 2 additions and 5 deletions

View file

@ -249,10 +249,7 @@ impl App {
fn on_activate(&self) {
self.main_window.show();
// FIXME: present() dosen't work currently on wayland because of
// https://gitlab.gnome.org/GNOME/gtk/issues/624
self.main_window
.present_with_time((glib::get_monotonic_time() / 1000) as u32)
self.main_window.present()
}
fn on_shutdown(self) {

View file

@ -11,7 +11,7 @@ dependency('glib-2.0', version: '>= 2.56')
dependency('gio-2.0', version: '>= 2.56')
dependency('cairo', version: '>= 1.16')
dependency('gdk-pixbuf-2.0')
dependency('gtk+-3.0', version: '>= 3.22')
dependency('gtk+-3.0', version: '>= 3.24.7')
dependency('libhandy-0.0', version: '>= 0.0.9')
dependency('gtksourceview-3.0', version: '>= 3.22')
dependency('gspell-1', version: '>= 1.8')