-
-
Notifications
You must be signed in to change notification settings - Fork 96
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
Windows 10 window borders #38
Windows 10 window borders #38
Comments
Hi -thanks for your work on this great tool. |
Thanks for creating this issue @stefansundin and thanks a lot for creating AltDrag, I use it so often that I often find myself accidentally pressing What would be your target version to fix this? I'm usually the type to just build it myself but I might pick up C just for this if it haunts me enough. |
I'm not sure. My time is very limited these days so I won't even try to make a prediction. Sorry. :/ Patches are always welcome though. :) https://stefansundin.github.io/altdrag/doc/build.html Btw, now that there's Bash on Windows, you should be able to use that instead of Cygwin. I will try to update the page with new instructions when I get around to it. |
Love alt-drag. It makes my life so much easier. But you've mentioned Bash on Windows, which I've just installed, and I'm sad to see that alt-drag doesn't work with either the Bash console (though it does work with the cmd console) - the bash console grabs alt drag to determine whether to do line-wrapping text selection or rectangular text selection. And unfortunately it doesn't work when I launch an xterm with the ubuntu subsystem for windows either (using ming) though that's not much of a surprise. |
@daveola Could you provide a screen capture (e.g. ShareX) of what your experience looks like when interacting with the console window? |
The photo would just show the bash window, I don't know how to take a screenshot of a drag not working. If I drag in the window, it does multi-line selection, as if you were just selecting a region of text. If I alt-drag in the window, then it does a rectangle selection, where the text selection is a rectangle with no line wrap. There's a session option that lets me switch which is the default selection type and which is controlled by alt, so it seems that the app is catching the 'alt' modifier. Is there any way to overide this? |
Hmm, not sure. Probably a silly question, but: Have you tried ensuring you launch AltDrag with elevated privileges? |
I did not realize that was a possibility/fix! Thanks much! |
I appreciate everything you have done with this project. While I am not able to contribute to the project's code, because I don't know C. I am more than willing to put my money where my mouth is, if it means you get an opportunity to implement this feature. I understand you are busy so, I would happily donate $100 immediately if you agree to try an fix this. @stefansundin |
I second that! I would be happy to give $100 in advance for you to take another shot at this. |
This has been bugging me for years 😅, so I decided to have a go at fixing it! Is it too much of a hack to lookup the border size difference and reverse it? EDIT: I haven't tried this on other DPI modes. |
@celynwalters Is there a binary with your fix somewhere? I would love to give it a spin. |
Try this! |
Sweet. Works perfectly for me! Thank you! |
For anyone curious to see the changes (without a PR): master...celynwalters:win10fix |
Hey. @celynwalters. Thank you very much for your work on this issue. Do you think you would be able to clean up your commit and create a PR? There seems to be some editor-stuff autofix going on (I think it changed some line endings for many files and removed some trailing spaces, which poluted the changeset). I would be willing to help on creating a PR for this, but I don't have any C experience to try out new builds and make sure everything works. I'm sure this fix would help the usage A LOT for many people and it might be worth some minutes to create a formal PR and have it merged. Thanks again. |
The reason I had these in here is because it wouldn't even compile for me unless the encoding was I am pretty new to contributing to repositories which aren't exclusively mine. |
Ah, good point. |
I just tried your branch and it does not appear to be fixed for me. I uninstalled my existing AltDrag instance and ran your AltDrag-1.1-installer.exe. What could I be missing or doing wrong? |
Hmm, not sure. |
Microsoft is working on extending the Windows 10 shell with an application called, Power Toys. I recommend everyone to upvote this issue so Microsoft prioritizes Alt-Drag and Alt Resizing. |
For everybody who was irritated as I was, this issue here is not solved on this repository here. Therefore the issue here (for the repo of @stefansundin) shouldn't be closed because actually it is not (for the repo of @stefansundin again). The binary with this fix argued here is found on https://github.com/celynwalters/altdrag/releases. |
This fix from @celynwalters is good but not complete, it does not take in account for all kinds of snapping, I made a fork that uses this DwmGetWindowAttribute function and applies it whenever applicable. |
It seems Windows 10 includes some invisible window borders in
GetClientRect
, causing snapping to have a few extra pixels of distance to other windows (only seem to affect horizontally).According to a stack overflow article, another function can be used:
Unfortunately this window size cannot simply be used with
MoveWindow
, because it is smaller than whatMoveWindow
represents the window size as. So it will cause the dragged window to shrink by a few pixels every time it is moved.The solution requires a lot of code to be reworked, so I won't fix it for v1.1.
The text was updated successfully, but these errors were encountered: