paperwm / PaperWM

Tiled scrollable window management for Gnome Shell
GNU General Public License v3.0
2.98k stars 128 forks source link

Snap horizontal viewport to columns, including gaps, during swipes #307

Closed winteriscariot closed 1 year ago

winteriscariot commented 4 years ago

Steps to reproduce:

It seems that the current behavior of horizontal viewport (that is, going right and left between columns) while using 3 finger gestures, is to snap to the edge of the window after swiping left or right. Since the default config is to use window gaps (I prefer them myself) this means that the edge of the window it snaps to has no gap, meaning there's more space on the opposite side, and you can see the edge of the window in the column just to the right:

image

This becomes especially noticeable when you have multiple columns with split-width layouts (ie, no fullscreen). there doesn't seem to be any way to get the viewport to "snap" to the columns, meainng you can arbitrarily sit with portions of windows (ie columns) hanging off-screen

winteriscariot commented 4 years ago

Here's a full screen screenshot, you can see on the left that the firefox window is flush to the edge of the screen, while there's a few pixels of the rightmost window visible:

image

this is after swiping left-to-right to go back to the left, the 'bounciness' of the overscroll sttles the viewport to the edge of the window.

winteriscariot commented 4 years ago

I've also noticed that this occurs when you only have 1 window on a workspace: if i swipe left or right, i can't go left or right cuz there's no columns there, but swiping left or right will snap the edge of the single window to the left or ride sides of the screen, leaving it off-centered

there DOES seem to be some logic that, if during your swipe you take care to try and center the window, it will sort of snap/settle in the middle, but snapping the window edge to the screen edge seems to be "stronger".

winteriscariot commented 4 years ago

Couple more things:

EDIT (so as to not add more posts):

it looks like PaperWM treats empty "columns" to the left of the left-most window and to the right of the right-most column. that is to say: if you have 4 half-width windows open, and you press Super+Home or Super+End, it will only show you ONE window, with blank space next to it. (empty half-column to the left when Super+Home, to the right when Super+End)

If I press Super+Home, I would expect to see the 2 left-most columns, so 2 windows (or 1 full-width [Super+f] window)

additionally, in a 4-half-width-window layout the middle 2 windows don't have any sort of snapping logic: there's no way to easily "center" the viewport on the 2 middle windows with swiping. If you use Super+,/. to move focus, you can get the 2 middle windows in the viewport, but the right and left gaps are, for some reason, different. I think this is cuz there's no real "snapping" involved, and it just sort of moves viewport focus

olejorgenb commented 4 years ago

it looks like PaperWM treats empty "columns" to the left of the left-most window and to the right of the right-most column. that is to say: if you have 4 half-width windows open, and you press Super+Home or Super+End, it will only show you ONE window, with blank space next to it. (empty half-column to the left when Super+Home, to the right when Super+End)

If I press Super+Home, I would expect to see the 2 left-most columns, so 2 windows (or 1 full-width [Super+f] window)

That sounds like a bug. Just to be sure I understood correctly. After pressing Super+Home this is the result?

image

Could you check journalctl $(which gnome-shell) right after pressing Super+Home.

olejorgenb commented 4 years ago

additionally, in a 4-half-width-window layout the middle 2 windows don't have any sort of snapping logic: there's no way to easily "center" the viewport on the 2 middle windows with swiping. If you use Super+,/. to move focus, you can get the 2 middle windows in the viewport, but the right and left gaps are, for some reason, different. I think this is cuz there's no real "snapping" involved, and it just sort of moves viewport focus

The gaps should be the same, but if the windows only resize in increments[1] (eg. the width is always a multiple of 14px) the windows wont be exactly 1/2 sized. Then one of the gaps will necessarily be bigger since Super+,/. don't do any centering.

[1] Typically terminal windows (eg. gnome-terminal) I suggest using a terminal which resize freely (eg. tilix)

jtaala commented 1 year ago

I haven't been able to reproduce this issue in current PaperWM develop branch. A few things have changed since this issue was submitted (notably #488) which may have corrected this issue(?).

Have marked this as potentially no longer valid and will close this issue in a month or so - let me know if this is reproducible by others given current PaperWM status.

jtaala commented 1 year ago

Closing as stipulated in previous comments (have received no further feedback in more than a month).