Giter Club home page Giter Club logo

altsnap's Introduction

English | 中文 | 한국어

AltSnap

Fork from Stefan Sundin's AltDrag.

Check the Wiki: https://github.com/RamonUnch/AltSnap/wiki

Original documentation: https://stefansundin.github.io/altdrag/doc/

Note that the documentation is not 100% accurate because it is a fork. Read the changelog for more details.

It allows you to move and resize windows by using the Alt key and clicking wherever on the window instead of relying on very precise clicking. This behavior is very common on Linux distributions and is not actually hard to implement on Windows.

This fork tries to keep a version up to date with minimal amount of bugs while keeping it feature-rich.

It is oriented towards all Windows users from Windows NT 4 to Windows 11, even though it is mostly tested on Windows XP and Windows 10.

Main differences: To simplify the code greatly the Hooks windows feature was removed, it allowed you have windows snapping while dragging them normally. It required however to inject a dll in every application and induced thus an obvious security risk. The amount of mess added to the code just for this feature was substantial and in addition forced to have both a 32bits and a 64bits version of the program running at the same time.

This version injects nothing into other applications. This means you do not have to worry whether you have a 32 or a 64bit operating system.

Another feature that was disabled is focus on typing, that was too much unusable for me to even start testing, so I removed it.

Otherwise this has a much simpler source code, added a few extra options, such as transparent windows dragging, Maximize action, pause process options, more blacklists for finer control of AltSnap etc.

Finally it fixed a ton of undesired behavior and bugs from the original AltDrag.

WHAT'S NEW

Many new features can be seen in the option dialog box, however some of them are only available through editing the AltSnap.ini file (middle click on tyhe tray icon for this).

VirusTotal false positive

You will see with the latest builds that there are some allerts, usually from SecureAge APEX sometime also from another vendor. Those are false positive and I stopped to contact the APEX team for every release becase it is a loss of time I would rather spend on improving the program. I already redued a lot the numberof false positive, simply by changing build flags and by switching to an older version of NSIS installer system. This is an indication of the impertinance of some modern antivirus solutions. Chocolatey considers that up to 5 positives on VirusTotal is not even suspicious.

Build

AltSnap builds with gcc, I use Mingw-w64 (for i686). Just install the latest version (I use TDM-gcc 10.3, MinGW64 based) and use:

> make for i386 Win32 GCC build.

> make -fMakefiledb for i386 GCC debug build.

> make -fMakefileX64 for x86_64 GCC build.

> make -fMakefileX64db for x86_64 GCC debug build.

> make -fMakefileClang for i386 build using LLVM Clang.

> make -fMakefileTCC for i386 build using tcc, Bellard's thiny c compiler

You can also use mk.bat and mk64.bat files. For Clang, I use LLVM5.0.1 with the headers and libs from Mingw-w64. Be sure to adjust your include and lib directorries on the command line with -IPath\to\mingw\include and -LPath\to\mingw\lib.

altsnap's People

Contributors

1kko avatar brian6932 avatar cjykk avatar dyras avatar elee1766 avatar kakakaya avatar mbartlett21 avatar noamraph avatar ramonunch avatar scx avatar sequencerr avatar troudhuk avatar vladkappa avatar yatli avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

altsnap's Issues

Mouse Cursor Very Laggy on Windows Startup/Invisible cursor

This has only happened the once, but on logging in to my rebooted system, the mouse was very laggy and delayed in control. Windows itself was fine and snappy, and only as soon as I quit AltDrag did the mouse return to its expected behavior.

I have AltDrag set up to run on login via Task Scheduler and to elevate the program. Also, it may be limited to behavior in one of the recent hooks.dll that you have provide me.

Interestingly, after killing the program and re-running it via the task schedule, it's performing fine. Maybe it only occurs on start-up? I'll have to keep an eye out if it happens again.

Thanks.

AltDrag 1.32 (dev hooks.dll)
Windows 10 20H2

Help with transaltions

Dear users

AltSnap is fully translated. however I can only update English French and Italian.
All the other translations are partial, because I do not speak those languages at all.

So if you are familiar with a language and you are willing to help with the project, then I would be very thankful if you could spend some time to complete/improve a current language or even create a new one.

If you want to help with this, go to the Lang directory of AltSnap and edit the ini file you want to improve directly in this folder. look at _en_US baseline.txt that contains all the strings in English, that you can use as a reference for missing strings.

The format is very simple, it is a simple ini file with the [Translation] section. For example:
AdvancedFullScreen=Enable on &full screen windows

You can edit with Notepad or any other text editor that supports Unicode.

It must be encoded in UTF-16 LE but you can give me any other encoding, I will convert, so do not worry about it...
Do not forget to credit yourself in the "Author=" list

To try your translation, just select it in AltSnap. If it is already selected, select an other language and select it again to force AltSnapg to reload it. Double check that the text is not too long and fits inside the dialog.

Naming convention:
language_COUNTRY.ini
fr_FR.ini --> French from France;

  1. Keep in mind that if you want a carriage return in your string you can use '\n' sequence.
  2. You can set a shortcut key by prefixing a character with the '&' symbol. try to have no conflict with other shortcuts. for instance on the above example the shortcut to enable/disable the feature will be the ALT+F because of the '&full screen'.

Once you are happy with your improved translation, send it to me in some way: a new pull request, a new issue or even in this thread, this does not matter. Only your translation does.

I thanks here again TroudhuK for his help with the French translation.
Also thanks to yatli, 1kko and Ichisich for their very regular updates.

If you have any questions do not hesitate.
EDIT: Updated _en_US_baseline.txt (right click ->> Save link as...)

EDIT: Updated zip of all langs Lang.zip
EDIT: Dev builds of AltSnap:

