[Ikvm-commit] ikvm/awt toolkit-0.95.cs,1.108,1.109
Brought to you by:
jfrijters
|
From: Jeroen F. <jfr...@us...> - 2014-06-03 08:56:32
|
Update of /cvsroot/ikvm/ikvm/awt In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv7773 Modified Files: toolkit-0.95.cs Log Message: - Prevent unfocable windows from being activated by mouse click. - Fixed clipboard access to use the right thread. (Based on patch by Maria Papendieck of pure-systems.) Index: toolkit-0.95.cs =================================================================== RCS file: /cvsroot/ikvm/ikvm/awt/toolkit-0.95.cs,v retrieving revision 1.108 retrieving revision 1.109 diff -C2 -d -r1.108 -r1.109 *** toolkit-0.95.cs 19 May 2014 12:43:29 -0000 1.108 --- toolkit-0.95.cs 3 Jun 2014 08:56:30 -0000 1.109 *************** *** 128,131 **** --- 128,144 ---- } + private const int WM_MOUSEACTIVATE = 0x0021; + private const int MA_NOACTIVATE = 0x0003; + + protected override void WndProc(ref Message m) + { + if (!focusableWindow && m.Msg == WM_MOUSEACTIVATE) + { + m.Result = (IntPtr)MA_NOACTIVATE; + return; + } + base.WndProc(ref m); + } + protected override void OnPaintBackground(PaintEventArgs e) { *************** *** 5301,5305 **** return contents; } ! return new NetClipboardTransferable(Clipboard.GetDataObject()); } } --- 5314,5318 ---- return contents; } ! return new NetClipboardTransferable(NetToolkit.Invoke<IDataObject>(Clipboard.GetDataObject)); } } |