Commit 1f78e8e0 authored by Michael Natterer's avatar Michael Natterer 😴
Browse files

plug-ins: screenshot: don't pass NULL to gdk_keymap_get_entries_for_keyval()

because it's deprecated to do that and badly crashes in GTK+ 3.0.
Use the display's keymap instead.
parent be642b1e
......@@ -391,6 +391,7 @@ select_window_x11 (GdkScreen *screen)
Window x_win = None;
GC x_gc = NULL;
Cursor x_cursor = XCreateFontCursor (x_dpy, GDK_CROSSHAIR);
GdkKeymap *keymap;
GdkKeymapKey *keys = NULL;
gint status;
gint i, num_keys;
......@@ -445,7 +446,10 @@ select_window_x11 (GdkScreen *screen)
&gc_values);
}
if (gdk_keymap_get_entries_for_keyval (NULL, GDK_KEY_Escape, &keys, &num_keys))
keymap = gdk_keymap_get_for_display (gdk_screen_get_display (screen));
if (gdk_keymap_get_entries_for_keyval (keymap, GDK_KEY_Escape,
&keys, &num_keys))
{
gdk_error_trap_push ();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment