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

Xterm Windows Disappear, but are still there and movable via xdotool. #543

Open
tyingq opened this issue Oct 28, 2021 · 2 comments
Open
Labels
bug Something isn't working window-management Window management issue

Comments

@tyingq
Copy link

tyingq commented Oct 28, 2021

Environment

Windows build number: 10.0.22483.0 Microsoft Windows NT 10.0.22483.0
Your Distribution version: Ubuntu 20.03
Your WSLg version: WSLg Preview 1.0.27

Steps to reproduce

My xterm windows move off screen, where I can't see them on the desktop. I don't know what makes this happen,
so I don't know how to reproduce it. They do still show up in the Windows desktop widget, but selecting there doesn't make them visible. I can manually use xdotool to get their id, and move them with the command line, like "xdotool windowmove [windowid] 30 30", and then they are visible again. How many move off screen seems unpredictable. Sometimes only 1 or 2 of the total go off screen, sometimes just 1, sometimes all of them.

They aren't under the taskbar either...I've enabled the "automatic dissappear", and that doesn't help.

For now, I'm resigned to a script that moves every window to position "30 30" so that they are all visible again.

Expected behavior

The system would not move any of my xterm windows off the visible area of the X11/Wayland display.

Actual behavior

For reasons I'm not sure of, xterm windows move off the visible display area, and can only be moved back with command line tools like xdotool.

@tyingq tyingq added the bug Something isn't working label Oct 28, 2021
@tyingq
Copy link
Author

tyingq commented Oct 28, 2021

The short script I'm using, in the meantime, if it's helpful for anyone else:

#!/usr/bin/bash
sx=30
sy=30
for window in $(xdotool search -name .)
do
   xdotool windowmove $window $sx $sy
   xdotool windowunmap $window
   xdotool windowmap $window
   sx=$(($sx + 40))
   sy=$(($sy + 40))
done

@tyingq tyingq changed the title Xterm Windows Disappear From the Visible Screen, but are still there and movable via xdotool. Xterm Windows Disappear, but are still there and movable via xdotool. Oct 28, 2021
@hideyukn88 hideyukn88 added the window-management Window management issue label Oct 29, 2021
@tyingq
Copy link
Author

tyingq commented Oct 29, 2021

Update. It happened again. It looks like Windows is somehow sliding it past the bottom edge of the display See below, my display is 1080 pixels high, but the top of window 0x60000d is at 1175 pixels. So somehow, it was pushed down too far.

$ xdotool getdisplaygeometry
1920 1080
$ xdotool getwindowgeometry 0x60000d
Window 6291469
  Position: 686,1175 (screen: 0)
  Geometry: 1204x652

Using "xdotool windowmove 0x60000d 686 1000" brings it back into view, and all is fine then.

Still no idea how/why windows get moved off the visible display. This is a laptop, with no extra monitor, just the built in one. I'm curious if it's some key combination I'm accidentally hitting, or just some internal math error. I think it might be happening when Windows goes into some kind of sleep mode, but the window disappearing doesn't happen often, so I don't remember.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working window-management Window management issue
Projects
None yet
Development

No branches or pull requests

2 participants