AltSnap1.61bin_x64.zip
AltSnap1.61bin.zip

ini comments confusing for `AeroMaxSpeed` and related settings

AeroMaxSpeed=20
AeroMaxSpeedInt=1
; Speed beyond which AeroSnaps will not occure while Moving.
; AeroMaxSpeed is in pixels/X frames (from 1-65535)
; AeroSpeedInt to specifies the number of frames (default 1) from 1-255.
; To set this value: (i) See the frequency of your mouse and set an
; AeroSpeedInt to average over 10ms or so, so if you have a 1kHz mouse,
; set it to 8-10, if you have a ~100Hz mouse (typical) keep it to 1 or 2.
; (ii) Set AeroMaxSpeed to a "high" value (like 50) and try to move fast
; a window between two monitors, if it get aero-snapped, decrease the value
; until it "just" no longers snaps. (iii) check that the window does snap
; when you want it to sap, if the window tends to restore when you do not
; want increase the AeroMaxSpeed value.

It mentions AeroMaxSpeed and AeroSpeedInt, but not AeroMaxSpeedInt.

Perhaps this is outdated? I'm not sure which to use.

Thanks.

Feature Request: Setting to define transparency stepping

I'd like a way to define how many steps of transparency is changed on Alt + Scroll. And also for Alt + Shift + Scroll. I'm specifically interested in customizing how many steps the Shift scrolling takes as the default step is still too large.

I don't think there is a way to do this currently.

v1.35

Feature Request: Alt+Shift resizing from center of window to expand only left/right or up/down (`ResizeCenter=1`)

It would be cool if Alt+Shift when right-click dragging from the center of the window (ResizeCenter=1), only expanded left/right, or up/down, instead always in all directions. Ideally, you would be able to grab anywhere inside this center box, and if you click-and-drag for over maybe 10px(?) left/right, then resize both +x/-x until releasing the mouse button. If up/down is the first to be clicked-and-dragged over 10px(?), then do the same but for +y/-y. Maybe there is a way to change your mind after starting left/right, or it could just be locked until your next click.

From #7 (comment).

Crash when moving or resizing on secondary monitors

Problem:

When using alt + left-click to move a window on my secondary monitors ( Left, right ), AltDrag crashes and then immediately relaunches itself, causing its tray icon to flicker, and the window not to be moved.

Alt + middle-clicking to maximize/restore a window works as expected, even on the secondary monitors, while alt + right-clicking to resize will crash it just like alt + left-clicking to move.

Everything works fine on the man display (center monitor with taskbar, "Make this my main display" checked ), including alt + left-click to move and alt + right-click to resize

If I check "Make this my main display" for either of the other monitors, it will work on that monitor, and stop working on the other monitors.

When moving a window from the primary center monitor to the left or right monitors, AltDrag crashes the moment the cursor passes over the border.

Setup:

AltDrag version 1.32
Windows 10 2004 ( Updated to 20H2, no change )
AMD Ryzen 3900x
RTX 2070 Super

Monitors:
Left: 1080p HDMI ( Scaling 100% )
Center: 4k DisplayPort ( Scaling 200% )
Right: 1080p HDMI ( Scaling 100% )

I would include a crash log, but have been unable to find any. It does not appear in Window's event manager either.
This is a wonderful tool, and Instructions on how to proceed to acquire useful debug information would appreciated.

Installer?

How do you recommend installing this? Just overwriting the existing AltDrag files in AppData/Roaming? Will it work with an existing AltDrag configuration?

As of the last few updates hold Shift+W and LC Drag is pulling cursor from some fulscreen/FSW programs.

I am aware that I can just blacklist the affected apps, but this is the first time AltDrag has caused an issue for me and I thought you should know.

I had a devil of a time diagnosing it because a hang of Windows 10 corrupted my Logitech G600 Mouse Drivers and Software that was complicating pinning down this issue until I re-installed them. Then I found disabling AltDrag fixed the issue but re-installing it didn't.

The primary issue is I am an ARK Survival Evolved player, playing on a double/triple monitor set-up (depending on the situation) and I am having a Northbridge overheating issue which is a design issue with my mobo as it gets older and was the first thing I blamed on this weird problem where Ark would lose my mouse and move into my secondary monitor. Then after a Windows 10 hang that didn't BSOD it got worse and seemed to spread to other software.

To simplify it I noticed that one of those programs stopped having issues when the companion software had crashed without me noticing. Then I reinstalled it all and I thought it was fixed only to find some games and fullscreen software that locked the mouse down were still 'randomly' doing it. I thought it had to do with a mod that blah blah blah broken controls.

Tonight I found that it was holding L.Shift and W then LM Click Hold Dragging was the culprit. W being forward for the player character, shift bein run/move quickly, and clicking or holding the Left Mouse/Mouse1 is attack and mouse movement is panning the camera/your direction of attack. Sometimes this would cause the cursor to center on the second screen and then move, but the vast majority of the time this just takes the mouse from below the fullscreen on the monitor you game on to the direction you are dragging.

Disabling and terminating Alt-Drag stops this dead.

I have AltDrag installed through Choclatey and tried reinstalling it and that didn't help. I have noticed that it has been updated several times recently and this started 3-4 updates back, but I haven't noticed exactly when because I am not exactly gaming much unitl I can fix the cooling interface on this computer or get my newer one up and running I haven't been gaming much.

I am on Windows 10 Pro and AltDrag1.41. Can Supply any other info you may need.
So far the two games it has affected is Team Fortress 2 and Ark Survival Evolved. Both of which I have used AltDrag with for years and had no issues like this.

Feature Request: Don't aero-snap or edge-snap window when moving cursor fast

