'Update the local copy of the window\'s WM_HINTS
See http://tronche.com/gui/x/icccm/sec-4.html#WM_HINTS'

def updateHints(self):

    try:
        h = self.window.get_wm_hints()
        normh = self.window.get_wm_normal_hints()
    except (xcffib.xproto.WindowError, xcffib.xproto.AccessError):
        return
    if normh:
        normh.pop('flags')
        normh['min_width'] = max(0, normh.get('min_width', 0))
        normh['min_height'] = max(0, normh.get('min_height', 0))
        if ((not normh['base_width']) and normh['min_width'] and normh['width_inc']):
            normh['base_width'] = (normh['min_width'] % normh['width_inc'])
        if ((not normh['base_height']) and normh['min_height'] and normh['height_inc']):
            normh['base_height'] = (normh['min_height'] % normh['height_inc'])
        self.hints.update(normh)
    if (h and ('UrgencyHint' in h['flags'])):
        if (self.qtile.currentWindow != self):
            self.hints['urgent'] = True
            hook.fire('client_urgent_hint_changed', self)
    elif self.urgent:
        self.hints['urgent'] = False
        hook.fire('client_urgent_hint_changed', self)
    if getattr(self, 'group', None):
        self.group.layoutAll()
    return
