mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 07:00:46 +00:00
Left shift key equivalent modifier mask in xib unarchiver (#259)
* Left shift key equivalent modifier mask in xib unarchiver This is necessary to offset the 8 bit right shift that occurs in the initWithCoder: method in NSButtonCell * Shift modifier mask in xib unarchiver
This commit is contained in:
parent
192c121a9d
commit
d1562a37cd
1 changed files with 3 additions and 1 deletions
|
@ -1395,7 +1395,7 @@ didStartElement: (NSString*)elementName
|
|||
// 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 numberWithUnsignedInt: NSCommandKeyMask];
|
||||
object = [NSNumber numberWithUnsignedInt: (NSCommandKeyMask << 8)];
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -1437,6 +1437,8 @@ didStartElement: (NSString*)elementName
|
|||
mask |= NSFunctionKeyMask;
|
||||
}
|
||||
|
||||
//This mask is left shifted 8 bits when encoded. When this is used to initialize the element, the mask will be shifted back to the right by 8 bits.
|
||||
mask = (mask << 8);
|
||||
object = [NSNumber numberWithUnsignedInt: mask];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue