microsoft / wslg

Enabling the Windows Subsystem for Linux to include support for Wayland and X server related scenarios
MIT License
9.9k stars 296 forks source link

Broken UI theme in Qt App KTouch with Windows 10/11 + WSL2 + WSLg #1164

Closed vivi90 closed 5 months ago

vivi90 commented 6 months ago

Windows build number:

22621.1344

Your Distribution version:

22.04

Your WSL versions:

WSL-Version: 2.0.9.0 Kernelversion: 5.15.133.1-1 WSLg-Version: 1.0.59 MSRDC-Version: 1.2.4677

Note: After updating WSL to v2.0.14, nothing changed.

Steps to reproduce:

  1. Installed WSL2 the manual way as described in the documentation: https://learn.microsoft.com/en-us/windows/wsl/install-manual
  2. Created my credentials: https://learn.microsoft.com/de-de/windows/wsl/setup/environment#set-up-your-linux-username-and-password
  3. Updated my ubuntu according to: https://ubuntu.com/tutorials/install-ubuntu-on-wsl2-on-windows-11-with-gui-support#4-configure-ubuntu
  4. Run
      ktouch

Later also updated WSL and WSLg the automated way via wsl --update. Updated successfully but nothing changed.

WSL logs:

stdout

user@pc:~$ ktouch
qCoreApp Application(0x7ffcec6eed70)
Fetched layout groups from X server:    layouts: ("us")         variants: ("")
Fetched layout groups from X server:    layouts: ("us")         variants: ("")
qrc:/ktouch/qml/main.qml:118:9: QML HomeScreen: Binding loop detected for property "activeKeyboardLayoutName"
kf.i18n: "0 instead of 1 arguments to message {Do you really want t...} supplied before conversion."
Fetched layout groups from X server:    layouts: ("us")         variants: ("")
qrc:/ktouch/qml/trainingscreen/TrainingScreenToolbar.qml:42:5: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
qrc:/ktouch/qml/homescreen/HomeScreen.qml:22:5: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
Fetched layout groups from X server:    layouts: ("us")         variants: ("")
Qt Quick Layouts: Detected recursive rearrange. Aborting after two iterations.
Qt Quick Layouts: Detected recursive rearrange. Aborting after two iterations.
Qt Quick Layouts: Detected recursive rearrange. Aborting after two iterations.
Qt Quick Layouts: Detected recursive rearrange. Aborting after two iterations.
Qt Quick Layouts: Detected recursive rearrange. Aborting after two iterations.
Qt Quick Layouts: Detected recursive rearrange. Aborting after two iterations.
Qt Quick Layouts: Detected recursive rearrange. Aborting after two iterations.
Qt Quick Layouts: Detected recursive rearrange. Aborting after two iterations.
Qt Quick Layouts: Detected recursive rearrange. Aborting after two iterations.
Qt Quick Layouts: Detected recursive rearrange. Aborting after two iterations.
Qt Quick Layouts: Detected recursive rearrange. Aborting after two iterations.
Qt Quick Layouts: Detected recursive rearrange. Aborting after two iterations.
qrc:/ktouch/qml/main.qml:40: TypeError: Cannot read property 'keyboardLayoutName' of null
qrc:/ktouch/qml/homescreen/KeyboardLayoutMismatchMessage.qml:64: TypeError: Cannot read property 'keyboardKCMAvailable' of null
qrc:/ktouch/qml/homescreen/CourseSelector.qml:83: TypeError: Cannot read property 'globalDataIndex' of null
qrc:/ktouch/qml/main.qml:54: TypeError: Cannot read property 'globalDataIndex' of null
qrc:/ktouch/qml/main.qml:41: TypeError: Cannot read property 'globalDataIndex' of null
qrc:/ktouch/qml/main.qml:42: TypeError: Cannot read property 'globalDataIndex' of null

Note: On Windows 10 + WSL2 + VcXsrv Windows X Server i get the same error messages and using the same version of KTouch. But there it works.

weston

