On 10/30/2022 8:21 AM, Jon Turney wrote:
On 14/10/2022 16:58, Eliot Moss wrote:
Dear Cygwiners -
I am having an issue under Windows 11 where new windows, when spawned from the command line of
(say) Cygwin bash or WSL2 bash come up *behind* current Windows. This behavior seems new to
Windows 11. Anybody know a setting or technique to control / change this? Two examples:
- Spawn Word from Cygwin bash
- Spawn okular from WSL 2
If I spawn xterm from Cygwin bash, it comes up in front, but from WSL2 bash, it comes up behind.
My X server is the Cygwin one. Happy to provide more details if this is not enough.
I have seen something like this on occasion with windows created by the Cygwin X server, but that
seems to be associated with having "focus follows mouse" mode turned on.
I'm not sure if that os some problem in the way that the X server manages the Z-order of it's
windows, or something about the way that the X server creates windows interacting with any 'focus
stealing prevention' heuristic that windows has (See 'ForegroundLockTimeout').
Your first example doesn't seem to involve X at all, so I guess that points towards the second
theory...
Thank you, Jon! I did a little more digging and found that following these
instructions to turn on Windows "Prevent windows from being automatically
arranged when moved to the edge of the screen" stopped X windows from starting
behind the window of the command that spawned them:
Go to "Control Panel".
Select "Ease of Access".
Select "Change how your mouse works".
Enable the checkbox: "Prevent windows from being automatically arranged when
moved to the edge of the screen."
It does not seem to change the "new window comes up behind Cygwin xterm bash"
for new windows that are Windows programs as opposed to X programs. I wonder
if this could have anything to do with how Cygwin deals with spawning
non-Cygwin programs ...
Best - Eliot
--
Problem reports: https://cygwin.com/problems.html
FAQ: https://cygwin.com/faq/
Documentation: https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple