Comments (32)
I fixed this problem on my fork.
https://github.com/RamonUnch/AltDrag
The problem was related to tray icon:
In some cases when resuming from sleep mode under windows 10 DPI scaling changes, ad when it changes, AltDrag recieves the WM_TASKBARCREATED message. AltDrag in this case will try in an infinite loop to restore his tray icon. Because the tray icon is still there it is not possible and AltDrag is stuck.
The fix is easy, you just need to modify the loop in UpdateTray() function.
@pablospe @warnerAWESOMEmoore and @benley This should also fix your issue #107 with screen resolution change.
from altdrag.
Maybe an AltDrag organization could be created and all the contributors can help to move this project forward. Also people for reviewing code, etc., so it is not only one. So the repo would be something like:
github.com/altdrag/altdrag
(and the contributors to have access to it)
from altdrag.
Ok, I was finally able to reproduce it consistently. I believe I have traced it down scaling in Windows 10. See the Settings area (Windows + I), then go to System -> Display and under "Change the size of text, apps and other items". If you adjust it that, AltDrag will instantly crash 100% of the time.
This has become a common enough issue for me to create a quick batch script for it to restart AltDrag:
@echo off
taskkill /F /T /IM AltDrag.exe
start "" "C:\path\to\AltDrag.exe"
from altdrag.
For reference, still experiencing this on Win10 with AltDrag version 1.1. Script by @patricknelson works well to resolve, embedded as AHK hotkey. Still, AltDrag remains one of the best little tools I've come across - thanks @stefansundin . :-)
from altdrag.
If anyone wants to participate to my fork, he is welcome to submit pull requests.
I always worked alone and am not a professional programmer, I am not sure I could handle several contributors.
With my job, and the current situation, the time I can allocate to the project is very random.
I took this project because the original AltDrag was not usable for me and yet it implemented a feature that is mandatory.
Originally I just fixed the code for myself, then I made it public because I saw really no one would work on this again unless I do it myself. In general will try to focus on bug fixing instead of new features, because I do not need new features.
from altdrag.
Not sure if this is related (I very strongly suspect it may be), but windows 8.1 and windows 10 have some odd display re-sizing issues on sleep. I'm using 2x4k monitors and it constantly re-sizes open windows (e.g. chrome, explorer, etc.) when the monitors go to sleep. It has to do with a simulated display setting in the registry (specifically a mismatch in the simulated resolution when no monitor is detected I believe).
To reproduce the issue, you have to have a different resolution on the simulated desktop space (and it seems to me like changing the simulated resolutions have fixed the issue on my computer).
The relevant keys are under : HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GraphicsDrivers\Configuration
There are a couple of keys prefixed "SIMULATED..." and the relevant entries are a couple of other entries (00 and another nested 00). The names of the relevant keys are:
(in the first 00)
PrimSurfSize.cx
PrimSurfSize.cy
(in the nested 00)
ActiveSize.cx
ActiveSize.cy
if you change the keys to match your specific desktop resolution it seems to fix the issue. I'm not an expert in windows internals, but I'm guessing this is a failure case that @stefansundin hasn't been able to reproduce because he doesn't use a monitor that uses HDMI or DisplayPort (which are the only displays on which I've been able to reproduce the issue, any earlier connectors seem to function fine). I'm not sure if the SIMULATED displays are ever used absent HDMI/DisplayPort (again, this isn't my area of expertise!).
from altdrag.
wondering if there's a way to automate it upon the laptop waking up.
@jDally987 you can create a "Scheduled Task" that activates when resuming from sleep: https://superuser.com/a/149924
from altdrag.
The code is very heavily modified and completely refactored. I made a separate repositorry
Stefan Sundin is really no more working on this project, not even to the point of merging any pull request anyway. Look at celynw pull request about fixing Win10 invisible border bug.
dsjstc proposed Stefan to push my fork on the readme.md or the official page but, I think Stefan has really no more time for this project.
from altdrag.
If Stefan has abandoned AltDrag he could transfer the repo to Ramon or perhaps add a link to Ramon's version.
from altdrag.
I could not reproduce this. Does it happen every time?
Anyone else have this problem?
from altdrag.
I actually installed Win 10 on my second laptop last night, and found this issue doesn't happen on that machine.
I'm trying to find what kind of conflict in the first device is causing this.
I'm closing this for now
I'll open another issue with more specifics, when I figure out what's the problem.
from altdrag.
I can confirm this still happens more often than not after the computer resumes sleep, on a laptop too.
from altdrag.
Just wanted to briefly update - this doesn't seem to perfectly fix the issue, but it seems to occur much less frequently.
from altdrag.
My computer doesn't have those keys in the registry, but the issue also happens when i connect a new screen, so it seems to indeed be related to the display settings.
from altdrag.
I'm also having this issue. I'm on a laptop with an external monitor. Along with the crash I see other issues (unrelated to AltDrag) when the monitors turn off like my windows all getting moved to the top left of my screen.
Is there a crashlog or any other information I can provide?
from altdrag.
AltDrag does not have a crashlog, unfortunately.
Do the DPI scaling change around the same time AltDrag is crashing?
from altdrag.
It might yeah, my primary screen (external monitor) is a normal screen and the laptop has a retina screen, so when it's turning off screens it may report one value vs the other.
from altdrag.
With only the laptop monitor, if I change the dpi from 100% to 125% AltDrag will crash, yes.
from altdrag.
I was able to resolve this issue by setting DPI using control panel (not through windows settings universal app)
from altdrag.
Can confirm, the dpi was set to 125% in the control panel, even though it was set to 100% in the universal app. This solved the AltDrag issues, plus some mouse/keyboard problems I had when resuming from sleep and connecting displays (I think were related to AutoHotKey, having the same cause).
from altdrag.
I'm still having this issue with AltDrag v1.1. I'm using a Windows 10 laptop with two attached 1920x1200 screens (one in landscape orientation, one in portrait mode). DPI scaling is set to 100% (Change the size of text, apps, and other items). Any update on the issue?
from altdrag.
@tuok From your description, I think you have set DPI in the universal settings app (which is triggered by pressing Win+I or select "All settings" from notification center. Why don't you try setting DPI using control panel (right click on start -> "Control panel" -> "Display" -> "set a custom scaling level" (in the middle of the text in upper center) ).
I'm not sure if it does matter to sync both DPI, but I have set them (from universal app and control panell) synced to 100%, and the issue has gone ever since.
from altdrag.
@keighrim Thanks for your suggestion, but unfortunately custom scaling level in Control Panel was already set to 100%.
I just started to investigate the issue, so I'm not sure when and how the problem exactly appears. I tried to reconnect both external monitors, but it didn't make any difference, at least for now.
from altdrag.
I'm also having this problem. I suspect my issue is related to sethbc's. I have a high resolution screen (3840 x 2160) connected by DisplayPort, and Windows often does weird resizing & position of windows when the computer returns from sleep.
I tried the registry setttings but it doesn't resolve the issue, unfortunately. Windows still get re-positioned and resized (not AltDrag's problem, obviously), and AltDrag stops working.
from altdrag.
I have the problem - for several weeks, I think it also happens after screen lock - and I definitely see it on resume, though I frequently connect/disconnect mini displayport.
As a work around, I do taskkill as admin, then restart it manually as admin... really hoping you're able to figure it out soon.
from altdrag.
I have this issue every day now for weeks and it's getting really annoying. I have to go in the task manager and kill altgrab and then restart it every time the computer goes into power saving.
Any news on this issue?
from altdrag.
I get this issue regularly just when my monitor configuration changes (but it's not always easily reproducible). I'm on Dell Precision 5510 with a Dell USB-C WD15 dock. Simply unplugging the thunderbolt 3 (USB-C) and plugging back in will cause it to gray out. I do have a 4K display on my laptop and sometimes I wonder if the temporary flashing into 4K resolution (scaled up) back down and etc (even on the main laptop monitor as I don't utilize full resolution) has something to do with it.
It's easy to tell if it crashed too by looking at the icon. I tried to get it to crash with no luck, so I'll post screenshots later when it happens again!
from altdrag.
I still experience this same issue when waking from sleep (generally after attaching or detaching from other monitors). Have to kill the AltDrag process and manually restart it.
from altdrag.
For reference, still experiencing this on Win10 with AltDrag version 1.1. Script by @patricknelson works well to resolve, embedded as AHK hotkey. Still, AltDrag remains one of the best little tools I've come across - thanks @stefansundin . :-)
Can you share your AHK script that launches this? Do you mean you set it up on an actual hotkey combo (like win+alt+A or something like that?) Right now I have just a "restart_altdrag.bat" file on my desktop with @patricknelson's script, wondering if there's a way to automate it upon the laptop waking up.
from altdrag.
Just FYI, I'm hitting this issue as well. If I have my external display connected, and walk away from my laptop for long enough for the monitor to turn off (and hence for the desktop to lock), then upon returning/unlocking, AltDrag is non-functional and the system tray icon is black.
Killing & restarting AltDrag when it occurs seems to be my only choice at the moment.
from altdrag.
Great! Thanks a lot! Is there a Pull Request of your code for this repo? I would say many people won't know about your independent changes, and it would be nice to merge your great changes to the main repo.
from altdrag.
from altdrag.
Related Issues (20)
- Is X or D Input support possible? HOT 9
- Suggestion: Scroll to adjust screen brightness
- Windows 11 start and other ui elements are able to be broken. HOT 2
- Add toggleable option for Alt + Shift window snapping HOT 2
- Instructions for dealing with DPI scaling on Windows 11 HOT 2
- Feature request: Add option to disable centre resizing. HOT 1
- Window movement lags when the window is partially off-screen HOT 2
- Pressing shift causes programs to lose mouse capture HOT 2
- [Feature request] - Hotkeys ? HOT 1
- Does anyone know? HOT 3
- WSL2 Windows only move the display, not the clickable area HOT 3
- Snaps any window HOT 2
- Any updates? HOT 1
- Finnish (fi-FI) HOT 2
- Ability to disable Ctrl screen imprisonment
- Add new functions?
- Link to website in About is invalid HOT 2
- Alt+Drag (probably falsley) detected as Malware on VirusTotal (2/75) HOT 1
- thank you for this project [not an issue] HOT 1
- Windows 23H2v2 conflict with Alt + TAB task switcher HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from altdrag.