Things Are Weird in The Penguin World
While continuing the setup of my Linux machine, I've encountered an intriguing issue with the window management script I'm creating.
Specifically, after hiding a Vesktop or Discord window, the very next click would unexpectedly bring a Cursor window to the front. Regarding Discord, it typically minimizes to the tray but also forces its window to appear on the taskbar unless KWin's window management rules are explicitly set to always hide it. This unusual behavior might explain Discord's involvement in triggering the issue.
Upon further analysis, I discovered this focus-stealing also occurs after closing an SMPlayer window with the Alt+X shortcut (which I use for convenience, mimicking MPC-HC). For SMPlayer, the cause remains unclear, though I wonder if it relates to how it interfaces with its underlying multimedia engine, MPV. Interestingly, this behavior does not happen when I have only a single Cursor window open.
Furthermore, even when KWin is configured to prevent Cursor from stealing focus, it clearly demands attention—indicated by a glowing button on the taskbar. What's more concerning is that even without gaining activation, sometimes the code within Cursor gets modified, seemingly receiving some of my inputs, often the contents of the clipboard I was attempting to paste.
I have yet to pinpoint the root cause, but the issue is becoming increasingly complex and fascinating.
EDIT:
adding --enable-features=UseOzonePlatform --ozone-platform=wayland to the command launching Cursor helped! But that required multiple brainstorming sessions with various LLM with access to web search, yay I guess?
EDIT2:
so yeah, I already know why it doesn't run on Wayland by default: the text rendering is abysmally bad! luckily disabling hardware acceleration helps, but that shouldn't be necessary to get things working