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

[RFC] config: use automatic placement by default #1772

Closed
wants to merge 1 commit into from

Conversation

ahesford
Copy link
Member

@ahesford ahesford commented May 3, 2024

Automatic placement has been in place for a couple of releases now, and I think it makes the compositor much more usable to have windows try to avoid collisions rather than centering everything. Maybe it's time to switch the default policy.

@Consolatis
Copy link
Member

I don't know about this. For me personally as a user it would actually be a surprise to have that as a default setting.
What does Openbox do?

@ahesford
Copy link
Member Author

ahesford commented May 3, 2024

Openbox enables "smart" placement by default, but separates the concept of centering from the actual policy (which is only "smart" or "under mouse") and will center each new window in its optimal area.

It would not be difficult to adapt an option centering for smart placement, but would require a change in configuration that makes things a bit more complicated.

Automatic placement was born because I found the labwc default surprising. Most other compositors and X11 window managers I've used make some attempt to vary new window positions as clients are launched.

@Consolatis Consolatis added this to the 0.7.3 milestone May 3, 2024
@Consolatis
Copy link
Member

Other thoughts @johanmalm @tokyo4j @jlindgren90 ?

@tokyo4j
Copy link
Contributor

tokyo4j commented May 3, 2024

I'm fine with enabling smart placement by default, but I think it should be after <placement><center> is implemented.
All the stacking WMs I've used enable smart placement (with different algorithm) by default, but all of them open the first window at center of the screen.

I personally like the placement policy of Windows or KWin which place the first window at center and the second window at center too but shifted to bottom-right a bit.

@jlindgren90
Copy link
Contributor

I haven't tested the smart placement yet myself, but I like the idea of enabling it by default if it feels intuitive enough. Maybe after 0.7.2?

@domo141
Copy link

domo141 commented May 3, 2024

I have smart placement, and sometimes i find it hard to find these small windows at some small free space in a desktop.
also some startup windows that used, on X11, open in center, now opens laid out next to some other window (near an edge/corner of an output, usually...)

As in wayland one cannot position these (special-case) windows it is somehat weird to have these open at random places ;/

OTOH, opening every window in the center is IMO more disturbing than some windows that would be nice to get center are opened at random places.

@Consolatis
Copy link
Member

Just speaking as a user here, what I like about default open-at-center is that I can predict what happens. I open a window and already know where it will be. With smart placement that is not the case and I have to go on a hunt for the window. The always-center default makes it much easier to understand the rules of the compositor in my opinion.

@jlindgren90
Copy link
Contributor

also some startup windows that used, on X11, open in center, now opens laid out next to some other window

Startup windows a.k.a. "splash screens"? I would think these ought to be excluded from the smart placement.

@jlindgren90
Copy link
Contributor

With smart placement that is not the case and I have to go on a hunt for the window.

Are there any adjustments that could make the smart placement more predictable? Such as, only use smart placement if there is an obvious/large blank area to place the window in?

I recall Metacity had a design goal of having just one placement scheme that was "good enough" for most use cases -- it would be nice if we could achieve that.

@johanmalm
Copy link
Collaborator

I really like automatic placement, but don't think we should change the default behaviour.

@stefonarch
Copy link
Contributor

stefonarch commented May 3, 2024

Just speaking as a user here, what I like about default open-at-center is that I can predict what happens. I open a window and already know where it will be. With smart placement that is not the case and I have to go on a hunt for the window. The always-center default makes it much easier to understand the rules of the compositor in my opinion.

That's exactly the reason why I use the "cursor" placement, otherwise I had often to move it all over the monitor to reach the opened window.
Maybe a mix between "automatic" and "center" would be the best, opening the windows more or less at center, especially small windows.

Btw this is still on my wishlist ;)

#1511

@tokyo4j
Copy link
Contributor

tokyo4j commented May 3, 2024

I just implemented KWin's algorithm which tries to shift a window not to cover existing ones when center policy is used.

https://github.com/tokyo4j/labwc/tree/kwin-placement

I think something like this, or a mix of automatic and center as @stefonarch suggests should be the default.

@stefonarch
Copy link
Contributor

I just implemented KWin's algorithm which tries to shift a window not to cover existing ones when center policy is used.

Works nicely:

immagine

@johanmalm
Copy link
Collaborator

@ahesford Are you okay if we close this one leaving 'center' as default?

@ahesford
Copy link
Member Author

Sure thing.

@ahesford ahesford closed this May 19, 2024
@ahesford ahesford deleted the christine branch May 19, 2024 23:26
@tokyo4j
Copy link
Contributor

tokyo4j commented May 20, 2024

I said:

All the stacking WMs I've used enable smart placement (with different algorithm) by default, but all of them open the first window at center of the screen.

But this was wrong. Xfce4 enables smart placement and opens the first window at top-left corner by default, but it has configurable "minimal window size to trigger smart placement" so tiny windows like dialogs are opened at center.

As a former xfce4 user, now I'm not strongly against enabling the current smart placement by default, but I understand why other devs are against it and I still prefer center placement.

@johanmalm
Copy link
Collaborator

I’ve added placement-policy to labwc-tweaks as a convenient way of changing it.

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

Successfully merging this pull request may close these issues.

None yet

7 participants