It can be a bit jarring when the window attempts to snap every time you cross the point between two screens on a dual monitor setup.

AquaSnap has a nice feature where if your cursor is moving above a certain speed threshold, it won't attempt to snap to edges. This ideally would also apply to aero-snapping (which is something AquaSnap doesn't currently do, but I think would be nice).

as

This would help reduce the flashes of windows attempting to resize / snap when moving a window to another monitor.

Win10 (version 20H2) Multiple instances of AltDrag

I find multiple instances of AltDrag populating the systray and shown in task manager despite it being configured for single instance in its .ini. Install directory: %AppData%\AltDrag

In AltDrag.ini:

MultipleInstances=0
; Set to 1 to allow multiple instances of AltDrag.

Untitled

Roll/Unroll windows - Lower windows by middle clicking - Scroll wheel + Volume

First of all, thank you for your great developement

I noticed ...

  • Roll/Unroll windows: A rolled up window cannot be unrolled after Altdrag has been deactivated or closed and then reactivated or restarted.
  • Lower windows by middle clicking cannot be disabled - it always (!) continues to work, even after closing Altdrag. It would also be good if you could extend the function with Ctrl/Win/Alt - I always close tabs in Firefox by middle clicking.
  • Scroll wheel + Volume does not work on the desktop (only there).

W10-20H2

Greeting from Bonn!

Bug: `FullWin=0` is slow and not performant

The .ini claims that setting FullWin to 0 should be more performant, yet the rectangle it draws is drawn and updates much slower than when the full window is drawn normally (FullWin=1).

AltDrag v1.32
Windows 10 20H2

AltDrag stops working when the scaling settings is changed

Steps to reproduce:

  • have AltDrag running
  • navigate to Display Settings/Scale and layout
  • change the scaling settings to a different value
  • AltDrag stops working, the icon is still in the notification area + the process is still running, but the software does nothing (exiting requires killing the process from task manager)

OS is Windows 10 version 20H2 (OB Build 19042.685)

This is an annoying issue, as when Windows turns the screen off and then on (e.g. because of the power settings), it seems that turning on always starts with the 100% scaling setting, and only after that is it changed to the set value. It means that leaving the computer for prolonged times always causes AltDrag to stop working.

I'm not a developer - anything I can help with to eliminate this issue?

Bug: Resizing a window can lead to it being cropped

altdrag-window-offset
The black borders are actually the window's area, but the entire window is offset (I did not cut off part of the image). Where you see my cursor in the screenshot, it actually selected the line below and a little to the right.

Not sure of the steps to reproduce, but thought I'd mention this here.

(The window is only running as administrator because I was running AltDrag as admin and opened its config file via middle-clicking its tray icon.)

AltDrag 1.35

Disable for fullscreen apps

When an application is running in fullscreen AltDrag should not be enabled. This is useful for games which might utilize the activation hotkey.

Keep settings when updating?

Just updated to the 1.32, and noticed my .ini-file was overwritten. Perhaps this is a requirement while there are big changes being made to the application.

No longer able to change the transparency of VS Code or Discord

In previous versions, Alt Drag was able to affect the transparency of VS Code and Discord.

Firefox can still be affected, so something else is wrong. I tested removing all the blacklist settings, and the programs still do not respond to Alt+Scroll on the window to change transparency. Both problematic applications do respond to Alt+Scroll on the title bar to roll/unroll. Elevating AltDrag does not help.

AltDrag v1.40

Whitelist mode instead of blacklists and regexp into blacklist

If the first element of a blacklist is *|*, then all windows that are not listed will be considered as part of the blacklist.
This turns the blacklist into a whitelist ie: list of windows for which AltDrag will be enabled. It can be useful if you only want to use AltDrag on very few programs, then you just enable it on those programs. Both title|class and processes.exe styles are supported.

Exemple: Processes=*|*, explorer.exe, notepad.exe will enable AltDrag only on the explorer and the notepad windows.

Now the * joker can be used at the end of the class or at the beginning of the title in a blacklist item to include all matching patterns after or before the *.
Format: *end of title|begining of class*, note that only one star for each element (class or title) is supported and the star character is only supported at the beginning of the title or at the end of class (far from the separating vertical bar |).
Example: *|Winamp*. to include all the Winamp windows. or *SumatraPDF|SUMATRA_PDF_FRAME for Sumatra window, have a look at #64 for more info.

This may be useful to make better rules. Note that the processes blacklists are not concerned by this.

Test build: AltDrag-1.44-test7.zip

Some fullscreen windows do not move

I move windows between monitor and TV in linux. Dimensions of those are different but linux keeps windows fullscreen while moving between devices. In win7 "Firefox" and "Windows Media Player" (std on win7) in fullscreen mode do not move even on a single device. At the same time Explorer window and "mpv player" does move (between devices, but dimensions do not fit into device).

Is it a bug of AltDrag or win7 or Apps?

Snap Threshold has no effect

I believe this setting is to allow you to specify the distance a window will begin snapping.

Unfortunately setting this to even 100 will not affect the distance for tiling. This setting is most useful for those of us with multi-screen setups.

Sticky window snapping

I am working on a sticky-resize that automatically resizes all the other windows that are snapped to the current one when you resize it

Eg1: You have a window snapped Right and an other Left, then if you resize one of them horizontally (with AltDrag) the other will be resized to match (if you press the Shift key.)

EDIT Test build5: AltDrag-1.44-test5.zip
EDIT5: with latest build any touching windows will be resized when pressing Shift while resizing.
You need to check the Resize other snapped windows with Shift option in the General Tab to enable resizing of other windows touching the current window.

