-
-
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
alt-drag stops working when displays change (Windows 10) #76
Comments
Version 1.1 |
Also seeing this |
This also happens if I change the DPI scaling on any of my monitors. |
I think this is related, but when i resume my windows 10 laptop from sleep the same issue happens. Probably because screens begin to be re-initalised due to using a docking station or a deeper sleep mode. |
Just to add: After I installed the Windows 10 Creator Update AltDrag keeps stopping after the PC has been idle for some hours. I suspect maybe some power managment stuff kicking in that affects it. |
duplicate of #34 |
As workaround I create a .cmd script to relaunch altdrag and modified startmenu shortcut to point it Here you are the script :
|
@tihz, I did the same thing. I even used Windows Task Scheduler to run it every time I unlock my computer because I usually run into issues after waking my laptop up from sleep. |
@sparebytes Very good idea ! Thanks for the tip :) |
@sparebytes I am trying to create a Task Scheduler on Windows 10, it gives me headaches. It runs only the first part, killing the existing one, but it never starts the new one? Any tips? |
Yeah, I had a similar solution to this back in 2016 #34 (comment). Seems @stefansundin hasn't touched this now in well over a year (soon to be 2 years). Even checking "Override high DPI scaling behavior" under compatibility tab (in the properties screen for Windows 10) doesn't have any effect. An alternative fix would be to find a way to prevent Windows from unhelpfully temporarily scaling then un-scaling when you switch displays, open the laptop, wake from sleep (etc) simply because you prefer not to run at the native 4k resolution (e.g. I run my laptop screen at 1080p due to general scaling issues, but it can't help but scale itself to 4k, even temporarily, whenever you attach a new monitor) |
Same thing here. @stefansundin are you still working on AltDrag? |
I'll chip in $20 (already donated one before but I can do it again). This is basically essential software for me these days. |
I think many people run into the same limitation. I have a bat script that
automates the kill and restart, using the taskkill and start commands.
…-Sean
--
Sean Ahern
Lead Software Developer / Nexus Product Manager
CEI, Inc., an affiliate of ANSYS, Inc.
sean.ahern@ansys.com
+1-919-719-6568
On Wed, Dec 26, 2018 at 7:58 AM Finomosec ***@***.***> wrote:
On Windows 10 if I plug in or remove displays, alt-drag no longer
functions.
The tray icon becomes black (both the cursor and the arrows) and will not
respond to right clicks.
Using taskmgr to kill the process and restart it is the only workaround I
have found.
Same thing here.
Running on Windows 10 Pro (64bit).
Version 1.1
@stefansundin <https://github.com/stefansundin> are you still working on
AltDrag?
If you fix this i will donate something :-) I really like AltDrag <3
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#76 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABkqlGY53_xLlvcZYyLdlWbWK-4kbi_Mks5u83KJgaJpZM4MLh7D>
.
|
I can't just do a simple bat script because I have to run altdrag with elevated permissions, so I'd need some sort of elevated kill/restart as well. I'd happily chip in $20 to get this fixed as well. |
I found another solution. Now I just use a modified AutoHotKey script. It doesn't do everything AltDrag does and I have to start it myself every time I reboot but I haven't had any issues. The original script is here and uses the left alt key: https://autohotkey.com/docs/scripts/EasyWindowDrag_(KDE).htm My script is attached and uses the windows key. edit: PS. I'm thankful to @stefansundin for making this and donated a long time ago even knowing the issues. It's probably not worth his time to work on this. Maybe we should buy him a 4k monitor to give him good reason to fix it 😆 edit 2: Fix dyslexia |
@sparebytes Thank you, thank you, thank you. It hadn't occurred to me to use AHK. Very nice. |
If you compile the script to a standalone exe it should be possible to copy it to your autostart folder here |
Alt-drag stops working sometimes for me, or worse, it leaves the modifier key pressed, wrecking chaos on my desktop (possible conflict with AHK?). |
Same problem here. I've had it for a long time actually. Black tray icon when I disconnect from my eGPU, and display scaling switches from 100% (on the external monitor) to 125% (on my laptop display). I've used a .bat as others have suggested for a while now, but even that doesn't work to kill the dead altdrag process sometimes. The script is:
Maintaining altdrag & its quirks has taken up so much of my time & energy lately (& for quite a while honestly) that I've wondered if there's an AHK script that can really replace its functionality completely, as I've been tweaking the crap out of my PC setup with ahk to the point where it's more essential than even altdrag for me nowadays (although altdrag is still the very important yang to ahk's yin). I might try the one posted here but I wonder if there are better ones that aren't 14 years old. EDIT: oh and as far as elevating the "restart_altdrag.bat" script with admin privileges, the solution for me was to make a shortcut to the .bat on my desktop, right click and Properties..., and in Advanced (I think under the Compatibility tab) check "always run as administrator". That way, running it from that shortcut instead of the actual .bat will always elevate it, and I also then bound the shortcut to Win+Z using AHK. So pretty much anywhere anytime I can "reset" altdrag completely by quickly mashing Win+Z, ALTHOUGH like I said sometimes it still fails to kill the dead process anyway, and in an unrelated error to altdrag itself, it seems DPI changes sometimes kill the AHK process as well, rendering my handy keyboard shortcut useless, until I manually reload my main system-wide AHK script 😡 No idea how Microsoft botched up things so badly with something as weird and innocuous as unplugging a display with higher dpi. But ugh what a mess. |
Why not, you know, Just Do It©? Would take less time than typing that post! My only grievance with EasyDrag is that it doesn't work reliably with the Windows key, but that's Windows (key, system and philosophy) for you. It works a treat with Alt though. |
Lol i'm not nearly experienced enough at AHK scripting to undertake something like that. Much better at writing long diatribes than grokking all of AHK's crazy functions and syntax differences between versions |
I meant why not try the script that has been working (mostly) flawlessly for 14 years:
1. Download and install https://www.autohotkey.com/
2. Download (save or rename to .ahk instead of .txt) and execute
1. EasyDrag (Alt key): <https://www.autohotkey.com/docs/scripts/EasyWindowDrag_(KDE).ahk>
(prevents using the mouse while doing Alt-Tab)
2. EasyDrag (Win key): <https://github.com/stefansundin/altdrag/files/2968332/WindowDragging.ahk>
(sometimes opens the Start Menu instead, at least on my system).
3. Profit!
4. If you like it and want it to start automatically, create a shortcut in your Start Menu\Programs\Startup folder (%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup)
That's it, no AHK hacking required. :)
Edit: Email replies break horribly here, fixing... and another minor gripe: you can't Alt-drag a maximised window. But you can double-Alt-RMB to restore, and immediately drag with LMB! (double-Alt-LMB minimises, double-Alt-MMB closes!)
|
Those scripts are pretty good; they do miss some features that AltDrag has, but the scripts provide a really great starting point. Would be great to see (from my perspective/usage), otherwise AltDrag is still more "profitable" (so to speak)
|
@Chematronix , you sparked my interest, on some quick googling I found the second script in this post (second to last reply) works extremely smoothly, way better than the KDE-style one you suggested; maybe by combining the two we could get a really workable script. Still no snapping, which is a must for me at least... and stuff like mouse4 and mouse5 but I'm sure those could be added in pretty easily. Like @patricknelson said it's a good starting point EDIT: also didn't realize stefan has a list of similar programs including like 5 AHK scripts right on his site: |
maybe by combining the two we could get a really workable script.
Someone beat you to it:
http://corz.org/windows/software/accessories/KDE-resizing-moving-for-Windows.php
|
Oh interesting. Have you tried it, does it work the best out of all of them? |
Oh interesting. Have you tried it, does it work the best out of all of
them?
Yup. This one you can easily configure on its Systray menu, or its
extensive ini file. Since keys are not hard-coded, it's the easiest to
hack too. Comes with desktop edge snapping, double-modkey+click
min-maximise, blacklist (only for exe name, so Alt+Tab still won't click
--Win+Tab works fine though, since you can release the keys), and grid and
colour sampler addons (disabled in ini by default). It's a keeper.
|
I had been using a .bat script to restart alt-drag after resolution changes would cause it to stop functioning. This other script (corz.org) doesn't suffer from that issue and provides all the goodness I got out of alt-drag. Thanks for finding and sharing that! |
The link seems to be dead unfortunately at the time of writing this comment, anyone able to upload this anywhere else? |
I personally only use the alt drag, I am not using any more features aside from alt drag. So for me, the script illustrated by Chematronix worked like a charm.
|
@EduardoSantanaSeverino I fixed this problem on my fork in v1.34. |
@RamonUnch, can you provide instructions on how to build your fork? |
The link is working great for me at this moment. |
I make the releases builds using mingw64-32b. Just install it and run mk.bat |
On Windows 10 if I plug in or remove displays, alt-drag no longer functions.
The tray icon becomes black (both the cursor and the arrows) and will not respond to right clicks.
Using taskmgr to kill the process and restart it is the only workaround I have found.
The text was updated successfully, but these errors were encountered: