microsoft / WSL

Issues found on WSL
https://docs.microsoft.com/windows/wsl
MIT License
17.48k stars 822 forks source link

Emacs (X11) windows focus functions don't work #12172

Open deadcombo opened 1 month ago

deadcombo commented 1 month ago

Windows Version

Microsoft Windows [Version 10.0.22635.4300]

WSL Version

2.3.24.0 (GitHub)

Are you using WSL 1 or WSL 2?

Kernel Version

5.15.153.1-2

Distro Version

Arch Linux

Other Software

GNU Emacs 31.0.50 (build 3, x86_64-pc-linux-gnu, GTK+ Version 3.24.43, cairo version 1.18.2) of 2024-09-26

Repro Steps

emacsclient -e  "(raise-frame)"
emacsclient -e  "(x-focus-frame nil)"
emacsclient -e  "(select-frame-set-input-focus (selected-frame))"
emacsclient -e  "(other-frame 0)"

Expected Behavior

The window gains focus and comes to the forefront of the window stack.

Actual Behavior

These functions return nil (success) but have no result, the window remains as is, in the background.

Diagnostic Logs

https://github.com/user-attachments/files/17393632/WslLogs-2024-10-16_11-54-13.zip

github-actions[bot] commented 1 month ago

Logs are required for review from WSL team

If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'. Otherwise please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.

How to collect WSL logs Download and execute [collect-wsl-logs.ps1](https://github.com/Microsoft/WSL/blob/master/diagnostics/collect-wsl-logs.ps1) in an **administrative powershell prompt**: ``` Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1 Set-ExecutionPolicy Bypass -Scope Process -Force .\collect-wsl-logs.ps1 ``` The script will output the path of the log file once done. If this is a networking issue, please use [collect-networking-logs.ps1](https://github.com/Microsoft/WSL/blob/master/diagnostics/collect-networking-logs.ps1), following the instructions [here](https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#collect-wsl-logs-for-networking-issues) Once completed please upload the output files to this Github issue. [Click here for more info on logging](https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#8-collect-wsl-logs-recommended-method) If you choose to email these logs instead of attaching to the bug, please send them to wsl-gh-logs@microsoft.com with the number of the github issue in the subject, and in the message a link to your comment in the github issue and reply with '/emailed-logs'.
deadcombo commented 1 month ago

WslLogs-2024-10-16_11-54-13.zip

github-actions[bot] commented 1 month ago
Diagnostic information ``` .wslconfig found Detected appx version: 2.3.24.0 ```
github-actions[bot] commented 1 month ago
Diagnostic information ``` Issue was edited and new log file was found: https://github.com/user-attachments/files/17393632/WslLogs-2024-10-16_11-54-13.zip .wslconfig found Detected appx version: 2.3.24.0 ```