public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* New Windows open behind current ones rather than in front
@ 2022-10-14 15:58 Eliot Moss
  2022-10-30 12:21 ` Jon Turney
  0 siblings, 1 reply; 3+ messages in thread
From: Eliot Moss @ 2022-10-14 15:58 UTC (permalink / raw)
  To: cygwin

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.

Best - Eliot Moss

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: New Windows open behind current ones rather than in front
  2022-10-14 15:58 New Windows open behind current ones rather than in front Eliot Moss
@ 2022-10-30 12:21 ` Jon Turney
  2022-10-30 18:35   ` Eliot Moss
  0 siblings, 1 reply; 3+ messages in thread
From: Jon Turney @ 2022-10-30 12:21 UTC (permalink / raw)
  To: moss, The Cygwin Mailing List

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...


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: New Windows open behind current ones rather than in front
  2022-10-30 12:21 ` Jon Turney
@ 2022-10-30 18:35   ` Eliot Moss
  0 siblings, 0 replies; 3+ messages in thread
From: Eliot Moss @ 2022-10-30 18:35 UTC (permalink / raw)
  To: Jon Turney, The Cygwin Mailing List

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-10-30 18:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-14 15:58 New Windows open behind current ones rather than in front Eliot Moss
2022-10-30 12:21 ` Jon Turney
2022-10-30 18:35   ` Eliot Moss

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).