From: <pa...@us...> - 2024-02-18 19:48:45
|
This is an automated email from the git hooks/post-receive-user script. pak21 pushed a commit to branch patch-440-remove-gdk_keymap_get_default-2 in repository fuse. View the commit online: https://sourceforge.net/p/fuse-emulator/fuse/ci/d9dc1456c37579a9c39d5e56d0fa6abfcaa81a72/ commit d9dc1456c37579a9c39d5e56d0fa6abfcaa81a72 Author: Philip Kendall <phi...@sh...> AuthorDate: Sun Feb 18 19:47:26 2024 +0000 Remove use of deprecated `gdk_keymap_get_default` function. Simpler version as Berto pointed out `gdk_display_get_default()` is a trivial call so no need to cache it. --- ui/gtk/gtkkeyboard.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ui/gtk/gtkkeyboard.c b/ui/gtk/gtkkeyboard.c index c431ba60..e3522f3f 100644 --- a/ui/gtk/gtkkeyboard.c +++ b/ui/gtk/gtkkeyboard.c @@ -1,5 +1,5 @@ /* gtkkeyboard.c: GTK routines for dealing with the keyboard - Copyright (c) 2000-2008 Philip Kendall, Russell Marks + Copyright (c) 2000-2024 Philip Kendall, Russell Marks This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -42,9 +42,10 @@ unshift_keysym( guint keycode, gint group ) GdkKeymapKey *maps; guint *keyvals, i, r = GDK_KEY_VoidSymbol, r2 = GDK_KEY_VoidSymbol; gint count; + GdkDisplay *display = gdk_display_get_default(); - gdk_keymap_get_entries_for_keycode( gdk_keymap_get_default(), keycode, - &maps, &keyvals, &count ); + gdk_keymap_get_entries_for_keycode( gdk_keymap_get_for_display( display ), + keycode, &maps, &keyvals, &count ); for( i = 0; i < count; i++ ) { if( maps[i].group == group && maps[i].level == 0 ) { |