hyprwm / Hyprland

Hyprland is a highly customizable dynamic tiling Wayland compositor that doesn't sacrifice on its looks.
https://hyprland.org
BSD 3-Clause "New" or "Revised" License
18.19k stars 757 forks source link

[XWAYLAND, Qt] Dolphin emulator issues #4483

Open TheSunCat opened 5 months ago

TheSunCat commented 5 months ago

Hyprland Version

System/Version info ```sh Hyprland, built from branch main at commit 3c964a9fdc220250a85b1c498e5b6fad9390272f dirty (keybinds: Add dispatcher for xmonad/qtile-style workspace switching (4439)). Date: Mon Jan 15 16:30:46 2024 Tag: v0.34.0-48-g3c964a9f flags: (if any) System Information: System name: Linux Node name: apg Release: 6.7.0-arch3-1 Version: #1 SMP PREEMPT_DYNAMIC Sat, 13 Jan 2024 14:37:14 +0000 GPU information: 03:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 23 [Radeon RX 6650 XT / 6700S / 6800S] [1002:73ef] (rev c2) (prog-if 00 [VGA controller]) 37:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Rembrandt [Radeon 680M] [1002:1681] (rev c7) (prog-if 00 [VGA controller]) os-release: NAME="Arch Linux" PRETTY_NAME="Arch Linux" ID=arch BUILD_ID=rolling ANSI_COLOR="38;2;23;147;209" HOME_URL="https://archlinux.org/" DOCUMENTATION_URL="https://wiki.archlinux.org/" SUPPORT_URL="https://bbs.archlinux.org/" BUG_REPORT_URL="https://bugs.archlinux.org/" PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/" LOGO=archlinux-logo plugins: hycov by DreamMaoMao ver 0.1 ```

Bug or Regression?

Bug

Description

Dolphin emulator, despite being a Qt application, still does not support Wayland as none of the pull requests have been merged and must be forced to run on Xwayland. This brings with it a lot of issues:

  1. The open file dialog has the wrong size and uses the X11 "X" cursor shape: image
  2. Cursor teleports back to center of modal when it is moved outside of a modal (like in Krita). This is especially annoying when trying to use combo boxes such as the device selection in the controller config.
  3. Resizing freezes. When resizing the window too fast, Hyprland can freeze for nearly 1 second, and then comes back.

None of these occur on an X11 session. I have Xwayland force_zero_scaling enabled.

How to reproduce

Install dolphin-emu package.

  1. Press the "open" button to observe
  2. Open the "Controllers" window, then click "Configure" on any controller. Move the mouse outside of the window.
  3. Resize the Dolphin main window back and forth until it happens.

Crash reports, logs, images, videos

Cursor teleporting:

[LOG] X11 Activate request for window [Window 6103f5716a60: title: "Wii Remote 1"]
[LOG] Searching for matching rules for dolphin-emu (title: Controller Settings)
[LOG] Set keyboard focus to surface 6103f570ece0, with [Window 6103f5716a60: title: "Wii Remote 1"]
[LOG] Searching for matching rules for dolphin-emu (title: Wii Remote 1)
[LOG] X11 Activate request for window [Window 6103f5716a60: title: "Wii Remote 1"]
[LOG] Callback 6103f4dcf778 -> 6103f4dcf770, CWLSurface removed.
[LOG] CWLSurface 6103f4dcf728 called destroy()
[LOG] Registered signal for owner 6103f4dcf728: 6103f4f0fca0 -> 6103f4dcf750 (owner: CWLSurface)
[LOG] CWLSurface 6103f4dcf728 called init()
[LOG] Callback 6103f4dcf778 -> 6103f4dcf770, CWLSurface removed.
[LOG] CWLSurface 6103f4dcf728 called destroy()
[LOG] Registered signal for owner 6103f4dcf728: 6103f4f0fca0 -> 6103f4dcf750 (owner: CWLSurface)
[LOG] CWLSurface 6103f4dcf728 called init()
[LOG] Callback 6103f4dcf778 -> 6103f4dcf770, CWLSurface removed.
[LOG] CWLSurface 6103f4dcf728 called destroy()
[LOG] Registered signal for owner 6103f4dcf728: 6103f4f0fca0 -> 6103f4dcf750 (owner: CWLSurface)
[LOG] CWLSurface 6103f4dcf728 called init()
[LOG] Callback 6103f4dcf778 -> 6103f4dcf770, CWLSurface removed.
[LOG] CWLSurface 6103f4dcf728 called destroy()
[LOG] Registered signal for owner 6103f4dcf728: 6103f4f0fca0 -> 6103f4dcf750 (owner: CWLSurface)
[LOG] CWLSurface 6103f4dcf728 called init()
[LOG] Searching for matching rules for dolphin-emu (title: Wii Remote 1)
[LOG] Set keyboard focus to surface 6103f50e3b70, with [Window 6103f5715470: title: "Controller Settings"]
[LOG] Searching for matching rules for dolphin-emu (title: Controller Settings)
[LOG] X11 Activate request for window [Window 6103f5716a60: title: "Wii Remote 1"]
[LOG] Searching for matching rules for dolphin-emu (title: Controller Settings)
[LOG] Set keyboard focus to surface 6103f570ece0, with [Window 6103f5716a60: title: "Wii Remote 1"]
[LOG] Searching for matching rules for dolphin-emu (title: Wii Remote 1)
[LOG] X11 Activate request for window [Window 6103f5716a60: title: "Wii Remote 1"]
[LOG] Callback 6103f4dcf778 -> 6103f4dcf770, CWLSurface removed.
[LOG] CWLSurface 6103f4dcf728 called destroy()
[LOG] Registered signal for owner 6103f4dcf728: 6103f4f0fca0 -> 6103f4dcf750 (owner: CWLSurface)
[LOG] CWLSurface 6103f4dcf728 called init()
[LOG] Callback 6103f4dcf778 -> 6103f4dcf770, CWLSurface removed.
[LOG] CWLSurface 6103f4dcf728 called destroy()
[LOG] Registered signal for owner 6103f4dcf728: 6103f4f0fca0 -> 6103f4dcf750 (owner: CWLSurface)
[LOG] CWLSurface 6103f4dcf728 called init()
[LOG] Callback 6103f4dcf778 -> 6103f4dcf770, CWLSurface removed.
[LOG] CWLSurface 6103f4dcf728 called destroy()
[LOG] Registered signal for owner 6103f4dcf728: 6103f4f0fca0 -> 6103f4dcf750 (owner: CWLSurface)
[LOG] CWLSurface 6103f4dcf728 called init()
[LOG] Callback 6103f4dcf778 -> 6103f4dcf770, CWLSurface removed.
[LOG] CWLSurface 6103f4dcf728 called destroy()
[LOG] Registered signal for owner 6103f4dcf728: 6103f4f0fca0 -> 6103f4dcf750 (owner: CWLSurface)
[LOG] CWLSurface 6103f4dcf728 called init()
[LOG] Callback 6103f4dcf778 -> 6103f4dcf770, CWLSurface removed.
[LOG] CWLSurface 6103f4dcf728 called destroy()
[LOG] Registered signal for owner 6103f4dcf728: 6103f4f0fca0 -> 6103f4dcf750 (owner: CWLSurface)
[LOG] CWLSurface 6103f4dcf728 called init()
[LOG] Searching for matching rules for dolphin-emu (title: Wii Remote 1)
killown commented 5 months ago

{ "address": "0x5646f563c480", "mapped": true, "hidden": false, "at": [2568, 571], "size": [624, 501], "workspace": { "id": 5, "name": "5" }, "floating": false, "monitor": 0, "class": "org.dolphin-emu.dolphin-emu", "title": "Dolphin 5.0.r20969.gd1b4c5482c", "initialClass": "org.dolphin-emu.dolphin-emu", "initialTitle": "Dolphin 5.0.r20969.gd1b4c5482c", "pid": 48435, "xwayland": false, "pinned": false, "fullscreen": false, "fullscreenMode": 0, "fakeFullscreen": false, "grouped": [], "swallowing": "0x0", "focusHistoryID": 2 }

I using without xwayland...

dolphin-emu-git 5.0.r20969.gd1b4c5482c-1, dialogs just work fine

TheSunCat commented 5 months ago

Are you using it with games? Dolphin Emulator does not support Wayland (the GUI works but it cannot init any backends) from what I have read and tested, so it must be run as Xwayland. You can force this by running Dolphin as WAYLAND_DISPLAY= dolphin-emu

killown commented 5 months ago

you are correct, I have the same issue as you described with xwayland and also the backend does not work with wayland

TheSunCat commented 4 months ago

Part 1 still repros when running Dolphin with QT_QPA_PLATFORM=xcb

Part 2 of this issue can be worked around by entirely disabling activation requests for Xwayland clients. This windowrule does it:

windowrulev2=suppressevent activate,xwayland:1

Part 3 no longer happens.

willswats commented 1 month ago

To add to this, after focus is lost on a dolphin game window, inputs stop being registered, however, if you turn on Render to Main Window in Graphics -> General, it fixes the issue. This issue also occurs with Gnome so it's not a Hyprland issue, just posting for anyone else who encounters the same issue.