Giter Site home page Giter Site logo

Comments (3)

LGUG2Z avatar LGUG2Z commented on September 7, 2024

Repro'd by myself and @raggi earlier this week, but I can't remember if this was fixed on master or not yet.

from komorebi.

raggi avatar raggi commented on September 7, 2024

I believe this is #758

I think the root cause is that now that we're sending ObjectDestroy messages down into process_event now - previously they would error in should_manage, which prevented any of those messages to be passed in at all (relying on reap to cleanup instead). This then raised a pre-existing but not-exercised bug where ObjectDestroy assumes that the object being destroyed is always in the "focsued workspace" / "focused container", which isn't always the case.

This is essentially a whole class of bug around event processing using focused_* to route events. Another example in this class is the "invisible windows still affecting layout", like Discord frequently triggers. (Repro for discord is: open discord, focus another window in another workspace, hit the X on discord without focusing it - Komorebi won't correctly understand what changed, resulting a few different kinds of issue). Another class of this bug is: Open an unmanaged window, e.g. WhatsApp (without extra app definitions), which is layered and ignored. Focus a managed window, then drag whatsapp by title - the managed window will get moved when the drag completes.

As a broad stroke we need to move away from "focused_*" for workspace/containers in event processing, instead we need to look at WindowsApi::foreground_window to get an HWND (which requires retries sometimes if the foreground window is mid-switch), then hunt for that HWND in the containers to perform container modifications. The general notion of "focused container" needs to be kept in sync with WindowsApi::foreground_window (most events will need to check this for result - even ObjectFocus - as I've seen ObjectFocus,SystemForeground come in pointing at the wrong window (e.g. the stackbar windows create these, but never get focused/activated, and when those events arrive WindowsApi::foreground_window shows a different window being focused)). The notion of a focused container will then only be used to implement commands, and never to target or originate externally generated mutations (window drags, alt-tabs, click-to-focus changes, etc).

from komorebi.

LGUG2Z avatar LGUG2Z commented on September 7, 2024

Closing as a dupe, will track work on #758

from komorebi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.