Author: mlytwyn
Date: Fri Apr 14 02:26:51 2017
New Revision: 40476

URL: http://svn.gna.org/viewcvs/gnustep?rev=40476&view=rev
Log:
Yet another attempt at fixing the modifier mask processing

Modified:
    libs/gui/branches/gnustep_testplant_branch/Source/GSXib5KeyedUnarchiver.m
    libs/gui/branches/gnustep_testplant_branch/Source/NSButtonCell.m

Modified: 
libs/gui/branches/gnustep_testplant_branch/Source/GSXib5KeyedUnarchiver.m
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/gui/branches/gnustep_testplant_branch/Source/GSXib5KeyedUnarchiver.m?rev=40476&r1=40475&r2=40476&view=diff
==============================================================================
--- libs/gui/branches/gnustep_testplant_branch/Source/GSXib5KeyedUnarchiver.m   
(original)
+++ libs/gui/branches/gnustep_testplant_branch/Source/GSXib5KeyedUnarchiver.m   
Fri Apr 14 02:26:51 2017
@@ -1324,17 +1324,10 @@
   
   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
     {
@@ -2605,7 +2598,7 @@
         }
       
       // keyEquivalentModifierMask...
-      mask.flags.keyEquivalentModifierMask = [[self 
decodeModifierMaskForElement: element] unsignedIntValue];
+      mask.value |= [[self decodeModifierMaskForElement: element] 
unsignedIntValue];
 
       // Return value...
       value = [NSNumber numberWithUnsignedInteger: mask.value];

Modified: libs/gui/branches/gnustep_testplant_branch/Source/NSButtonCell.m
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/gui/branches/gnustep_testplant_branch/Source/NSButtonCell.m?rev=40476&r1=40475&r2=40476&view=diff
==============================================================================
--- libs/gui/branches/gnustep_testplant_branch/Source/NSButtonCell.m    
(original)
+++ libs/gui/branches/gnustep_testplant_branch/Source/NSButtonCell.m    Fri Apr 
14 02:26:51 2017
@@ -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)
             {


_______________________________________________
Gnustep-cvs mailing list
Gnustep-cvs@gna.org
https://mail.gna.org/listinfo/gnustep-cvs

Reply via email to