def findall_window_ids(pattern):
        """
        CommandLine:
            wmctrl  -l
            python -m utool.util_ubuntu XCtrl.findall_window_ids gvim --src
            python -m utool.util_ubuntu XCtrl.findall_window_ids gvim --src
            python -m utool.util_ubuntu XCtrl.findall_window_ids joncrall --src

        xprop -id

        wmctrl -l | awk '{print $1}' | xprop -id

        0x00a00007 | grep "WM_CLASS(STRING)"

        """
        import utool as ut
        cmdkw = dict(verbose=False, quiet=True, silence=True)
        command = "wmctrl -lx | grep '%s' | awk '{print $1}'" % (pattern,)
        # print(command)
        winid_list = ut.cmd(command, **cmdkw)[0].strip().split('\n')
        winid_list = [h for h in winid_list if h]
        winid_list = [int(h, 16) for h in winid_list]
        return winid_list