Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xdotool selectwindow returns invalid windowid #20

Open
aspiers opened this issue Mar 9, 2013 · 3 comments
Open

xdotool selectwindow returns invalid windowid #20

aspiers opened this issue Mar 9, 2013 · 3 comments

Comments

@aspiers
Copy link

aspiers commented Mar 9, 2013

(Originally reported as issue 71 on code.google.com)

If I run xdotool selectwindow and click on the currently focussed urxvt window, it returns 83892796. However xdotool getwindowfocus and xdotool getactivewindow both return 81788939, as does xdotool search --class urxvt.

If I suffix these commands with getwindowname then the first one returns a blank line and the others all return 0:6:pac - "adam@pacific".

This is on openSUSE 12.2 with the latest version from github. If I use the 20110530 release, it's the same except that xdotool selectwindow also returns the following:

findclient: 83892797
findclient: 83892796
@jordansissel
Copy link
Owner

select_window takes the window you clicked on and tries to find the "client" window using a similar (or the same?) technique as xwininfo and xprop., iirc.

getwindowfocus should use the same method.

Both take the window given and search up the window tree for the first parent window with a WM_STATE property set on it.

Hmm...

@AlisterH
Copy link

AlisterH commented Aug 20, 2023

Same issue here:

#  xdotool getactivewindow
41943049
#  xdotool getactivewindow -- getwindowname
urxvt
#  xdotool selectwindow
8389062
# printf "%x" 8389062; echo ""
8001c6
#  xwininfo -tree -root|grep 8001c6 -A 62
     0x8001c6 (has no name): ()  1360x767+0+1  +0+1
        24 children:
        0x2800009 "urxvt": ("urxvt" "URxvt")  1360x737+0+30  +0+31
           2 children:
           0x2800010 (has no name): ()  12x737+1348+0  +1348+31
           0x280000e (has no name): ()  1344x731+2+2  +2+33
        0x8001f2 (has no name): ()  26x1+409+410  +409+411
        0x8001f1 (has no name): ()  1x1+0+0  +0+1
        0x8001f0 (has no name): ()  1x25+435+386  +435+387
        0x8001ef (has no name): ()  26x1+1+410  +1+411
        0x8001ee (has no name): ()  1x1+0+0  +0+1
        0x8001ed (has no name): ()  1x25+0+386  +0+387
        0x8001ec (has no name): ()  382x1+27+410  +27+411
        0x8001eb (has no name): ()  1x1+0+0  +0+1
        0x8001e6 (has no name): ()  1x1+0+0  +0+1
           4 children:
           0x8001ea (has no name): ()  1x1+0+0  +0+1
           0x8001e9 (has no name): ()  1x1+0+0  +0+1
           0x8001e8 (has no name): ()  1x1+0+0  +0+1
           0x8001e7 (has no name): ()  1x1+0+0  +0+1
        0x8001de (has no name): ()  1x361+435+26  +435+27
        0x8001dd (has no name): ()  1x361+0+26  +0+27
        0x8001d7 (has no name): ()  1360x1+0+29  +0+30
        0x8001d6 (has no name): ()  1x25+435+1  +435+2
        0x8001d5 (has no name): ()  26x1+1334+0  +1334+1
        0x8001d4 (has no name): ()  26x1+0+0  +0+1
        0x8001d3 (has no name): ()  1310x1+26+0  +26+1
        0x8001d2 (has no name): ()  1x25+0+1  +0+2
        0x8001d1 (has no name): ()  1360x28+0+1  +0+2
           12 children:
           0x8001e5 (has no name): ()  22x22+1285+3  +1285+5
           0x8001e4 (has no name): ()  24x24+3+2  +3+4
           0x8001e3 (has no name): ()  22x22+0+0  +0+2
           0x8001e2 (has no name): ()  22x22+30+3  +30+5
           0x8001e1 (has no name): ()  22x22+1335+3  +1335+5
           0x8001e0 (has no name): ()  22x22+1310+3  +1310+5
           0x8001df (has no name): ()  1227x24+55+2  +55+4
           0x8001dc (has no name): ()  3x28+431+0  +431+2
           0x8001db (has no name): ()  25x3+409+0  +409+2
           0x8001da (has no name): ()  3x28+0+0  +0+2
           0x8001d9 (has no name): ()  25x3+0+0  +0+2
           0x8001d8 (has no name): ()  384x3+25+0  +25+2
        0x8001cc (has no name): ()  434x1+1+409  +1+410
           2 children:
           0x8001ce (has no name): ()  26x1+408+0  +409+410
           0x8001cd (has no name): ()  26x1+0+0  +1+410
        0x8001cb (has no name): ()  1x378+434+31  +434+32
           1 child:
           0x8001d0 (has no name): ()  1x23+0+355  +434+387
        0x8001ca (has no name): ()  1360x1+0+29  +0+30
        0x8001c9 (has no name): ()  1x378+1+31  +1+32
           1 child:
           0x8001cf (has no name): ()  1x23+0+355  +1+387
        0x8001c7 (has no name): ()  1360x737+0+30  +0+31
           1 child:
           0x8001c8 (has no name): ()  1360x737+0+0  +0+31
     0x802acc (has no name): ()  1360x767+0+1  +0+1
        24 children:
        0x1a0006c "bash scripting - how to grep and print the next N lines after the hit? - Super User - Google Chrome": ("google-chrome (/home/spot/.config/chrome)" "Google-chrome")  1360x767+0+0  +0+1
        0x802af8 (has no name): ()  1x1+0+0  +0+1
        0x802af7 (has no name): ()  1x1+0+0  +0+1
        0x802af6 (has no name): ()  1x1+0+0  +0+1
        0x802af5 (has no name): ()  1x1+0+0  +0+1
# printf "%x" 8399564; echo ""
802acc

@AlisterH
Copy link

Is it something different about our X11, or how it is run?
I am in Fatdog Linux (810).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants