Matthew Fulmer uploaded a new version of Kernel to project The Inbox:
http://source.squeak.org/inbox/Kernel-mtf.528.mcz ==================== Summary ==================== Name: Kernel-mtf.528 Author: mtf Time: 15 December 2010, 9:18:17.283 pm UUID: f111a9ad-3262-4a7f-98e8-1179c970d1cf Ancestors: Kernel-mtf.526 Make the mouse button mappings be consistent across platforms, in the presence of the inconsistent Win32 VM =============== Diff against Kernel-mtf.526 =============== Item was changed: ----- Method: InputSensor class>>installMouseDecodeTable (in category 'class initialization') ----- installMouseDecodeTable "Create a decode table that swaps the lowest-order 2 bits if + Preferences swapMouseButtons is set. + + Also swap if the platform is windows, for consistency with the + other platform VMs" + ButtonDecodeTable := + (Preferences swapMouseButtons + xor: Smalltalk platformName = 'Win32') - Preferences swapMouseButtons is set" - ButtonDecodeTable := Preferences swapMouseButtons ifTrue: [ByteArray withAll: ((0 to: 255) collect: [:ea | ((ea bitAnd: 1) << 1 bitOr: (ea bitAnd: 2) >> 1) bitOr: (ea bitAnd: 16rFC) ])] ifFalse: [ByteArray withAll: (0 to: 255)]! |
On 16.12.2010, at 02:19, [hidden email] wrote: > Matthew Fulmer uploaded a new version of Kernel to project The Inbox: > http://source.squeak.org/inbox/Kernel-mtf.528.mcz > > ==================== Summary ==================== > > Name: Kernel-mtf.528 > Author: mtf > Time: 15 December 2010, 9:18:17.283 pm > UUID: f111a9ad-3262-4a7f-98e8-1179c970d1cf > Ancestors: Kernel-mtf.526 > > Make the mouse button mappings be consistent across platforms, in the presence of the inconsistent Win32 VM > > =============== Diff against Kernel-mtf.526 =============== > > Item was changed: > ----- Method: InputSensor class>>installMouseDecodeTable (in category 'class initialization') ----- > installMouseDecodeTable > "Create a decode table that swaps the lowest-order 2 bits if > + Preferences swapMouseButtons is set. > + > + Also swap if the platform is windows, for consistency with the > + other platform VMs" > + ButtonDecodeTable := > + (Preferences swapMouseButtons > + xor: Smalltalk platformName = 'Win32') > - Preferences swapMouseButtons is set" > - ButtonDecodeTable := Preferences swapMouseButtons > ifTrue: [ByteArray withAll: > ((0 to: 255) collect: [:ea | > ((ea bitAnd: 1) << 1 > bitOr: (ea bitAnd: 2) >> 1) > bitOr: (ea bitAnd: 16rFC) ])] > ifFalse: [ByteArray > withAll: (0 to: 255)]! > > I don't think that's a good idea. How would you know which button mapping the user chose in his Windows VM settings? This just makes everything more complicated rather than less. - Bert - |
On 12/15/2010 11:08 PM, Bert Freudenberg wrote:
> I don't think that's a good idea. How would you know which button mapping the user chose in his Windows VM settings? This just makes everything more complicated rather than less. Indeed. This is crazy. We need a concerted effort. We need to change both the in-image preference and the VM preference (in the .ini file). If you want to make sure this happens for the next release, then write a test in ReleaseTests ensuring that the in-image preference is set properly. This will act as a reminder and force the issue. Cheers, - Andreas |
On Wed, Dec 15, 2010 at 11:18:08PM -0800, Andreas Raab wrote:
> On 12/15/2010 11:08 PM, Bert Freudenberg wrote: > > I don't think that's a good idea. How would you know which > > button mapping the user chose in his Windows VM settings? > > This just makes everything more complicated rather than > > less. > > Indeed. This is crazy. We need a concerted effort. We need to change > both the in-image preference and the VM preference (in the .ini file). I had no idea there were vm settings. I just thought the windows vm always got it backward for historical reasons. > If you want to make sure this happens for the next release, then write a > test in ReleaseTests ensuring that the in-image preference is set > properly. This will act as a reminder and force the issue. I'll look into this vm settings thing and see if I can come up with a test case to ensure that the VM is sending right clicks as blue buttons, and another to ensure swapMouseButtons is set -- Matthew Fulmer (a.k.a. Tapple) |
In reply to this post by Bert Freudenberg
On 16 December 2010 08:08, Bert Freudenberg <[hidden email]> wrote:
> > On 16.12.2010, at 02:19, [hidden email] wrote: > >> Matthew Fulmer uploaded a new version of Kernel to project The Inbox: >> http://source.squeak.org/inbox/Kernel-mtf.528.mcz >> >> ==================== Summary ==================== >> >> Name: Kernel-mtf.528 >> Author: mtf >> Time: 15 December 2010, 9:18:17.283 pm >> UUID: f111a9ad-3262-4a7f-98e8-1179c970d1cf >> Ancestors: Kernel-mtf.526 >> >> Make the mouse button mappings be consistent across platforms, in the presence of the inconsistent Win32 VM >> >> =============== Diff against Kernel-mtf.526 =============== >> >> Item was changed: >> ----- Method: InputSensor class>>installMouseDecodeTable (in category 'class initialization') ----- >> installMouseDecodeTable >> "Create a decode table that swaps the lowest-order 2 bits if >> + Preferences swapMouseButtons is set. >> + >> + Also swap if the platform is windows, for consistency with the >> + other platform VMs" >> + ButtonDecodeTable := >> + (Preferences swapMouseButtons >> + xor: Smalltalk platformName = 'Win32') >> - Preferences swapMouseButtons is set" >> - ButtonDecodeTable := Preferences swapMouseButtons >> ifTrue: [ByteArray withAll: >> ((0 to: 255) collect: [:ea | >> ((ea bitAnd: 1) << 1 >> bitOr: (ea bitAnd: 2) >> 1) >> bitOr: (ea bitAnd: 16rFC) ])] >> ifFalse: [ByteArray >> withAll: (0 to: 255)]! >> >> > > I don't think that's a good idea. How would you know which button mapping the user chose in his Windows VM settings? This just makes everything more complicated rather than less. By default, a mouse buttons in windows interpreted differently than on other platforms. If used change default settings for his VM , this is his own problems. But i think that its good change, that when you moving image between platforms, the physical buttons mapping doesn't changing depending on platform. And to summarize: we don't need two settings for swapping mouse buttons - one in image, another in VM. This is what makes everything more complicated. Button settings should be left only in image, and from VM side, we should make sure that all VMs for all platforms interpret same physical buttons similarly. > > - Bert - > -- Best regards, Igor Stasenko AKA sig. |
On 16 December 2010 14:07, Igor Stasenko <[hidden email]> wrote:
> On 16 December 2010 08:08, Bert Freudenberg <[hidden email]> wrote: >> >> On 16.12.2010, at 02:19, [hidden email] wrote: >> >>> Matthew Fulmer uploaded a new version of Kernel to project The Inbox: >>> http://source.squeak.org/inbox/Kernel-mtf.528.mcz >>> >>> ==================== Summary ==================== >>> >>> Name: Kernel-mtf.528 >>> Author: mtf >>> Time: 15 December 2010, 9:18:17.283 pm >>> UUID: f111a9ad-3262-4a7f-98e8-1179c970d1cf >>> Ancestors: Kernel-mtf.526 >>> >>> Make the mouse button mappings be consistent across platforms, in the presence of the inconsistent Win32 VM >>> >>> =============== Diff against Kernel-mtf.526 =============== >>> >>> Item was changed: >>> ----- Method: InputSensor class>>installMouseDecodeTable (in category 'class initialization') ----- >>> installMouseDecodeTable >>> "Create a decode table that swaps the lowest-order 2 bits if >>> + Preferences swapMouseButtons is set. >>> + >>> + Also swap if the platform is windows, for consistency with the >>> + other platform VMs" >>> + ButtonDecodeTable := >>> + (Preferences swapMouseButtons >>> + xor: Smalltalk platformName = 'Win32') >>> - Preferences swapMouseButtons is set" >>> - ButtonDecodeTable := Preferences swapMouseButtons >>> ifTrue: [ByteArray withAll: >>> ((0 to: 255) collect: [:ea | >>> ((ea bitAnd: 1) << 1 >>> bitOr: (ea bitAnd: 2) >> 1) >>> bitOr: (ea bitAnd: 16rFC) ])] >>> ifFalse: [ByteArray >>> withAll: (0 to: 255)]! >>> >>> >> >> I don't think that's a good idea. How would you know which button mapping the user chose in his Windows VM settings? This just makes everything more complicated rather than less. > > By default, a mouse buttons in windows interpreted differently than on > other platforms. > If used change default settings for his VM , this is his own problems. oops, a typo here 'used change' -> 'user changes' > But i think that its good change, that when you moving image between > platforms, the physical buttons mapping > doesn't changing depending on platform. > > And to summarize: we don't need two settings for swapping mouse > buttons - one in image, another in VM. > This is what makes everything more complicated. > > Button settings should be left only in image, and from VM side, we > should make sure that all VMs for all platforms > interpret same physical buttons similarly. > >> >> - Bert - >> > > -- > Best regards, > Igor Stasenko AKA sig. > -- Best regards, Igor Stasenko AKA sig. |
In reply to this post by Tapple Gao
On 12/16/2010 4:58 AM, Matthew Fulmer wrote:
>> Indeed. This is crazy. We need a concerted effort. We need to change >> both the in-image preference and the VM preference (in the .ini file). > > I had no idea there were vm settings. I just thought the windows > vm always got it backward for historical reasons. See http://squeakvm.org/win32/settings.html >> If you want to make sure this happens for the next release, then write a >> test in ReleaseTests ensuring that the in-image preference is set >> properly. This will act as a reminder and force the issue. > > I'll look into this vm settings thing and see if I can come up > with a test case to ensure that the VM is sending right clicks > as blue buttons, and another to ensure swapMouseButtons is set All you need is a test that says: testSwapButtonPreference "Swap mouse buttons should be enabled on all platforms" self assert: Preferences swapMouseButtons. Cheers, - Andreas |
In reply to this post by Igor Stasenko
On Thu, Dec 16, 2010 at 11:48:06AM -0500, Matthew Fulmer wrote:
> On Thu, Dec 16, 2010 at 02:07:44PM +0100, Igor Stasenko wrote: > > And to summarize: we don't need two settings for swapping mouse > > buttons - one in image, another in VM. > > This is what makes everything more complicated. > > > > Button settings should be left only in image, and from VM side, we > > should make sure that all VMs for all platforms > > interpret same physical buttons similarly. > > I made the tests req oops. meant to say I agree. I made a couple test cases to assert this. Tests-mtf.103 in the inbox -- Matthew Fulmer (a.k.a. Tapple) |
Free forum by Nabble | Edit this page |