-
Notifications
You must be signed in to change notification settings - Fork 132
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
Fix showing margin on display edges when switching apps #364
Conversation
Thanks for taking the time to contribute, unfortunately this is intended behavior. The main points are these:
While I'm aware some people would much rather prefer your solution, I'd really like a solution that makes it possible to use the left/right margin to control this. Hope that makes sense :) |
Hey @hedning - I know this has been here a while, but happy to address this. Yes, this seems to be a user preference thing. I certainly understand and agree with the intended behaviour (and I do appreciate the extra visual information it provides) What about having the left/right edge margin user settable? We already have the horizontal/top/bottom margins settable in the extension settings ui. We could call it something like "Left tiling edge margin" and "Right tiling edge margin" and have the default 0 (current behaviour). Or simplify it to just one input "Tiling edge margin". That way user can set their preferred behaviour. I admit, I think I would prefer having it > 0 (so I could see my pretty borders...) but not quite as much as normal (so I can still detect when I'm at the edge of my tiled windows). I'm happy to implement this in the settings ui. @smichel17 and others - any thoughts/comments? |
This was also one of the first things that seemed broken to me when I started using PaperWM. I didn't realize exactly what the trigger conditions were for not showing the margin, so it seemed like sometimes it just didn't work. It's especially jarring for full-width windows, since I understood I think that we don't need to hide the border to communicate "This is the last window" to the user. Specifically, when I move my mouse to the very edge of the screen, when there is another window offscreen, a preview is shown. When I click, the preview disappears. I would suggest that instead, the preview should show the next window offscreen. That way you'll know it's the last window when no more preview appears. |
This is already the way it is (at least for me). If there is a window offscreen in that direction a preview is shown. If there is no window in that direction nothing is shown. But I agree, I think this should be the default behavior, because it feels like a but that sometimes there is a border and sometimes there isn't. Maybe other users would disagree but I feel like I also don't need a setting for this and can just change the behavior. But also an indicator that there are no more windows in that direction might be nice (but I think not that important). I would imagine more like a flashing screen border or a wiggle when trying to navigate an there are no more windows. |
@Lythenas The preview of the next window stays visible after you click? I think a screen recording might be worth a thousand words here. At 3 seconds in, I click, and the preview disappears. The next window's preview reappears shortly after, when I move my mouse away and back. I'm saying I shouldn't need to move my mouse to get it to show up. paperWM-overlay.mp4 |
Ah that's true. I never noticed it because I rarely navigate with the mouse. But also that seems like a separate thing/bug from the display edge margin. Maybe create a separate issue for this, if one does not already exist. |
} else if (index == 0 && x <= min) { | ||
// Always align the first window to the display's left edge | ||
x = min; | ||
x = min + prefs.horizontal_margin; | ||
} else if (index == space.length-1 && x + frame.width >= max) { | ||
// Always align the first window to the display's right edge | ||
x = max - frame.width; | ||
x = max - frame.width - prefs.horizontal_margin; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it work to remove these special cases and let the code below handle it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why yes, yes it does! See #488 - thanks @smichel17.
Hey all, I appreciate the viewpoints we're getting on this. I've provided #467 which hopes to address this (@Lythenas check it out and let us know). The reason I provided a simple user-defined option (in the settings UI) to change this is that there are valid opinions for/against this approach - and it seems quite up to user preference. For example, @hedning described the original intent/reasons for the design and I understand that. Others seem to prefer it being set the same as horizontal margin etc. I actually prefer it at 5px - since I can see my nice border (refer to the video in #467), but still also visually see in a static way (without needing a popup/preview etc.) if I'm against the tiling edge. Hence, given the divide, why wouldn't we provide a simple toggle like #467 provides? - that way, it's up to the user what they prefer. Anyways, if I had an issue with just relying on the window left/right preview as a substitute is that it's only shown when switching windows... similar to only seeing where you are during switching with the minimap. I like being able to get visual feedback at all times whether I'm up against a tiling edge without needing to switch or to just remember that. |
be shown. Essentially completes #364 which isn't available anymore (original submiiter removed his fork a while back).
Hey all, I've created PR #488 to replace this (mainly because @basdelfos's original fork/branch is no longer available). #488 simply removes the Planning on closing this PR in favour of #488. Cheers! |
…sed no margin to be shown (#488) Closes #364. This PR was created since @basdelfos develop branch/fork isn't available anymore :-( Please see #364 for details of this. It has been a long time coming. Given the merging of #471 (an improved way to see the window position), and also the merging of #473, having no margin on the left/right tiling edge no longer provides the original benefit (of seeing when you're at an tiling edge). This simply removes the cases where no left/right margin would be shown - which also cleans-up/simplifies this area of code (thanks @smichel17 ). Note: we will close #467 as it was originally a way to set this separately. However we will be closing that in favour of this one.
When cycling through applications and reaching the begin or the end, didn't display the horizontal margin.
Before:

After:
