Skip to content

Window Focus issues with recent Sway versions (Regression?) #8912

@LirionTen

Description

@LirionTen
  • Sway Version:
    1.11

  • Debug Log:

    • Run sway -d 2> ~/sway.log from a TTY and upload it to a pastebin, such as gist.github.com.

I did and OOM-killer killed chromium and I lost all the incognito tabs. Thanks for that.

  • Configuration File:
    repro provided, but focus_follows_mouse no if it matters

  • Stack Trace:
    repro provided

  • Description:

TL;DR: when I have obsidian open side-by-side with another application (call her FOO), if the FOO window has focus, and I merely hover the mouse over the obsidian window, it shows a blinking cursor as if it received focus, but key strokes go to another window.

Update: this also depends on what's running in the other window. chromium, gvim, and my terminal all exhibit this behaviour. Curiously, the blinking cursor doesn't happen when the window focus is on mupdf-gl (which uses freeglut for windowing).

I've opened a bug report on Obsidian forum, and users of other desktops can't reproduce it (Gnome/KDE/other wayland) . So I don't think it's an obsidian issue (neither does the obsidian forum)

and..... I've sporadically have been other issues with window focus in sway, but so far only as heizen-glitches I couldn't pin down. It began within the last year or so (not sure), so I suspect a regression introduced in a recent version.

The triggering scenario usually involves chromium side by side with another window, and switching in and out of full-screen on youtube. I end up in a state where one window shows a red title bar (indicating focus), but the keyboard input actually goes to another windows. Clicking on the window with focus doesn't do anything, keystrokes keep going to the other window. I have to click on another window to change focus, than click on FOO again, and only then is its shiny red title bar telling the truth when it implies that that keystrokes will actually go to FOO. But, I've been unable to reproduce this scenario reliably, but it's happened a dozen times over several months.

Since I can 100% reliably reproduce this similar glitch with the Obsidian appimage, I'm hoping devs will be able to as well, and that it'll boil down to the same bug.

Link to Obsidian Appimage (150MB-ish) . A new version just came out, but I've been using 1.9.12 so let's stick to that.

Cool moving graphics:
Image
GVim on left, obsidian on right.

Showing:

  1. Switching focus from one window to another.
  2. How the blinking cursor in obsidian reacts to hovers, even when the focus is on another windows
  3. keystrokes go to the focused window, not to obsidian - even though sway is somehow telling obsidian that it has focus.

Related #8919
Related #6967 (Thanks @Wielding)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugNot working as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions