forked from AuroraMiddleware/gtk
Merge branch 'win32-imcontextime-ignore-control-characters' into 'main'
Fix handling of control characters & remove Win32-specific hacks from gdkkeyuni.c Closes #2865 See merge request GNOME/gtk!4387
This commit is contained in:
commit
672ab4fc35
@ -835,18 +835,13 @@ static const struct {
|
||||
/* Following items added to GTK, not in the xterm table */
|
||||
|
||||
/* A few ASCII control characters */
|
||||
#ifndef GDK_WINDOWING_WIN32
|
||||
|
||||
{ 0xFF08 /* Backspace */, '\b' },
|
||||
{ 0xFF09 /* Tab */, '\t' },
|
||||
#endif
|
||||
|
||||
{ 0xFF0A /* Linefeed */, '\n' },
|
||||
{ 0xFF0B /* Vert. Tab */, '\v' },
|
||||
|
||||
#ifndef GDK_WINDOWING_WIN32
|
||||
{ 0xFF0D /* Return */, '\r' },
|
||||
{ 0xFF1B /* Escape */, '\033' },
|
||||
#endif
|
||||
|
||||
/* Numeric keypad */
|
||||
|
||||
@ -871,9 +866,7 @@ static const struct {
|
||||
|
||||
/* End numeric keypad */
|
||||
|
||||
#ifndef GDK_WINDOWING_WIN32
|
||||
{ 0xFFFF /* Delete */, '\177' }
|
||||
#endif
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -382,7 +382,7 @@ gtk_im_context_ime_filter_keypress (GtkIMContext *context,
|
||||
|
||||
c = gdk_keyval_to_unicode (keyval);
|
||||
|
||||
if (c)
|
||||
if (c && !g_unichar_iscntrl(c))
|
||||
{
|
||||
_gtk_im_context_ime_commit_unichar (context_ime, c);
|
||||
retval = TRUE;
|
||||
|
Loading…
Reference in New Issue
Block a user