Giter VIP home page Giter VIP logo

Comments (4)

esjeon avatar esjeon commented on May 26, 2024

Okay, I figured out the source of the problem.

Surprise, surprise. KWin script is invoked concurrently, causing race conditions. Here's what exactly happened:

  1. Minimizing the master fires client.minimizeChanged signal, which causes full rearrangement of all tiles.
  2. During the rearrangement of screen 0, the slave is resized and move. Due to the order of operations (resize->move), the slave temporarily invades screen 1 (Of course, this depends on monitor configuration).
  3. KWin thinks the slave is move to screen 1, and fires client.screenChanged signal concurrently. This causes another full rearrangement being performed concurrently, and, for some reason, the first rearrangement is effectively suspended.
  4. The second rearrangement tiles the slave to screen 1, and completes.
  5. The first rearrangement continues to screen 1, tiles the slave again, and completes.

Preventing the race condition did fix the problem, but I think I should find a better solution than adding an arbitrary flag.

from krohnkite.

esjeon avatar esjeon commented on May 26, 2024

I pushed a fix 87d9683. Instead of tackling with race condition, I could suppress it once for all. This will also prevent windows being randomly thrown into another screen.

I did test this in multi-head VM, but would you check if it indeed works?

from krohnkite.

alexjp avatar alexjp commented on May 26, 2024

I haven't done extensive testing yet, but doing simple 2 windows setups with minimizing the master, it doesn't move windows, in both monitors.

Seems good :) Thanks for your awesome work !

from krohnkite.

esjeon avatar esjeon commented on May 26, 2024

Okay, thanks. Closing now.

from krohnkite.

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.