mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 03:21:04 +00:00
Yet another attempt at fixing the modifier mask processing
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@40476 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
9ac9acc001
commit
9c3c3d8b8d
2 changed files with 5 additions and 12 deletions
|
@ -1324,18 +1324,11 @@ didStartElement: (NSString*)elementName
|
|||
|
||||
if (attributes == nil)
|
||||
{
|
||||
// Seems that Apple decided to omit this attribute IF Control key alone
|
||||
// is applied. If this key is present WITH NO setting then that NULL
|
||||
// value is used for the modifier mask...
|
||||
// Seems that Apple decided to omit this attribute IF certain default keys alone
|
||||
// are applied. If this key is present WITH NO setting then the following is
|
||||
// used for the modifier mask...
|
||||
object = [NSNumber numberWithUnsignedInteger: NSCommandKeyMask];
|
||||
}
|
||||
else if ([attributes count] == 1)
|
||||
{
|
||||
// Seems that Apple decided to omit this attribute IF Control key alone
|
||||
// is applied. If this key is present WITH NO setting then that NULL
|
||||
// value is used for the modifier mask...
|
||||
object = [NSNumber numberWithUnsignedInteger: 0];
|
||||
}
|
||||
else
|
||||
{
|
||||
// If the modifier mask element is present then no modifier attributes
|
||||
|
@ -2605,7 +2598,7 @@ didStartElement: (NSString*)elementName
|
|||
}
|
||||
|
||||
// keyEquivalentModifierMask...
|
||||
mask.flags.keyEquivalentModifierMask = [[self decodeModifierMaskForElement: element] unsignedIntValue];
|
||||
mask.value |= [[self decodeModifierMaskForElement: element] unsignedIntValue];
|
||||
|
||||
// Return value...
|
||||
value = [NSNumber numberWithUnsignedInteger: mask.value];
|
||||
|
|
|
@ -1848,7 +1848,7 @@
|
|||
|
||||
[self setShowsBorderOnlyWhileMouseInside: mask.flags.showsBorderOnlyWhileMouseInside];
|
||||
[self setBezelStyle: mask.flags.bezelStyle | (mask.flags.bezelStyle2 << 3)];
|
||||
[self setKeyEquivalentModifierMask: (mask.flags.keyEquivalentModifierMask & NSDeviceIndependentModifierFlagsMask)];
|
||||
[self setKeyEquivalentModifierMask: (mask.value & NSDeviceIndependentModifierFlagsMask)];
|
||||
|
||||
switch (mask.flags.imageScaling)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue