xpra icon
Bug tracker and wiki

Changeset 1225 in xpra


Ignore:
Timestamp:
07/31/12 08:19:03 (10 months ago)
Author:
antoine
Message:

better handling for "MULTIPLE": use a dedicated method and log a more useful error message if it is not an atom as we expect it to be

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wimpiggy/prop.py

    r1222 r1225  
    182182        return  None 
    183183    return str(pyatom) 
     184 
     185def _get_multiple(disp, d): 
     186    uint_struct = struct.Struct("=I") 
     187    log("get_multiple struct size=%s, len(%s)=%s", uint_struct.size, d, len(d)) 
     188    if len(d)!=uint_struct.size and False: 
     189        log.info("get_multiple value is not an atom: %s", d) 
     190        return  str(d) 
     191    return _get_atom(disp, d) 
    184192 
    185193def get_xsettings(disp, d): 
     
    244252    # AnyPropertyType and assume that what you get is a bunch of pairs of 
    245253    # atoms. 
    246     "multiple-conversion": (str, 0, 32, unsupported, _get_atom, None), 
     254    "multiple-conversion": (str, 0, 32, unsupported, _get_multiple, None), 
    247255    } 
    248256 
Note: See TracChangeset for help on using the changeset viewer.