Re: sawfish has lost a window - window is found with xdotool



Jeremy Hankins said:     (by the date of Mon, 25 Oct 2010 16:18:43 -0500)

> > Thanks a lot. I'll try that in few days, as soon as I can afford
> > restarting sawfish, risking loss of coordinates of few hundred windows
> > :) And risk losing about 1h putting them into their right positions.
> 
> Yeah....  But as I said, don't worry about it if sawfish can't even find
> the window given the X id.  Without a reference to the sawfish window
> info I don't know what to suggest.

> The only other avenue I can think of
> would be to try to figure out what conditions trigger the problem.
> Having lots and lots of windows is evidently one part, at least, but
> evidently not enough in itself if you ran fine for a while without the
> problem showing up.  Is this the first window that starts when you start
> sawfish?

One of the first few. They seem to appear in random order. So this
could be a 1st one as well as a 5th one. I recall long time ago there
was a problem with disappearing firefox windows and it was fixed.
Maybe this one is related.

Besides firefox I recall that at least once I lost some gnuplot
window, could be few months ago. But I was in too hurry to focus on
that.

> You could, for that matter, restart sawfish and see if it recognizes the
> window on restart.  As far as I know positions (other than tabbing,
> perhaps?) will be preserved.

I wanted to restart with newer version, but I had some compilation problems.
 
> If you have a way to trigger X events (e.g., refresh, or uniconify) that
> bypasses sawfish, you could try that as well.

... and so I tried using xdotool. And it worked!

I don't know exactly which command solved this, because I couldn't
get the window to appear on the screen, and lots of commands caused
xdotool to segfault. But after a while I checked with sawfish-client,
and the window was there! Also it appeared back in the window list,
and then - just by clicking on the window list - I had it back.

I am attaching the xterm session log, in case if it will give you any
hint.


Could we think of some lisp 'debug script' that scans xwininfo output
and compares it with windows known to sawfish - trying to detect those
that are no longer mapped? I know there are lots of windows that
aren't mapped at all, but if a window was mapped, and suddenly it is
not - then maybe it isn't normal.

-- 
Janek Kozicki                               http://janek.kozicki.pl/  |
janek atak:~$ xwininfo -id 0x3000024 -all

xwininfo: Window id: 0x3000024 "last"

  Root window id: 0x2a0 (the root window) (has no name)
  Parent window id: 0xc01020 (has no name)
     1 child:
     0x300002f (has no name): ()  574x199+0+0  +-22078+703

  Absolute upper-left X:  -22078
  Absolute upper-left Y:  703
  Relative upper-left X:  2
  Relative upper-left Y:  18
  Width: 574
  Height: 199
  Depth: 24
  Visual: 0x21
  Visual Class: TrueColor
  Border width: 0
  Class: InputOutput
  Colormap: 0x20 (installed)
  Bit Gravity State: NorthWestGravity
  Window Gravity State: StaticGravity
  Backing Store State: NotUseful
  Save Under State: no
  Map State: IsUnviewable
  Override Redirect State: no
  Corners:  +-22078+703  -26624+703  -26624-298  +-22078-298
  -geometry 95x15+-22080+685

  Bit gravity: NorthWestGravity
  Window gravity: StaticGravity
  Backing-store hint: NotUseful
  Backing-planes to be preserved: 0xffffffff
  Backing pixel: 0
  Save-unders: No

  Someone wants these events:
      KeyPress
      KeyRelease
      EnterWindow
      LeaveWindow
      VisibilityChange
      StructureNotify
      FocusChange
      PropertyChange
      ColormapChange
  Do not propagate these events:
  Override redirection?: No

  Window manager hints:
      Client accepts input or input focus: Yes
      Initial state is Normal State

  Normal window size hints:
      User supplied location: 3520, 685
      User supplied size: 574 by 199
      Program supplied size: 574 by 199
      Program supplied minimum size: 10 by 17
      Program supplied base size: 4 by 4
      Program supplied x resize increment: 6
      Program supplied y resize increment: 13
      User supplied size in resize increments:  95 by 15
      Program supplied size in resize increments:  95 by 15
      Program supplied minimum size in resize increments: 1 by 1
      Program supplied base size in resize increments:  0 by 0
      Program supplied window gravity: NorthWestGravity
  No zoom window size hints defined

  No window shape defined
  No border shape defined