EDIT Test build6: AltDrag-1.44-test6.zip
MDI Support for SmartAero and StickyResizing

Key Combo and 'Non-click' window grabbing

@MarqueIV @kdougan @DrBones @pixelbase
Here is a version of AltDrag with an additional
KeyCombo option in the [Input] section of AltDrag.ini:

KeyCombo=0
; If set to 1 you will actually need to press two hotkeys
; to enable AltDrag. (any combinaison of two among all hotkeys)
; You need at least TWO hotkeys!
; Does not apply to Hotclicks!

You can use Alt and Win as hotkey and it will be required to press the combinaison of both keys to enable AltDrag.
This is a way to avoid 99.9% of conflicts with other programs.
Of course you can combine with an other instance of AltDrag in order to have different key combo do different actions with the same click.

An other option added on this build is the Non-click grab feature.
This let you move a window without clicking. set the GrabWithAlt=Move for example.

GrabWithAlt=Nothing
; Same than above but if set to something different than Nothing
; It means that the action will be performed when pressing the hotkey
; without needing to click. This is usefull for touchpads
; Try with GrabWithAlt=Resize and set ResizeCenter=2 and CenterFraction=60

This makes more sense combined with KeyCombo because otherwise the key is completly reserved to AltDrag.
Again you can combine with an other instance of AltDrag in order to have different key combo do different actions.
AltDrag.zip

Add an option to support the project through donations

This utility is worth much more than $0 for many of its users, so it would be nice to be able to contribute to it by donating. Even if you don't want or need donations right now @RamonUnch, there might be a time when that changes. Accepting financial contributions will allow users to increase the probability that this project will keep being maintained in the future.

Bug: MinAlpha=0: Scrolling on windows or the desktop is buggy

With MinAlpha=0, scrolling to minimum on a File Explorer window causes it to disappear and have no way to be made non-transparent. Scrolling up in the same spot does nothing: the window is gone it seems.

Scrolling to the minimum on the desktop causes it to break. I can't seem to take a screenshot of it but it essentially looks like this but much worse (no actual error windows appear, just a lot of visual artifacts of any moved window/thing). At this stage, I have to reboot because the system is a mess.

AltDrag v1.35

Cannot compile with i686-w64-mingw32 v10.2

 ┌─┐ F:\git\altdrag                                                                                                                                                                                                                                                              main ◇ ┆ Yatao
 └─╜ ╰▷ .\mk.bat

F:\git\altdrag>gcc -o AltDrag.exe altdrag.c altdragr.o -Os -fno-stack-check -fno-stack-protector -mno-stack-arg-probe -march=i386 -mtune=i686 -mpreferred-stack-boundary=2 -foptimize-strlen -nostdlib -lkernel32 -luser32 -lmsvcrt -flto -Wl,-dynamicbase,-nxcompat -Wp,-D_FORTIFY_SOURCE=2 -s -
Wall -Wformat-security -Wstrict-overflow -Wsign-compare -Wclobbered -Wempty-body -Wignored-qualifiers -Wuninitialized -Wtype-limits -Woverride-init -Wduplicated-cond  -Wduplicated-branches -Wlogical-op  -Wnull-dereference -lcomctl32 -mwindows -ladvapi32 -lshell32 -e_unfuckWinMain@0
c:/programdata/chocolatey/lib/mingw/tools/install/mingw32/bin/../lib/gcc/i686-w64-mingw32/10.2.0/../../../../i686-w64-mingw32/bin/ld.exe: C:\Users\Yatao\AppData\Local\Temp\AltDrag.exe.4nPatO.ltrans0.ltrans.o:<artificial>:(.text+0x2e): undefined reference to `__mingw_vsnwprintf'
c:/programdata/chocolatey/lib/mingw/tools/install/mingw32/bin/../lib/gcc/i686-w64-mingw32/10.2.0/../../../../i686-w64-mingw32/bin/ld.exe: C:\Users\Yatao\AppData\Local\Temp\AltDrag.exe.4nPatO.ltrans0.ltrans.o:<artificial>:(.text+0x830): undefined reference to `__chk_fail'
c:/programdata/chocolatey/lib/mingw/tools/install/mingw32/bin/../lib/gcc/i686-w64-mingw32/10.2.0/../../../../i686-w64-mingw32/bin/ld.exe: C:\Users\Yatao\AppData\Local\Temp\AltDrag.exe.4nPatO.ltrans0.ltrans.o:<artificial>:(.text+0x1725): undefined reference to `__chk_fail'
c:/programdata/chocolatey/lib/mingw/tools/install/mingw32/bin/../lib/gcc/i686-w64-mingw32/10.2.0/../../../../i686-w64-mingw32/bin/ld.exe: C:\Users\Yatao\AppData\Local\Temp\AltDrag.exe.4nPatO.ltrans0.ltrans.o:<artificial>:(.text+0x183a): undefined reference to `__chk_fail'
c:/programdata/chocolatey/lib/mingw/tools/install/mingw32/bin/../lib/gcc/i686-w64-mingw32/10.2.0/../../../../i686-w64-mingw32/bin/ld.exe: C:\Users\Yatao\AppData\Local\Temp\AltDrag.exe.4nPatO.ltrans0.ltrans.o:<artificial>:(.text+0x20cf): undefined reference to `__chk_fail'
c:/programdata/chocolatey/lib/mingw/tools/install/mingw32/bin/../lib/gcc/i686-w64-mingw32/10.2.0/../../../../i686-w64-mingw32/bin/ld.exe: C:\Users\Yatao\AppData\Local\Temp\AltDrag.exe.4nPatO.ltrans0.ltrans.o:<artificial>:(.text+0x2546): undefined reference to `__mingw_vswscanf'
c:/programdata/chocolatey/lib/mingw/tools/install/mingw32/bin/../lib/gcc/i686-w64-mingw32/10.2.0/../../../../i686-w64-mingw32/bin/ld.exe: C:\Users\Yatao\AppData\Local\Temp\AltDrag.exe.4nPatO.ltrans0.ltrans.o:<artificial>:(.text+0x2a14): undefined reference to `__chk_fail'
c:/programdata/chocolatey/lib/mingw/tools/install/mingw32/bin/../lib/gcc/i686-w64-mingw32/10.2.0/../../../../i686-w64-mingw32/bin/ld.exe: C:\Users\Yatao\AppData\Local\Temp\AltDrag.exe.4nPatO.ltrans0.ltrans.o:<artificial>:(.text+0x321e): undefined reference to `__chk_fail'
collect2.exe: error: ld returned 1 exit status