user@pc:~$ cat /mnt/wslg/weston.log
...
[12:50:23.881] xfixes selection notify event: owner 2097153
[12:50:23.881] our window, skipping
[12:50:23.881] xfixes selection notify event: owner 2097153
[12:50:23.881] our window, skipping
[12:50:55.622] xfixes selection notify event: owner 2097153
[12:50:55.623] our window, skipping
[12:51:54.375] rdp_rail_notify_app_list(): rdp_peer 0x55e1b2439f20
[12:51:54.375]     inSync: 0
[12:51:54.375]     syncStart: 0
[12:51:54.375]     syncEnd: 0
[12:51:54.375]     newAppId: 0
[12:51:54.375]     deleteAppId: 0
[12:51:54.375]     deleteAppProvider: 0
[12:51:54.375]     associateWindowId: 1
[12:51:54.375]     appId: ktouch
[12:51:54.375]     appGroup: (null)
[12:51:54.375]     appExecPath: ktouch
[12:51:54.375]     appWorkingDir: (null)
[12:51:54.375]     appDesc: KTouch (Ubuntu)
[12:51:54.375]     appIcon: (nil)
[12:51:54.375]     appProvider: (null)
[12:51:54.375]     appWindowId: 0xe
[12:51:54.375] Client: ClientGetAppidReq: pid:571 appId:ktouch WindowId:0xe
[12:52:43.218] rdp_rail_notify_app_list(): rdp_peer 0x55e1b2439f20
[12:52:43.218]     inSync: 0
[12:52:43.218]     syncStart: 0
[12:52:43.218]     syncEnd: 0
[12:52:43.218]     newAppId: 0
[12:52:43.218]     deleteAppId: 0
[12:52:43.218]     deleteAppProvider: 0
[12:52:43.218]     associateWindowId: 1
[12:52:43.218]     appId: ktouch
[12:52:43.218]     appGroup: (null)
[12:52:43.218]     appExecPath: ktouch
[12:52:43.218]     appWorkingDir: (null)
[12:52:43.218]     appDesc: KTouch (Ubuntu)
[12:52:43.218]     appIcon: (nil)
[12:52:43.218]     appProvider: (null)
[12:52:43.218]     appWindowId: 0xf
[12:52:43.219] Client: ClientGetAppidReq: pid:584 appId:ktouch WindowId:0xf
[12:52:46.771] Client: ClientGetAppidReq: WindowId:0x10 does not have appId, or not top level window.
[12:52:47.533] Client: ClientGetAppidReq: WindowId:0x11 does not have appId, or not top level window.
[12:52:50.086] set_position_from_xwayland: XWM 2927, 1480; geometry 32, 32; view 2895, 1448
[12:52:50.134] rdp_rail_notify_app_list(): rdp_peer 0x55e1b2439f20
[12:52:50.134]     inSync: 0
[12:52:50.134]     syncStart: 0
[12:52:50.134]     syncEnd: 0
[12:52:50.134]     newAppId: 0
[12:52:50.134]     deleteAppId: 0
[12:52:50.134]     deleteAppProvider: 0
[12:52:50.134]     associateWindowId: 1
[12:52:50.134]     appId: ktouch
[12:52:50.134]     appGroup: (null)
[12:52:50.134]     appExecPath: ktouch
[12:52:50.134]     appWorkingDir: (null)
[12:52:50.134]     appDesc: KTouch (Ubuntu)
[12:52:50.134]     appIcon: (nil)
[12:52:50.134]     appProvider: (null)
[12:52:50.134]     appWindowId: 0x12
[12:52:50.134] Client: ClientGetAppidReq: pid:584 appId:ktouch WindowId:0x12
[12:53:09.043] xfixes selection notify event: owner 2097153
[12:53:09.043] our window, skipping
[12:53:09.044] selection request, CLIPBOARD, target TARGETS, property _QT_SELECTION
[12:53:09.044] xfixes selection notify event: owner 2097153
[12:53:09.044] our window, skipping
[12:53:09.046] selection request, CLIPBOARD, target TARGETS, property _QT_SELECTION
[12:53:09.047] xfixes selection notify event: owner 2097153
[12:53:09.047] our window, skipping
[12:53:09.048] selection request, CLIPBOARD, target TARGETS, property _QT_SELECTION
[12:53:48.666] xfixes selection notify event: owner 2097153
[12:53:48.666] our window, skipping
[12:53:48.666]

RDP clipboard_data_source_send new (0x7f8944000ac0:published:fd 96) vs prev (0x7f8944000c20:cancel pending:fd 95): outstanding RDP data request (client to server)

[12:53:48.667] xfixes selection notify event: owner 2097153
[12:53:48.667] our window, skipping

WSL dumps:

No dumps found.

Expected behavior:

I expect the following GUI look (on native Manjaro): KTouch on Manjaro

On Windows 10 + WSL2 + VcXsrv Windows X Server it looks also as expected.

Actual behavior:

On Windows 11 + WSL2 + WSLg it looks this way: KTouch on Windows 11

Note: The Qt App qtcreator works as expected.

vivi90 commented 5 months ago

The issue happens not only on Windows 11. Also experienced it on Windows 10 Pro (22H2 Build 19045.3930)

After updating there to the latest pre-release (2.1.0) by running wsl --update --pre-release, it works.

PS C:\Users\User> wsl --version
WSL-Version: 2.1.0.0
Kernelversion: 5.15.137.3-1
WSLg-Version: 1.0.59
MSRDC-Version: 1.2.4677
Direct3D-Version: 1.611.1-81528511
DXCore-Version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows-Version: 10.0.19045.3930