Git Product home page Git Product logo

Comments (12)

SeraphimRP avatar SeraphimRP commented on July 17, 2024

Try using CTRL+W to close one window (implying the other tabs are closed).

from core.

Vibex avatar Vibex commented on July 17, 2024

What vypr says is a solution, but I think it would be nice if you could kill just one window instead of all the windows in that process.

from core.

dedcat avatar dedcat commented on July 17, 2024

wmutils will not switch to using EWMH.

If you want this behavior, use another program for killing windows.

from core.

greduan avatar greduan commented on July 17, 2024

So this depends on EWMH? But I've checked and when I do lsw every Firefox window has a different WID...

But yes I've started using Ctrl+w meanwhile

from core.

z3bra avatar z3bra commented on July 17, 2024

when you fire up 'killw' on a window, it only close the window, but in a sort of brutal way. killw is not meant to gently close a window, its meant to kill a window. EMWH has a way to request a window to close itself, but has said, wmutils isn't designed to use EWMH.

Note that this is not related to firefox only. All webbrowsers starts tons of windows to catch up key events and such, and having them closed is not an expected behavior, so firefox might consider that when one of its child windows dies, something is wrong, and then shutdown completely.

So as killw only force ONE window to close (and not its parents or children), this could not be considered a bug in killw. It is just a side effect on how firefox react to Xorg killing one of its windows

from core.

greduan avatar greduan commented on July 17, 2024

OK, thanks z3bra. :)

from core.

clehner avatar clehner commented on July 17, 2024

I'm revisiting this issue because I have been experiencing the behavior that killw closes multiple windows, with the surf browser. To open a new window, surf forks and execs itself. I think that the child processes are reusing the parent's XCB connection from some inherited GTK memory. I looked into the i3 source and found that it uses xcb_destroy_window to close a window (as a fallback for EWMH). Is there an advantage to using xcb_kill_client which kills the X11 client owning a window, vs. xcb_destroy_window which kills a specific window?

from core.

Ferdi265 avatar Ferdi265 commented on July 17, 2024

It should be worth mentioning that killwa from the contrib repo DOES kill single windows correctly. I haven't had time looking into its source yet, though.

from core.

clehner avatar clehner commented on July 17, 2024

@Ferdi265 Thanks, I didn't see that. Looks like killwa uses EWMH WM_DELETE_WINDOW and then falls back to xcb_kill_client. It should probably fall back to xcb_destroy_window instead. I'll make a PR with my proposed changes

from core.

z3bra avatar z3bra commented on July 17, 2024

The advantage of xcb_kill_client is that it gives the possibility to kill a frozen or misbehaving client and all its children from a single application. It is IMO more useful than using the WM_DELETE_WINDOW, as all clients already include a way to close themselves "properly" (be it escape, ctrl+w or ctrl+d). Also, this atom is specified by the ICCCM standard and is thus not supported by all applications. The xcb_destroy_window() is much better there because it asks directly to the server to close the window, so it will always work. Thanks for the proposal!

from core.

clehner avatar clehner commented on July 17, 2024

@z3bratabs thanks, that makes sense.

from core.

CamilleScholtz avatar CamilleScholtz commented on July 17, 2024

I already created a tool that does exactly this using atoms, it's in contrib: https://github.com/wmutils/contrib/tree/master/killwa

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.