janek atak:~$ xdotool search --name "last"
janek atak:~$ xdotool search --name "tsal"
janek atak:~$ xdotool getwindowfocus      
236978212
janek atak:~$ xdotool getwindowpid  
Usage: getwindowpid <window id>
janek atak:~$ xdotool getwindowpid 0x3000024
4377
janek atak:~$ pf last
janek     4377  0.0  0.0  61128  2052 ?        S    Sep28   0:07 xterm -geom 95x15+3520+685 -fg gray -bg black -T last -e watch -n25 last | grep -v -e "janek *pts/[0-9]* *:0.0"
janek     4387  0.0  0.0  10452   936 pts/3    Ss+  Sep28   1:05 watch -n25 last | grep -v -e "janek *pts/[0-9]* *:0.0"
janek     7593  0.0  0.0  60916  4224 ?        SN   Oct25   0:00 xterm -geom 95x15+3520+685 -fg gray -bg black -T tsal -e watch -n25 last | grep -v -e "janek *pts/[0-9]* *:0.0"
janek     7596  0.0  0.0  10452  1380 pts/48   SNs+ Oct25   0:00 watch -n25 last | grep -v -e "janek *pts/[0-9]* *:0.0"
janek    28605  0.0  0.0  11088  1288 pts/39   S+   00:53   0:00 /bin/bash /home/janek/bin/pf last
janek    28607  0.0  0.0   7976   732 pts/39   S+   00:53   0:00 fgrep last
janek atak:~$ xdotool behave focus 0x3000024
zsh: segmentation fault  xdotool behave focus 0x3000024
janek atak:~$ xdotool windowsize --sync 0x3000024 1000 1000
windowsize: unrecognized option '--sync'
Usage: windowsize [--usehints] windowid width height
--usehints  - Use window sizing hints (like characters in terminals)
janek atak:~$ xdotool windowsize 0x3000024 1000 1000 
janek atak:~$ xdotool windowmove 0x3000024 1000 1000
janek atak:~$ xwininfo -id 0x3000024 -all           

xwininfo: Window id: 0x3000024 "last"

  Root window id: 0x2a0 (the root window) (has no name)
  Parent window id: 0xc01020 (has no name)
     1 child:
     0x300002f (has no name): ()  1000x1000+0+0  +-21080+1685

  Absolute upper-left X:  -21080
  Absolute upper-left Y:  1685
  Relative upper-left X:  1000
  Relative upper-left Y:  1000
  Width: 1000
  Height: 1000
  Depth: 24
  Visual: 0x21
  Visual Class: TrueColor
  Border width: 0
  Class: InputOutput
  Colormap: 0x20 (installed)
  Bit Gravity State: NorthWestGravity
  Window Gravity State: StaticGravity
  Backing Store State: NotUseful
  Save Under State: no
  Map State: IsUnviewable
  Override Redirect State: no
  Corners:  +-21080+1685  -25200+1685  -25200--1485  +-21080--1485
  -geometry 166x76+-22080+685

  Bit gravity: NorthWestGravity
  Window gravity: StaticGravity
  Backing-store hint: NotUseful
  Backing-planes to be preserved: 0xffffffff
  Backing pixel: 0
  Save-unders: No

  Someone wants these events:
      KeyPress
      KeyRelease
      EnterWindow
      LeaveWindow
      VisibilityChange
      StructureNotify
      FocusChange
      PropertyChange
      ColormapChange
  Do not propagate these events:
  Override redirection?: No

  Window manager hints:
      Client accepts input or input focus: Yes
      Initial state is Normal State

  Normal window size hints:
      User supplied location: 3520, 685
      User supplied size: 574 by 199
      Program supplied size: 574 by 199
      Program supplied minimum size: 10 by 17
      Program supplied base size: 4 by 4
      Program supplied x resize increment: 6
      Program supplied y resize increment: 13
      User supplied size in resize increments:  95 by 15
      Program supplied size in resize increments:  95 by 15
      Program supplied minimum size in resize increments: 1 by 1
      Program supplied base size in resize increments:  0 by 0
      Program supplied window gravity: NorthWestGravity
  No zoom window size hints defined

  No window shape defined
  No border shape defined

janek atak:~$ xdotool windowmove 0x3000024 1000 1000
janek atak:~$ xwininfo -id 0x3000024                

xwininfo: Window id: 0x3000024 "last"

  Absolute upper-left X:  -21080
  Absolute upper-left Y:  1685
  Relative upper-left X:  1000
  Relative upper-left Y:  1000
  Width: 1000
  Height: 1000
  Depth: 24
  Visual: 0x21
  Visual Class: TrueColor
  Border width: 0
  Class: InputOutput
  Colormap: 0x20 (installed)
  Bit Gravity State: NorthWestGravity
  Window Gravity State: StaticGravity
  Backing Store State: NotUseful
  Save Under State: no
  Map State: IsUnviewable
  Override Redirect State: no
  Corners:  +-21080+1685  -25200+1685  -25200--1485  +-21080--1485
  -geometry 166x76+-22080+685

janek atak:~$ xdotool windowmove 0x3000024 1000 1000
janek atak:~$ xwininfo -id 0x3000024                

xwininfo: Window id: 0x3000024 "last"

  Absolute upper-left X:  -21080
  Absolute upper-left Y:  1685
  Relative upper-left X:  1000
  Relative upper-left Y:  1000
  Width: 1000
  Height: 1000
  Depth: 24
  Visual: 0x21
  Visual Class: TrueColor
  Border width: 0
  Class: InputOutput
  Colormap: 0x20 (installed)
  Bit Gravity State: NorthWestGravity
  Window Gravity State: StaticGravity
  Backing Store State: NotUseful
  Save Under State: no
  Map State: IsUnviewable
  Override Redirect State: no
  Corners:  +-21080+1685  -25200+1685  -25200--1485  +-21080--1485
  -geometry 166x76+-22080+685

janek atak:~$ xdotool windowmove 0x3000024 10000 1000
janek atak:~$ xwininfo -id 0x3000024                 

xwininfo: Window id: 0x3000024 "last"

  Absolute upper-left X:  -12080
  Absolute upper-left Y:  1685
  Relative upper-left X:  10000
  Relative upper-left Y:  1000
  Width: 1000
  Height: 1000
  Depth: 24
  Visual: 0x21
  Visual Class: TrueColor
  Border width: 0
  Class: InputOutput
  Colormap: 0x20 (installed)
  Bit Gravity State: NorthWestGravity
  Window Gravity State: StaticGravity
  Backing Store State: NotUseful
  Save Under State: no
  Map State: IsUnviewable
  Override Redirect State: no
  Corners:  +-12080+1685  -16200+1685  -16200--1485  +-12080--1485
  -geometry 166x76+-22080+685

janek atak:~$ xdotool windowmove 0x3000024 10000 1000
janek atak:~$ xwininfo -id 0x3000024                 

xwininfo: Window id: 0x3000024 "last"

  Absolute upper-left X:  -12080
  Absolute upper-left Y:  1685
  Relative upper-left X:  10000
  Relative upper-left Y:  1000
  Width: 1000
  Height: 1000
  Depth: 24
  Visual: 0x21
  Visual Class: TrueColor
  Border width: 0
  Class: InputOutput
  Colormap: 0x20 (installed)
  Bit Gravity State: NorthWestGravity
  Window Gravity State: StaticGravity
  Backing Store State: NotUseful
  Save Under State: no
  Map State: IsUnviewable
  Override Redirect State: no
  Corners:  +-12080+1685  -16200+1685  -16200--1485  +-12080--1485
  -geometry 166x76+-22080+685

janek atak:~$ xdotool windowmove 0x3000024 12000 1000
janek atak:~$ xwininfo -id 0x3000024                 

xwininfo: Window id: 0x3000024 "last"

  Absolute upper-left X:  -10080
  Absolute upper-left Y:  1685
  Relative upper-left X:  12000
  Relative upper-left Y:  1000
  Width: 1000
  Height: 1000
  Depth: 24
  Visual: 0x21
  Visual Class: TrueColor
  Border width: 0
  Class: InputOutput
  Colormap: 0x20 (installed)
  Bit Gravity State: NorthWestGravity
  Window Gravity State: StaticGravity
  Backing Store State: NotUseful
  Save Under State: no
  Map State: IsUnviewable
  Override Redirect State: no
  Corners:  +-10080+1685  -14200+1685  -14200--1485  +-10080--1485
  -geometry 166x76+-22080+685

