Git Product home page Git Product logo

Comments (14)

tudurom avatar tudurom commented on July 17, 2024

I just realized that I used the wrong command in the recording.

Nevertheless, running wmv -a 0 0 $(pfw) moves the window after 3 tries.

from core.

laserswald avatar laserswald commented on July 17, 2024

It's not just those three programs. I've seen erratic behavior with wtf as well. Since those four are pretty much the linchpin of my workflow, and the difficulty of diagnosing problems with wmutils itself, I haven't been able to drill down enough to get a more detailed list of malfunctioning programs.

from core.

dcat avatar dcat commented on July 17, 2024

okay then, which X version and OS are you guys running?

from core.

derrickcope avatar derrickcope commented on July 17, 2024

I am having the same issues on arch. Arch just upgraded xorg-server to 1.19-1 I think. Libinput also became the new default driver so that could be the problem also.

from core.

dcat avatar dcat commented on July 17, 2024

I don't run bleeding edge shit, can you confirm whether or not libinput is the problem?

I don't see anything that should be a problem in the 1.19.1 release notes.

from core.

z3bra avatar z3bra commented on July 17, 2024

from core.

tudurom avatar tudurom commented on July 17, 2024

I tried downgrading xorg-server and xorg-server-common to version 1.19.0 (way older than the most recent version) and the problem is still here. Their dependencies were last updated in september. Seems like it's not a server problem.

from core.

feroldi avatar feroldi commented on July 17, 2024

It seems (at least for me) that the problem goes away when you don't disconnect right after flushing.

from core.

z3bra avatar z3bra commented on July 17, 2024

The issue seems to lie within the XCB library. Due to the asynchronous
state of it, connection sometimes gets closed before a request could
be handled by the server.

I tried rewriting mapw/wtf using xlib, and both of them work as expected
(xlib makes synchronous calls to the server)

I'm not sure what changed in xorg 1.19, but the issue is only present
after this release. I suppose WM compiled against XCB keep working
because they keep the connection openned for a long enough time to see
their requests executed. Most of the time, adding a sleep(0.3); before
killing the connection makes the tool reliable enough (it's not a
solution though).

I'll keep investigating. If anyone has an idea, please speak up!

from core.

dcat avatar dcat commented on July 17, 2024

Can anyone confirm if problem persists after replacing xcb_flush(conn) calls with xcb_aux_sync(conn)?

from core.

feroldi avatar feroldi commented on July 17, 2024

Yes, it works for me. I didn't find the binary to link with, so doing

free(xcb_get_input_focus_reply(c, xcb_get_input_focus(c), NULL));

(which is basically the same behavior) worked for me.

from core.

tudurom avatar tudurom commented on July 17, 2024

The binary is libxcb-util.so

from core.

z3bra avatar z3bra commented on July 17, 2024

Good catch d!

As a reference, here is the definition from the libxcb page:

int xcb_aux_sync (xcb_connection_t *c);

This functions also flushes all pending requests to the X server,
and then waits until the X server finishing processing these requests.

This way, we won't close the connection "too early" as we currently do.
I guess that X.org 1.19 discards requests that are still pending for
a connection when that connection is closed.

from core.

z3bra avatar z3bra commented on July 17, 2024

Closing as per commit dd268ec. Well done dcat!

from core.

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.