F:\git\altdrag>gcc -o hooks.dll hooks.c hooksr.o -Os -fno-stack-check -fno-stack-protector -mno-stack-arg-probe -march=i386 -mtune=i686 -mpreferred-stack-boundary=2 -foptimize-strlen -nostdlib -lkernel32 -luser32 -lmsvcrt -flto -Wl,-dynamicbase,-nxcompat -Wp,-D_FORTIFY_SOURCE=2 -s -Wall -
Wformat-security -Wstrict-overflow -Wsign-compare -Wclobbered -Wempty-body -Wignored-qualifiers -Wuninitialized -Wtype-limits -Woverride-init -Wduplicated-cond  -Wduplicated-branches -Wlogical-op  -Wnull-dereference -mdll -lgdi32 -e_DllMain@12
c:/programdata/chocolatey/lib/mingw/tools/install/mingw32/bin/../lib/gcc/i686-w64-mingw32/10.2.0/../../../../i686-w64-mingw32/bin/ld.exe: C:\Users\Yatao\AppData\Local\Temp\hooks.dll.bTKd7j.ltrans0.ltrans.o:<artificial>:(.text+0xca): undefined reference to `__mingw_vswscanf'
collect2.exe: error: ld returned 1 exit status
The system cannot find the file AltDrag.exe.

Output of gcc --version -v:

 └─╜ ╰▷ gcc --version -v
Using built-in specs.
COLLECT_AS_OPTIONS='--version'
COLLECT_GCC=C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw32\bin\gcc.exe
COLLECT_LTO_WRAPPER=c:/programdata/chocolatey/lib/mingw/tools/install/mingw32/bin/../libexec/gcc/i686-w64-mingw32/10.2.0/lto-wrapper.exe
gcc.exe (GCC) 10.2.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


Target: i686-w64-mingw32
Configured with: ../gcc-10.2.0/configure --build=i686-w64-mingw32 --target=i686-w64-mingw32 --disable-multilib --disable-64bit --prefix=/mingw32 --with-sysroot=/mingw32 --disable-shared --enable-static --disable-nls --enable-version-specific-runtime-libs --disable-win32-registry --without
-dwarf2 --enable-sjlj-exceptions --enable-fully-dynamic-string --enable-languages=c,d,ada,lto,c++,objc,obj-c++,fortran --enable-libgomp --enable-lto --enable-libssp -enable-gnattools --disable-bootstrap --with-gcc --with-gnu-as --with-gnu-ld --with-stabs --enable-interwork --with-mpfr-inc
lude=/home/betta/gcc-build/../gcc-10.2.0/mpfr/src --with-mpfr-lib=/home/betta/gcc-build/mpfr/src/.libs --enable-objc-gc --with-target-bdw-gc=/mingw32 --disable-dependency-tracking
Thread model: win32
Supported LTO compression algorithms: zlib
gcc version 10.2.0 (GCC)
COLLECT_GCC_OPTIONS='--version' '-v' '-mtune=generic' '-march=pentiumpro'
 c:/programdata/chocolatey/lib/mingw/tools/install/mingw32/bin/../libexec/gcc/i686-w64-mingw32/10.2.0/cc1.exe -quiet -v -iprefix c:\programdata\chocolatey\lib\mingw\tools\install\mingw32\bin\../lib/gcc/i686-w64-mingw32/10.2.0/ -isysroot c:\programdata\chocolatey\lib\mingw\tools\install\mi
ngw32\bin\../../mingw32 -U_REENTRANT help-dummy -quiet -dumpbase help-dummy -mtune=generic -march=pentiumpro -auxbase help-dummy -version --version -o C:\Users\Yatao\AppData\Local\Temp\ccT7odBY.s
GNU C17 (GCC) version 10.2.0 (i686-w64-mingw32)
        compiled by GNU C version 10.2.0, GMP version 6.2.0, MPFR version 4.1.0, MPC version 1.2.0, isl version isl-0.22.1-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
COLLECT_GCC_OPTIONS='--version' '-v' '-mtune=generic' '-march=pentiumpro'
 c:/programdata/chocolatey/lib/mingw/tools/install/mingw32/bin/../lib/gcc/i686-w64-mingw32/10.2.0/../../../../i686-w64-mingw32/bin/as.exe -v --version -o C:\Users\Yatao\AppData\Local\Temp\ccwymplS.o C:\Users\Yatao\AppData\Local\Temp\ccT7odBY.s
GNU assembler version 2.35.1 (i686-w64-mingw32) using BFD version (GNU Binutils) 2.35.1
GNU assembler (GNU Binutils) 2.35.1
Copyright (C) 2020 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or later.
This program has absolutely no warranty.
This assembler was configured for a target of `i686-w64-mingw32'.
COMPILER_PATH=c:/programdata/chocolatey/lib/mingw/tools/install/mingw32/bin/../libexec/gcc/i686-w64-mingw32/10.2.0/;c:/programdata/chocolatey/lib/mingw/tools/install/mingw32/bin/../libexec/gcc/;c:/programdata/chocolatey/lib/mingw/tools/install/mingw32/bin/../lib/gcc/i686-w64-mingw32/10.2.
0/../../../../i686-w64-mingw32/bin/
LIBRARY_PATH=c:/programdata/chocolatey/lib/mingw/tools/install/mingw32/bin/../lib/gcc/i686-w64-mingw32/10.2.0/;c:/programdata/chocolatey/lib/mingw/tools/install/mingw32/bin/../lib/gcc/;c:/programdata/chocolatey/lib/mingw/tools/install/mingw32/bin/../lib/gcc/i686-w64-mingw32/10.2.0/../../.
./../i686-w64-mingw32/lib/../lib/;c:/programdata/chocolatey/lib/mingw/tools/install/mingw32/bin/../lib/gcc/i686-w64-mingw32/10.2.0/../../../../lib/;c:/programdata/chocolatey/lib/mingw/tools/install/mingw32/bin/../lib/gcc/i686-w64-mingw32/10.2.0/../../../../i686-w64-mingw32/lib/;c:/program
data/chocolatey/lib/mingw/tools/install/mingw32/bin/../lib/gcc/i686-w64-mingw32/10.2.0/../../../
COLLECT_GCC_OPTIONS='--version' '-v' '-mtune=generic' '-march=pentiumpro'
 c:/programdata/chocolatey/lib/mingw/tools/install/mingw32/bin/../libexec/gcc/i686-w64-mingw32/10.2.0/collect2.exe -plugin c:/programdata/chocolatey/lib/mingw/tools/install/mingw32/bin/../libexec/gcc/i686-w64-mingw32/10.2.0/liblto_plugin-0.dll -plugin-opt=c:/programdata/chocolatey/lib/min
gw/tools/install/mingw32/bin/../libexec/gcc/i686-w64-mingw32/10.2.0/lto-wrapper.exe -plugin-opt=-fresolution=C:\Users\Yatao\AppData\Local\Temp\cc92rALS.res -plugin-opt=-pass-through=-lmingw32 -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lmoldname -plugin-opt=-pass-through=-l
mingwex -plugin-opt=-pass-through=-lmsvcrt -plugin-opt=-pass-through=-ladvapi32 -plugin-opt=-pass-through=-lshell32 -plugin-opt=-pass-through=-luser32 -plugin-opt=-pass-through=-lkernel32 -plugin-opt=-pass-through=-lmingw32 -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lmoldn
ame -plugin-opt=-pass-through=-lmingwex -plugin-opt=-pass-through=-lmsvcrt --sysroot=c:\programdata\chocolatey\lib\mingw\tools\install\mingw32\bin\../../mingw32 -m i386pe -Bdynamic --version c:/programdata/chocolatey/lib/mingw/tools/install/mingw32/bin/../lib/gcc/i686-w64-mingw32/10.2.0/.
./../../../i686-w64-mingw32/lib/../lib/crt2.o c:/programdata/chocolatey/lib/mingw/tools/install/mingw32/bin/../lib/gcc/i686-w64-mingw32/10.2.0/crtbegin.o -Lc:/programdata/chocolatey/lib/mingw/tools/install/mingw32/bin/../lib/gcc/i686-w64-mingw32/10.2.0 -Lc:/programdata/chocolatey/lib/ming
w/tools/install/mingw32/bin/../lib/gcc -Lc:/programdata/chocolatey/lib/mingw/tools/install/mingw32/bin/../lib/gcc/i686-w64-mingw32/10.2.0/../../../../i686-w64-mingw32/lib/../lib -Lc:/programdata/chocolatey/lib/mingw/tools/install/mingw32/bin/../lib/gcc/i686-w64-mingw32/10.2.0/../../../../
lib -Lc:/programdata/chocolatey/lib/mingw/tools/install/mingw32/bin/../lib/gcc/i686-w64-mingw32/10.2.0/../../../../i686-w64-mingw32/lib -Lc:/programdata/chocolatey/lib/mingw/tools/install/mingw32/bin/../lib/gcc/i686-w64-mingw32/10.2.0/../../.. C:\Users\Yatao\AppData\Local\Temp\ccwymplS.o
-lmingw32 -lgcc -lmoldname -lmingwex -lmsvcrt -ladvapi32 -lshell32 -luser32 -lkernel32 -lmingw32 -lgcc -lmoldname -lmingwex -lmsvcrt c:/programdata/chocolatey/lib/mingw/tools/install/mingw32/bin/../lib/gcc/i686-w64-mingw32/10.2.0/crtend.o
collect2 version 10.2.0
c:/programdata/chocolatey/lib/mingw/tools/install/mingw32/bin/../lib/gcc/i686-w64-mingw32/10.2.0/../../../../i686-w64-mingw32/bin/ld.exe -plugin c:/programdata/chocolatey/lib/mingw/tools/install/mingw32/bin/../libexec/gcc/i686-w64-mingw32/10.2.0/liblto_plugin-0.dll -plugin-opt=c:/programd
ata/chocolatey/lib/mingw/tools/install/mingw32/bin/../libexec/gcc/i686-w64-mingw32/10.2.0/lto-wrapper.exe -plugin-opt=-fresolution=C:\Users\Yatao\AppData\Local\Temp\cc92rALS.res -plugin-opt=-pass-through=-lmingw32 -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lmoldname -plugi
n-opt=-pass-through=-lmingwex -plugin-opt=-pass-through=-lmsvcrt -plugin-opt=-pass-through=-ladvapi32 -plugin-opt=-pass-through=-lshell32 -plugin-opt=-pass-through=-luser32 -plugin-opt=-pass-through=-lkernel32 -plugin-opt=-pass-through=-lmingw32 -plugin-opt=-pass-through=-lgcc -plugin-opt
=-pass-through=-lmoldname -plugin-opt=-pass-through=-lmingwex -plugin-opt=-pass-through=-lmsvcrt --sysroot=c:\programdata\chocolatey\lib\mingw\tools\install\mingw32\bin\../../mingw32 -m i386pe -Bdynamic --version c:/programdata/chocolatey/lib/mingw/tools/install/mingw32/bin/../lib/gcc/i68
6-w64-mingw32/10.2.0/../../../../i686-w64-mingw32/lib/../lib/crt2.o c:/programdata/chocolatey/lib/mingw/tools/install/mingw32/bin/../lib/gcc/i686-w64-mingw32/10.2.0/crtbegin.o -Lc:/programdata/chocolatey/lib/mingw/tools/install/mingw32/bin/../lib/gcc/i686-w64-mingw32/10.2.0 -Lc:/programda
ta/chocolatey/lib/mingw/tools/install/mingw32/bin/../lib/gcc -Lc:/programdata/chocolatey/lib/mingw/tools/install/mingw32/bin/../lib/gcc/i686-w64-mingw32/10.2.0/../../../../i686-w64-mingw32/lib/../lib -Lc:/programdata/chocolatey/lib/mingw/tools/install/mingw32/bin/../lib/gcc/i686-w64-mingw
32/10.2.0/../../../../lib -Lc:/programdata/chocolatey/lib/mingw/tools/install/mingw32/bin/../lib/gcc/i686-w64-mingw32/10.2.0/../../../../i686-w64-mingw32/lib -Lc:/programdata/chocolatey/lib/mingw/tools/install/mingw32/bin/../lib/gcc/i686-w64-mingw32/10.2.0/../../.. C:\Users\Yatao\AppData\
Local\Temp\ccwymplS.o -lmingw32 -lgcc -lmoldname -lmingwex -lmsvcrt -ladvapi32 -lshell32 -luser32 -lkernel32 -lmingw32 -lgcc -lmoldname -lmingwex -lmsvcrt c:/programdata/chocolatey/lib/mingw/tools/install/mingw32/bin/../lib/gcc/i686-w64-mingw32/10.2.0/crtend.o
GNU ld (GNU Binutils) 2.35.1
Copyright (C) 2020 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
COLLECT_GCC_OPTIONS='--version' '-v' '-mtune=generic' '-march=pentiumpro'

