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

move-window-to-monitor does not maintain window height #306

Open
Damnjelly opened this issue Apr 22, 2024 · 5 comments
Open

move-window-to-monitor does not maintain window height #306

Damnjelly opened this issue Apr 22, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@Damnjelly
Copy link

steps to reproduce:

  1. Open a window
  2. Set window height to a size that is not the maximized size
  3. Move window to a separate monitor (move-window-to-monitor-up, move-window-to-monitor-down, move-window-to-monitor-left, and move-window-to-monitor-right all cause this issue)

Expected result: Window maintains height

Actual result: Window height gets set to maximized size

System Information

  • niri version: 2024-04-21 (commit 49f5402)
  • GPU: NVIDIA GeForce RTX 3070
  • CPU: Ryzen 5 5600X
@Damnjelly Damnjelly added the bug Something isn't working label Apr 22, 2024
@YaLTeR
Copy link
Owner

YaLTeR commented Apr 22, 2024

What window is it, and what are the monitor resolutions? It could be that the window is from a GTK 4 app, which restricts window size to monitor bounds, and you're moving to a smaller monitor, so the height ends up more than the bounds and gets clamped.

@Damnjelly
Copy link
Author

It occurs with every window I've tried it with. Thus far I've tried: my terminal (foot), an Xwayland window, Firefox, and Vesktop. I have 2 monitors with the same resolution and dpi, when i switch between these monitors this bug also occurs. I also have a smaller drawing tablet, on this monitor the bug occurs as well.

@YaLTeR
Copy link
Owner

YaLTeR commented Apr 22, 2024

Ah, wait, you're using the window commands. I think they might indeed not be preserving the height. Do the move-column- commands work fine?

@Damnjelly
Copy link
Author

Ah yes! Those do maintain the height. Thanks!

@YaLTeR
Copy link
Owner

YaLTeR commented Apr 22, 2024

IIRC the reason I made the window commands reset the height is that they are similar to expel, as in when you have two windows in a column and use one of those commands, you extract the window out of the column, which should let it take up the full height.

However, it would make sense to make it so that the height is preserved if the window was already by itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants