Giter Club home page Giter Club logo

Comments (6)

sminez avatar sminez commented on May 18, 2024

I think the window sizes have to be strictly > 0 (though I might be wrong: the XCB docs are patchy to say the least!)

I do know that for the window manager check window (for setting ewmh props etc) I set the width and height to 1px each and that effectively hides the window. Might be worth trying that?

If not, then I suspect I'd need to modify the layout API / ResizeAction to allow for unmapping a window as opposed to positioning it. The 1px trick feels pretty hacky to be honest so it might be worth doing that anyway...something like this with None indicating that the window should be unmapped. (Changing to another layout should remap it back but I suppose that'd then be something we'd need to check for / track).

pub type ResizeAction = (WinId, Option<Region>)

from penrose.

YohananDiamond avatar YohananDiamond commented on May 18, 2024

I tried changing the size to (1, 1) and I noticed a thing: it was already working before!

The problem actually is that the layout function doesn't seem to run when simply cycling though windows.

Nonetheless, I think the unmapping of windows might be better in the future. Apparently qutebrowser crashes when its screen size is as small as 0 or 1 (still investigating) and other applications might end up having the same bug.

from penrose.

sminez avatar sminez commented on May 18, 2024

@YohananDiamond are you able to check if this is what you are after?

from penrose.

YohananDiamond avatar YohananDiamond commented on May 18, 2024

The problem seems to be still here - I can focus other windows other than the first one, but they are on the background. But I noticed one thing: if I switch workspaces and go back, the window that was hidden is shown. Maybe the layout is not updating on focus change?

from penrose.

sminez avatar sminez commented on May 18, 2024

Ah sorry, yes you need to set the layout config to trigger follow focus like this. You probably also want to do what I've done and allow client wrapping as well (default is to allow but you need to make sure you specify it when you create the config)

Layout functions by themselve can't determine when and how they are triggered: they only specify what to do with the clients when they are triggered. To be honest, at least for the default layouts I probably should provide some helper functions that bundle them with the appropriate LayoutConfig.

from penrose.

YohananDiamond avatar YohananDiamond commented on May 18, 2024

Oh, okay. It's working now, thanks for the help!

from penrose.

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.