Snapping to resized snapped window.

Default Windows Aero snapping can snap windows to another snapped windows even if the other window was resized.

Could this be added to this program?

Autostart creates instance in task manager that doesn't work

I've tried uninstalling and messing around with my startup app settings and task scheduler in order to get this fixed without any luck. When it's started in either two of those ways it will run as a Background process with 1 MB of memory but not work at all. Only when I manually click on does it launch a new instance that takes up 2.5 - 4MB of memory does it work.

Any help would be much appreciated.

Bug: Aero Snap: Holding Ctrl to restrict the cursor to the current screen doesn't always work

In my dual monitor setup, I can sometimes press and hold both my hotkey (WinKey) + Ctrl, grab the window (Firefox) and move it across the middle to the other screen (dragging from my left screen to the right one), but still with every button held, trying to return the window to the previous screen fails as it has locked to the second monitor. It's not 100% reproducible, more like 50% and I'm not sure why. Sometimes it'll lock to the screen the window starts on, others times it won't as described above. It also happens in the opposite direction (right monitor to the left).

AltDrag 1.32
Windows 10 20H2

Bug: Lower windows by middle clicking on title bars: Can't close Windows Terminal tabs

Windows Terminal displays its tabs on top of the title bar, thus making closing the tabs with a middle click impossible (with "Lower windows by middle clicking on title bars" enabled). Disabling the option immediately remedies the issue.

