I use an AHK script "KDE Window Drag" which enables moving/resizing windows (in Windows) by mouse click-and-dragging anywhere inside a window instead of having to click-and-hold the window's title bar (for moving) or the razor-thin window borders (for resizing).
The script works, however, the visualization is choppy/stuttery, as if it's running at a much lower framerate/FPS than doing this natively with Windows. When I move or resize using the standard Windows functions, it's a smooth 164Hz animation.
I've wondered if Windows utilizes some native API DWM function for moving/resizing windows whereas this AHK script more or less is doing a bunch of repeated micro actions, limited by a polling or "refresh rate" of Autohotkey (and its firing of actions).
Is there a way to have AHK mirror Windows visualization for this?
Problem witih "framerate" when dragging windows with AHK
- Coldblackice
- Posts: 29
- Joined: 13 Nov 2013, 14:39
Re: Problem witih "framerate" when dragging windows with AHK
Hi
Try replace:
by
or
(not tested)
A_AhkUser
Try replace:
Code: Select all
SetWinDelay,2
Code: Select all
SetWinDelay,0
Code: Select all
SetWinDelay,-1
A_AhkUser
- Coldblackice
- Posts: 29
- Joined: 13 Nov 2013, 14:39
Re: Problem witih "framerate" when dragging windows with AHK
This worked perfectly! Setting this to "0" did the trick, thanks for that.A_AhkUser wrote: ↑21 Sep 2020, 15:48Hi
Try replace:byCode: Select all
SetWinDelay,2
orCode: Select all
SetWinDelay,0
(not tested)Code: Select all
SetWinDelay,-1
A_AhkUser
The only issue now is the resizing function: when resizing, the area of the newly-expanded area of window is blank/white until you let go of the resizing. It's like it's waiting for you to stop resizing before it redraws to fill in the space. When resizing a Windows explorer window using the default border-corner, the explorer window and its contents resize and adapt "live" while you do it, the contents of the window shifting and adapting to whatever shape of window you drag.
I know this isn't a huge functional deal, but might there be a way to mimic the default Windows ability to resize? I'm not sure why the window isn't immediately redrawing when using my AHK script's resizing function.
Thanks again for the help!
Re: Problem witih "framerate" when dragging windows with AHK
In windows you want show window contents while dragging checked and that should fix your last issue.
Should be under Performance Options >> Visual Effects.
HTH
Should be under Performance Options >> Visual Effects.
HTH
Who is online
Users browsing this forum: jollyjoe and 325 guests