janek atak:~$ xdotool windowmove 0x3000024 22000 1000
janek atak:~$ xwininfo -id 0x3000024                 

xwininfo: Window id: 0x3000024 "last"

  Absolute upper-left X:  -80
  Absolute upper-left Y:  1685
  Relative upper-left X:  22000
  Relative upper-left Y:  1000
  Width: 1000
  Height: 1000
  Depth: 24
  Visual: 0x21
  Visual Class: TrueColor
  Border width: 0
  Class: InputOutput
  Colormap: 0x20 (installed)
  Bit Gravity State: NorthWestGravity
  Window Gravity State: StaticGravity
  Backing Store State: NotUseful
  Save Under State: no
  Map State: IsUnviewable
  Override Redirect State: no
  Corners:  +-80+1685  -4200+1685  -4200--1485  +-80--1485
  -geometry 166x76+-22080+685

janek atak:~$ xdotool windowmove 0x3000024 23000 1000
janek atak:~$ xwininfo -id 0x3000024                 

xwininfo: Window id: 0x3000024 "last"

  Absolute upper-left X:  920
  Absolute upper-left Y:  1685
  Relative upper-left X:  23000
  Relative upper-left Y:  1000
  Width: 1000
  Height: 1000
  Depth: 24
  Visual: 0x21
  Visual Class: TrueColor
  Border width: 0
  Class: InputOutput
  Colormap: 0x20 (installed)
  Bit Gravity State: NorthWestGravity
  Window Gravity State: StaticGravity
  Backing Store State: NotUseful
  Save Under State: no
  Map State: IsUnviewable
  Override Redirect State: no
  Corners:  +920+1685  -3200+1685  -3200--1485  +920--1485
  -geometry 166x76+-22080+685

janek atak:~$ xwininfo -id 0x3000024                 

xwininfo: Window id: 0x3000024 "last"

  Absolute upper-left X:  920
  Absolute upper-left Y:  1685
  Relative upper-left X:  23000
  Relative upper-left Y:  1000
  Width: 1000
  Height: 1000
  Depth: 24
  Visual: 0x21
  Visual Class: TrueColor
  Border width: 0
  Class: InputOutput
  Colormap: 0x20 (installed)
  Bit Gravity State: NorthWestGravity
  Window Gravity State: StaticGravity
  Backing Store State: NotUseful
  Save Under State: no
  Map State: IsUnviewable
  Override Redirect State: no
  Corners:  +920+1685  -3200+1685  -3200--1485  +920--1485
  -geometry 166x76+-22080+685

janek atak:~$ xdotool windowmove 0x3000024 23000 1000
janek atak:~$ xwininfo -id 0x3000024                 

xwininfo: Window id: 0x3000024 "last"

  Absolute upper-left X:  920
  Absolute upper-left Y:  1685
  Relative upper-left X:  23000
  Relative upper-left Y:  1000
  Width: 1000
  Height: 1000
  Depth: 24
  Visual: 0x21
  Visual Class: TrueColor
  Border width: 0
  Class: InputOutput
  Colormap: 0x20 (installed)
  Bit Gravity State: NorthWestGravity
  Window Gravity State: StaticGravity
  Backing Store State: NotUseful
  Save Under State: no
  Map State: IsUnviewable
  Override Redirect State: no
  Corners:  +920+1685  -3200+1685  -3200--1485  +920--1485
  -geometry 166x76+-22080+685

janek atak:~$ xwininfo -id 0x3000024

xwininfo: Window id: 0x3000024 "last"

  Absolute upper-left X:  920
  Absolute upper-left Y:  1685
  Relative upper-left X:  23000
  Relative upper-left Y:  1000
  Width: 1000
  Height: 1000
  Depth: 24
  Visual: 0x21
  Visual Class: TrueColor
  Border width: 0
  Class: InputOutput
  Colormap: 0x20 (installed)
  Bit Gravity State: NorthWestGravity
  Window Gravity State: StaticGravity
  Backing Store State: NotUseful
  Save Under State: no
  Map State: IsUnviewable
  Override Redirect State: no
  Corners:  +920+1685  -3200+1685  -3200--1485  +920--1485
  -geometry 166x76+-22080+685

janek atak:~$ xdotool windowmove 0x3000024 0 0       
janek atak:~$ xwininfo -id 0x3000024          

xwininfo: Window id: 0x3000024 "last"

  Absolute upper-left X:  -22080
  Absolute upper-left Y:  685
  Relative upper-left X:  0
  Relative upper-left Y:  0
  Width: 1000
  Height: 1000
  Depth: 24
  Visual: 0x21
  Visual Class: TrueColor
  Border width: 0
  Class: InputOutput
  Colormap: 0x20 (installed)
  Bit Gravity State: NorthWestGravity
  Window Gravity State: StaticGravity
  Backing Store State: NotUseful
  Save Under State: no
  Map State: IsUnviewable
  Override Redirect State: no
  Corners:  +-22080+685  -26200+685  -26200--485  +-22080--485
  -geometry 166x76+-22080+685

janek atak:~$ xdotool map 0x3000024 --sync
zsh: segmentation fault  xdotool map 0x3000024 --sync
janek atak:~$ xdotool map 0x3000024       
zsh: segmentation fault  xdotool map 0x3000024
janek atak:~$ xdotool windowminimize 0x3000024
zsh: segmentation fault  xdotool windowminimize 0x3000024
janek atak:~$ xdotool windowraise 0x3000024
janek atak:~$ xdotool windowraise 0x3000024
janek atak:~$ xdotool map 0x3000024           
zsh: segmentation fault  xdotool map 0x3000024
janek atak:~$ xdotool windowunmap 0x3000024
janek atak:~$ xdotool map 0x3000024        
zsh: segmentation fault  xdotool map 0x3000024
janek atak:~$ xwininfo -id 0x3000024          

xwininfo: Window id: 0x3000024 "last"

  Absolute upper-left X:  -22080
  Absolute upper-left Y:  685
  Relative upper-left X:  0
  Relative upper-left Y:  0
  Width: 1000
  Height: 1000
  Depth: 24
  Visual: 0x21
  Visual Class: TrueColor
  Border width: 0
  Class: InputOutput
  Colormap: 0x20 (installed)
  Bit Gravity State: NorthWestGravity
  Window Gravity State: StaticGravity
  Backing Store State: NotUseful
  Save Under State: no
  Map State: IsUnMapped
  Override Redirect State: no
  Corners:  +-22080+685  -26200+685  -26200--485  +-22080--485
  -geometry 166x76+-22080+685

janek atak:~$ xdotool windowmove 0x3000024 23000 1000
janek atak:~$ xdotool windowmap 0x3000024        
janek atak:~$ xdotool map 0x3000024 
zsh: segmentation fault  xdotool map 0x3000024
janek atak:~$ xdotool windowmap 0x3000024
janek atak:~$ xdotool map 0x3000024      
zsh: segmentation fault  xdotool map 0x3000024
janek atak:~$ xwininfo -id 0x3000024     

xwininfo: Window id: 0x3000024 "last"

  Absolute upper-left X:  3522
  Absolute upper-left Y:  -2897
  Relative upper-left X:  2
  Relative upper-left Y:  18
  Width: 574
  Height: 199
  Depth: 24
  Visual: 0x21
  Visual Class: TrueColor
  Border width: 0
  Class: InputOutput
  Colormap: 0x20 (installed)
  Bit Gravity State: NorthWestGravity
  Window Gravity State: StaticGravity
  Backing Store State: NotUseful
  Save Under State: no
  Map State: IsViewable
  Override Redirect State: no
  Corners:  +3522+-2897  -1024+-2897  -1024-3898  +3522-3898
  -geometry 95x15+3520+-2915

janek atak:~$ sawfish-client 
sawfish 1.6.3.1, Copyright (C) 1999-2000 John Harper
sawfish comes with ABSOLUTELY NO WARRANTY; for details see the file COPYING

Enter `,help' to list commands.
user> (get-window-by-id 0x3000024)
#<window 3000024>
user> %                                                                                                                    janek atak:~$ 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]