I should be able to blacklist it, but ideally AltDrag would be able to cope with windows that display like this (which I haven't seen done other than by Windows Terminal).

Thanks!

Windows Terminal 1.4.3243.0
Windows 10 20H2
AltDrag 1.32

No GUI appears

When I right-click on the taskbar icon and select About or Configure, no GUI appears. AltDrag appears to be functional, however, as windows do move when I alt-drag them.
image

Missing feature from Stefan Sundin's version

So I just found about this fork and it's pretty neat, but I noticed a missing feature. Stefan Sundin's version had a feature in which if you had a window activated with AltDrag and pressed right click while having left click held it would maximize the selected window.

Bug: FoxitReader problem when moving/resizing

Hi, found a bug with FoxitReader.

When trying to move it with [LWIN] and LMB by the document content (red example field), it's making the "solitaire" effect.

When trying to move it outside (green example field), everything works without a problem.

The same problem when trying to resize the window and I grab it by the content.

First App where I noticed a problem with the new AltDrag.

ALtDragBug

Feature request: When lowering a window, also lose focus so that the lowered window can be immediately re-clicked

Take the scenario where you have a larger window on top of a smaller window contained within its footprint. For example, middle-clicking on the title bar (assuming the option for that behavior is enabled) lowers the window, revealing the smaller window. Now click on the larger window in the background and it will remain behind the smaller window (as the former still has the focus but without being in the foreground any longer). You must first change focus (click another window or the desktop) and then you are able to click on the background window, bringing it to the foreground.

Either this is a bug of some sort, or maybe the focus could be lost when a window is lowered to always make any window clickable and "bringable" to the foreground. When I say focus, hopefully focus can be transferred without say maximizing a minimized game (if the last used app was the default target). An alternative would be to give focus to the desktop (if possible) as a "safe" and predictable thing to receive focus in that scenario.

Thanks!

Windows 10 20H2
AltDrag 1.32

Aero Snap: Dragging via title bar after snapping does not restore original window dimensions

If I recall correctly, after snapping a window to a corner for example, Windows' Aero Snap would restore the window's original dimension when dragging it back to the center of the screen. This does work if you hold your defined hotkey and drag the window (dimensions restored), but sometimes one reaches for the title bar. The way to "get back" your window dimension is:

  1. Drag window to the screen's edge and snap it to the corner.
  2. Drag it back away to the center of the screen via its title bar (window shape is now that of the corner snap).
  3. Perform a Move via your set hotkey and AltDrag restores the window's original dimensions (if performing a Resize however, the dimensions are overwritten / i.e. lost).

If AltDrag could somehow handle this scenario, I'd be grateful.

Also, it may be worth considering clarifying the two features with "snap" in the name. i.e. renaming "Automatically snap to:" => "Snap window edges to:".

Finally, despite this having removed some features compared to the original, it still may be worth linking the original documentation somewhere.

Thanks for forking this by the way 🙂

AltDrag v1.32
Windows 10 20H2

Bug: Need to press ctrl after very desktop unlock

Hi, firstly let me tell you - big thanks for continuing AltDrag. There were some problems with the original version that you resolved in this and it's awesome!

Found a bug.

When I lock my screen [WIN+L], and unlock it by pin, the cursor is behaving somewhat weirdly. It can't click on windows, it's like there is pushed a button all the time.

I need to press [CTRL] to "unhook" this and now the cursor behaves and works normally.

If I disable AltDrag this is not happening.

Feature Request: Roll / collapse windows into their title bar

One thing I miss from other similar programs I've used in the past (WinRoll / 4t Tray Minimizer) is being able to shrink a window into only its title bar. I found this quite useful to quickly look behind a window or when I only need to see the title bar, or for example comparing two images (if both windows are on top, you can toggle the "window rolling" and compare both images). Maybe such a feature would be a possibility for AltDrag's mouse actions. This feature is expected to be a little buggy since not all windows manage to collapse into their title bar, e.g. Firefox (but it still does shrink considerably, and restores when "unrolling").

From #7 (comment).

Mouse button as a hotkey

AltDrag.zip

in the ini file you will see these lines the [Input] section:

Hotclicks=80
; Mouse clicks that can be used to trigger AltDrag
; This can be used together the Hotkeys or as a replacement.
; Space separated hexadecimal values.
; Values: MB4=80 MB5=81 MMB=20
; Just do not use LMB and RMB please (I do not give the values here)
; For exemple I would suggest to use MB4 and/or MB5 ie: Hotclicks=80 81
; You could also use use MB4=Move and MB5=Resize so that the click direclty move resize.
; NOTE: If you set a mouse button as hotclick it will no longer be usable for other
; than the activation of AltDrag.

For the moment I only tried with middle mouse button (20) as the mouse I have on hand does not have XButtons
You can set an empty value to only use the Hotkeys

Transparency: Allow a minimum transparency value to be set

Being able to set a minimum value that the transparency can be lowered to would help not losing track of a window accidentally. Currently, the minimum allowed is so low that it's practically entirely invisible. A way to define a minimum value would be appreciated.

AltDrag v1.32
Windows 10 20H2

Can't scroll while dragging file

I noticed that versions after 1.29 seem to have issues scrolling when the LMB is down. The scroll wheel does nothing until the button is released, making it impossible to highlight text, drag a file, etc. beyond the current viewport using the wheel.

I think this may be related to a similar issue some versions had where some programs erroneously receive two scroll events when the wheel is turned one notch.

Here's my quick test (Win 7 x64, "scroll inactive" enabled):
V1.29: Works as expected.
V1.30: Scrolls twice per wheel detent in some apps (Chrome, Win7 tray calendar, etc). Also doesn't allow scrolling while LMB is down (ie, can't scroll with wheel while dragging a file)
V1.31: Still doublescrolls. Drag scroll seems to work.
V1.32: Doublescroll fixed but now drag scroll broken.
V1.33: Ditto

Thanks for the work on keeping Altdrag alive.

Disabling AltDrag if hitting Control before the click.

I have a proposition to avoid conflicts:
imagine you want to do alt+click on a window that is not blacklisted. For now it is impossible because it will start dragging the window instantly.
A solution could be:

  1. Press Alt
  2. hit Control key and release it.
  3. Click

So the Control down/up will disable AltDrag unless you release and press Alt again or an action was already going.
The keyUP event disables AltDrag so it does not conflict with Alt+Ctrl+Click and drag to restrict in current monitor.
Here is the Very simple modified hooks.dll
What do you think? Should it be in the next release? Implementation is only one line of code.
If you see any troubles with this behavior tell me.
If you want this in the next release hit the Thumbs up, and If you have any comment go on...
hooks.zip

An option to make the window translucent while dragging

Normally I would probably not consider this to be in the scope of the project but considering it already can handle changing window transparency, I feel like such functionality could belong here and might not even be that hard to achieve (this part is just a guess though).
What I'm asking for is an option for AltDrag to make the window translucent while it's being alt-dragged (and opaque once it's no longer dragged).

This is a functionality that can be seen on some of the Linux DEs like KDE and is now even somewhat possible to achieve with PowerToys Fancy Zones (it seems incidental, but it can be configured in such a way that the actual zones functionality is disabled while still having the toy make the dragged windows translucent) but that only works for regular dragging using the title bar, not alt-dragging.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.