Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Winprop 'min_size' seems to be ignored #312

Open
urbanware-org opened this issue Jan 26, 2021 · 6 comments
Open

Winprop 'min_size' seems to be ignored #312

urbanware-org opened this issue Jan 26, 2021 · 6 comments

Comments

@urbanware-org
Copy link

Notion 4 seems to ignore the min_size property.

I just noticed that I can resize (downsize) floating windows, even though, I have the following code inside my cfg_kludges.cfg.

For example with Firefox:

defwinprop{
    class = "Firefox",
    role = "browser",
    float = true,
    min_size = { w = 780, h = 660 },
    max_size = { w = 780, h = 660 },
}

The max_size property works properly. I can't make the window larger than the given size.

@raboof
Copy link
Owner

raboof commented Jan 27, 2021

Ah - I think this is an effect of #95 (also mentioned in https://notionwm.net/migration.html).

The background here is that honoring the minimum sizes as reported by the windows themselves was broken on Notion 3. When we fixed it we noticed that lead to undesirable behavior: some applications report unnecessarily large min_size values, which is especially annoying since the minimum applies to the whole frame, regardless of which tab is selected.

We then decided to disable honoring min_size by default, but provide a winprop to honor it (ignore_min_size = false). I guess we didn't realize that this would also apply to min_size when it is set via winprop.

Perhaps it would be a nice improvement to change the default value for ignore_min_size to depend on whether or not min_size is set for this winprop?

@urbanware-org
Copy link
Author

some applications report unnecessarily large min_size values, which is especially annoying since the minimum applies to the whole frame, regardless of which tab is selected.

Indeed an undesirable behavior.

but provide a winprop to honor it (ignore_min_size = false)

Do I get you right? You mean adding the line to the defwinprop block as follows?

defwinprop{
    class = "Firefox",
    role = "browser",
    float = true,
    ignore_min_size = false,
    min_size = { w = 780, h = 660 },
    max_size = { w = 780, h = 660 },
}

If so, it did not work for me.

Perhaps it would be a nice improvement to change the default value for ignore_min_size to depend on whether or not min_size is set for this winprop?

Sounds good!

@raboof
Copy link
Owner

raboof commented Jan 27, 2021

but provide a winprop to honor it (ignore_min_size = false)

Do I get you right? You mean adding the line to the defwinprop block as follows?

defwinprop{
    class = "Firefox",
    role = "browser",
    float = true,
    ignore_min_size = false,
    min_size = { w = 780, h = 660 },
    max_size = { w = 780, h = 660 },
}

That's what I meant, yeah.

If so, it did not work for me.

Hmm, then I guess this needs more analysis ;). Do you have a chance to dig into this?

@urbanware-org
Copy link
Author

Hmm, then I guess this needs more analysis ;)

Yes, looks like. 😄

Do you have a chance to dig into this?

You mean dig inside the code to find the reason?

@raboof
Copy link
Owner

raboof commented Jan 27, 2021

Do you have a chance to dig into this?

You mean dig inside the code to find the reason?

yes :)

@urbanware-org
Copy link
Author

I think I'm not able to do so... my only basic C/C++ skills have vanished meanwhile. It's been quite a while (or rather ages) since I used those languages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants