Bugzilla – Attachment 306046 Details for
Bug 477383
MaskedTextBox: Backspace doesn't work
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
IDP Log In
|
Forgot Password
[patch]
code to output some log and demostrate the root cause of the bug
log_XLookupString.patch (text/plain), 2.26 KB, created by
Rui Guo
on 2009-07-20 07:10:07 UTC
(
hide
)
Description:
code to output some log and demostrate the root cause of the bug
Filename:
MIME Type:
Creator:
Rui Guo
Created:
2009-07-20 07:10:07 UTC
Size:
2.26 KB
patch
obsolete
>Index: System.Windows.Forms/X11Keyboard.cs >=================================================================== >--- System.Windows.Forms/X11Keyboard.cs (revision 137312) >+++ System.Windows.Forms/X11Keyboard.cs (working copy) >@@ -355,6 +355,10 @@ > string buffer; > Msg message; > int tu = ToUnicode ((int) msg.wParam, Control.HighOrder ((int) msg.lParam), out buffer); >+ >+ /*int char_code = ((IntPtr) buffer [0]).ToInt32(); >+ if (char_code == 8 || char_code == 127) >+ Console.WriteLine ("TranslateMessage: {0}, {1}", char_code, tu);*/ > switch (tu) { > case 1: > message = (msg.message == Msg.WM_KEYDOWN ? Msg.WM_CHAR : Msg.WM_SYSCHAR); >@@ -444,6 +448,7 @@ > XKeySym t; > IntPtr status; > int res = LookupString (ref e, 24, out t, out status); >+ Console.WriteLine ("UTF.LookupString: {0}, {1}, [{2}]", t, status, lookup_buffer); > int keysym = (int) t; > > buffer = String.Empty; >@@ -1171,7 +1176,9 @@ > do { > res = Xutf8LookupString (xic, ref xevent, utf8_buffer, 100, out keysym_res, out status); > if ((int) status != -1) // XLookupBufferOverflow >+ { > break; >+ } > utf8_buffer = new byte [utf8_buffer.Length << 1]; > } while (true); > lookup_buffer.Length = 0; >@@ -1181,8 +1188,27 @@ > return s.Length; > } else { > lookup_buffer.Length = 0; >+ if (xevent.type == XEventName.KeyPress && len == 24) >+ { >+ >+ Console.WriteLine ("Evt: {0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9}", >+ xevent.KeyEvent.keycode, >+ xevent.KeyEvent.state, >+ xevent.KeyEvent.same_screen, >+ xevent.KeyEvent.send_event, >+ xevent.KeyEvent.time, >+ xevent.KeyEvent.serial, >+ xevent.KeyEvent.root, >+ xevent.KeyEvent.display, >+ xevent.KeyEvent.subwindow, >+ xevent.KeyEvent.window); >+ } > res = XLookupString (ref xevent, lookup_buffer, len, out keysym_res, IntPtr.Zero); > keysym = (XKeySym) keysym_res.ToInt32 (); >+ if (xevent.type == XEventName.KeyPress && len == 24) >+ { >+ Console.WriteLine ("Non-XIC: {0}, {1}, [{2}], {3}", keysym, res, lookup_buffer, len); >+ } > return res; > } > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 477383
:
273701
| 306046