Windows alt drag window

Dragging Windows 10 window anywhere

Is there a way in Windows 10 to drag a window by clicking anywhere on it? In Linux it’s possible to do this by holding Alt ? I’m used to this from Linux and really like that feature. It seems I can only drag a Windows window by the title bar. Is there a remedy to this?

3 Answers 3

Check out AltDrag for Windows 10. It’s free, was an instant setup/download.

I’m coming from an Ubuntu development environment and I had the same frustration(s) with Windows so far, it does exactly what I wanted and more!

Not only can you hold Alt to immediately grab and drag/drop a window, but you can hold Alt and double click to maximize, if you need to snap to the shared edge in a dual monitor setup you can hold Ctrl while holding alt to force the window to stay on the current monitor and more.

What is AltDrag?

AltDrag gives you the ability to move and resize windows in a new way. After starting AltDrag, you can simply hold down the Alt key and then click and drag any window.

This behavior already exists in Linux and other operating systems, and AltDrag was made with the mission to copy that behavior to the Windows platform, and then to further expand it with new intuitive functionality.

You can use AltDrag in many ways. Here are some examples:

  • Hold down the Alt key, then drag windows with the left mouse button.
  • Use the right mouse button to resize windows. It will resize from the corner or edge you grab closest to.
  • Hold down the Shift key to snap to other windows. You can enable automatic snapping in the options.
  • If you have automatic snapping enabled, you can hit the Space key to temporarily disable it.
  • You can scroll inactive windows with the mouse wheel. If you hold down the Shift key while doing this, it will scroll the window horizontally (some programs does not support this).
  • If you have trouble moving a window, it might be because it’s an elevated program (administrator privileges). To move it, you must run AltDrag with administrator privileges too. There is a button in the options to do this.
  • Windows are not brought to the front by default, hit the Ctrl key to bring a window to the front. You can change this in the options.
  • Double-click to maximize windows. Double-click with the right mouse button to move it to a corner or side (which one depends on where you double-click).
  • If you drag a window to an edge or corner of the monitor, it will resize to occupy that space. In Windows-speak, this is called Aero Snap.
  • You can configure Alt-scrolling to do cool things such as: scroll through open windows, changing the volume, changing transparency. When changing the volume of transparency, you can hold down the Shift key to change it in smaller steps.
  • You can enable MDI support in the options.
  • Multi-monitor support! You can hold Ctrl while dragging to trap the window within the current monitor. This is particularly useful if you want to Aero Snap at edges between monitors.
  • If you move a maximized window from one monitor to another, the window will automatically be maximized on arrival. You can hit the Ctrl key to restore it without needing to release the mouse button.
  • AltDrag is tested on Windows XP, 7, 8, 8.1 and 10.
Читайте также:  Windows player не показывает субтитры

The guy accepts donations and it was definitely worth the price of a coffee to me

Alt+Drag or Windows+Drag to move windows #269

Comments

mattroyal commented Sep 6, 2019

Summary of the new feature/enhancement

Moving windows using the mouse relies on hitting a small target, especially on high-resolution screens. Add an option to move entire windows by alt-dragging or windows-dragging them, anywhere on the window except perhaps the resize area.

Proposed technical implementation details

Stefan Sundin has done great work on AltDrag: https://stefansundin.github.io/altdrag/ . With permission, I’d use this as an initial reference.

Alt+Drag or Windows+Drag could be implemented as part of FancyZones, activated with a toggle.

The text was updated successfully, but these errors were encountered:

loligans commented Sep 9, 2019

Alt+Drag would be nice, but also Alt+Resize would be just as helpful. Especially if the window snaps to borders.

dnunes commented Sep 9, 2019

Alt+Drag and Alt+Resize with snapping is my dream for windows management on Windows system.
Unfortunetely AltDrag (app) doesn’t play along with my current AutoHotKey «Keyboard Second Layer» (uses LAlt), as it eventually start acting up and I have to close and reopen it. Having this funcionality in PowerToys would be wonderful.

stefansundin commented Sep 10, 2019

Thanks for suggesting this @mattroyal. I am ok with AltDrag being used as a reference.

Maybe when it is done and AltDrag becomes somewhat obsolete, then maybe Microsoft can send me a donation. Or at least buy me lunch (I live in Seattle now). 😉

enricogior commented Sep 12, 2019

@stefansundin
if you are interested, you may consider adding your awesome tool as a PowerToys module.

enricogior commented Sep 13, 2019

@stefansundin
also, consider that it will be possible to put a link to your web page in the powertoys settings with a text like «Donate to author», so users that want to donate for your work will know how to do it.

loligans commented Oct 21, 2019

I’ve decided to take a stab at this PowerToy.

enricogior commented Oct 22, 2019

Hi @loligans
great to hear!
It would be nice to make the ‘Alt’ key configurable since in some apps ‘Alt drag’ is actually used for other purposes. You can take a look at the FancyZones code for an example of how to make a key configurable through the settings.
If you have any question don’t hesitate to ask.

loligans commented Oct 22, 2019

Yeah I’ve been utilizing the fancyzones project as a frame of reference. They share very similar functionality, so it’s made it easier to get started. It’s open for discussion, but for an initial version here are the settings that can be modified.

enricogior commented Oct 23, 2019

Hi @loligans
I should let you know that we have already plans for a «Always on top» module with a specific UI in mind.
My suggestion is that you start with implementing just the Alt-drag functionality and then we can chat about adding more functionalities.
Sounds like a plan?
Thanks you.

loligans commented Oct 31, 2019

Is there a way I can reference the branch I’m working on in this github issue? That way I can get feedback from the other engineers on this feature.

enricogior commented Oct 31, 2019

Hi @loligans
fork this repo, create a working branch on the forked repo and post here the link to that branch.

loligans commented Oct 31, 2019

loligans commented Oct 31, 2019

Just wanted to document this here:

Читайте также:  Тема для windows predators

I added a low level mouse hook since I’ll need to process mouse position while the module activationHotkey is pressed. According to the LowLevelMouseProc documentation if the hook procedure takes longer than the LowLevelHooksTimeout timespan defined in HKEY_CURRENT_USER\Control Panel\Desktop the hook procedure will timeout and be silently removed without being called.

The implementation is nearly identical to the keyboard hook we have set up already.

Because the mouse will be sending in a flood of events compared to the keyboard, we’ll likely want to minimize the amount of processing done on the hook. For now I’m gonna do everything on the hook and measure if we are well below the LowLevelHooksTimeout threshold.

If we’re reaching close to the LowLevelHooksTimeout threshold then we may want to only process as much as necessary on the hook and then before returning trigger an event on a worker thread.

enricogior commented Nov 1, 2019 •

Hi @loligans
excellent point. We also need the low level mouse hook for other PowerToys, so I opened a dedicated issue to track the technical details of its implementation #638
Feel free to add your considerations there.
For now I suggest you continue on the assumption that there will be a mouse hook that will guarantee to not exceed LowLevelHooksTimeout .

crutkas commented Dec 19, 2019

while this could be associated with FancyZones, i think they are distinct different asks. I think we should track work that spans both and understand it may be the same/shared engine under the hood but i don’t think we should merge the two as a holistic entity.

altdrag — упрощаем работу с окнами в Windows

Вкратце: бесплатная утилита altdrag упрощает управление окнами (move&resize) в Windows.

А именно, при зажатой клавише ALT:

  • левой кнопкой мыши можно перетаскивать окно, ухватившись за любое место окна (не обязательно за заголовок);
  • перетаскивание правой кнопкой мыши будет изменять размер, а именно двигать ту границу, к которой ближе был курсор;
  • кое-что ещё (см. под кат).

Да, именно так, как это работает в Linux.

Это очень удобно. Не нужно целиться в заголовок и в границу окна.

Программа будет особенно полезна обладателям экранов с маленьким разрешением (например, нетбуки). Она поможет «обуздать» окна, превышающие размер экрана, которые обычно перетащить не получается.

Как это работает

Небольшое видео, демонстрирующее работу программы:

Как работает ресайз:

Окно разделено на 9 областей. Каждая из 8 крайних областей отвечает за передвижение ближайшей границы окна.
Центральная область работает очень хитро: растягивает окно по вертикали или по горизонтали, оставляя центр окна на месте (т.е. двигаются сразу две противоположные границы).

altdrag может ресайзить даже окна, которые обычно ресайзить нельзя (диалоги, настройки). Пока не придумал, чем это может быть полезно.

Бонус: Alt+DoubleClick в любом месте разворачивает окно, Alt+Click восстанавливает развёрнутое.

altdrag может быть полезен и владельцам многомониторных систем: можно таскать окна с монитора на монитор, при этом развёрнутые окна остаются развёрнутыми (можно отключить).

Настройки
  • можно назначить клавиши, при зажатии которых выполняются действия (по умолчанию оба Alt);
  • можно назначать на каждую кнопку мыши (ЛКМ, ПКМ, колесо, кнопки 4 и 5) действия: собственно, Move, Resize, а также Minimize, Center, Close и AlwaysOnTop (как по мне, наиболее полезный). В бета-версии ещё Lower.
  • можно настроить «прилипание» окон: к краям экрана и к таскбару, к другим окнам снаружи, изнутри, или же вручную при зажатии Alt+Shift

Есть иконка в трее (можно отключить), через неё доступны настройки и некоторые действия.

В последней стабильной версии (0.9) настройки редактируются в ini-файле блокнотом, но в нём всё понятно без проблем. В бете (1.0) добавили гуишное окошко с настройками.

Детали

C Aero работает корректно.

Памяти потребляет немного. У меня под Windows7/64 — 2.9/3.4 МБ.

Есть portable версия.

Программа давно не обновлялась: последняя стабильная версия — февраль 2011, бета — июль 2011. Пусть это вас не смущает: багов не обнаружено; реализовано, на мой взгляд, всё что нужно (даже в февральской).

Windows 8.1 issue — AltDrag seems to work only a portion of a window #7

Comments

grpmpk commented Jul 4, 2014

I have a Surface 1 Pro with Windows 8.1 installed with the latest updates. For some reason, AltDrag has issues with Windows 8.1:

Читайте также:  Отключить rdp windows server 2016

    I can Alt+LeftClick and move the window so long as I am clicking the left side of the window, that is, as long as the mouse cursor was hovering over less than

50% (very approximate) of the width of the window. Seems to have the same issue too with the height: I have to be clicking on the top side of the window.

  • Consequently, if I alt-drag beyond the approximate 50%, say the lower right hand of the window, drastic effects can be seen, e.g., the icons on the desktop would be dragged away from their position.
  • It’s hard to explain by words and I don’t have the means to record by video at the moment. For the time being, is my description of the issue clear? If not, please let me know so I can clarify.

    The text was updated successfully, but these errors were encountered:

    stefansundin commented Jul 4, 2014

    That’s a curios issue. I do not have access to a Surface to try it out myself, and it is working fine for me on my Windows 8.1 computer. If anyone can figure out how to reproduce it on a normal desktop setup, I’d be happy to try to fix it.

    Try changing your display settings, e.g. DPI and other things. Maybe you’ll find what setting makes it happen. Thanks for reporting!

    grpmpk commented Jul 6, 2014

    You were right about the DPI. In Windows 8.1, by going into Control Panel > Appearance and Personalization > Display, and setting the «Change the size of all items» all the way to the right towards Larger (which is the Recommended Size, according to the corresponding thumbnail), I was able to replicate the scenario I’ve described reliably.

    When I set it all the way to the left towards Smaller, AltDrag works as I expected. However, all my window elements are smaller, which is non-ideal.

    I only have one Windows 8.1 machine (my Surface 1 Pro), so if someone else can replicate this scenario on their own Windows 8.1 box, I (and I think the developer too) would appreciate it.

    Aldaviva commented Jul 31, 2014

    I think I’m seeing related behavior.

    Environment

    • Windows 8.1
    • Desktop computer, not Surface Pro
    • Samsung U28D590 4K monitor (3840 x 2160)
    • Default settings for font scaling and «Change the size of all items»

    Observations

    • When I change my resolution to 1920 x 1080, AltDrag behaves normally.
    • When I change my resolution to native 3840 x 2160, AltDrag exhibits two issues:
      • If I Alt+click outside the top-left quarter of a window’s region, the click is ignored.
      • If I Alt+click inside the top-left quarter of a window’s region, AltDrag thinks I started dragging from a different position in the window so the window is shifted by hundreds of pixels when I first start dragging. After starting to drag, it behaves normally.

    Aldaviva commented Jul 31, 2014

    Workaround

    1. Right-click on AltDrag.exe > Properties > Compatibility tab
    2. Check the box for «Disable display scaling on high DPI displays»
    3. Restart Alt-Drag

    Now Alt-Drag behaves correctly no matter where in the window I start dragging from, even at native resolution.

    stefansundin commented Jul 31, 2014

    Thank you for the workaround, I will link it from the website. I hope I can fix this permanently for the next version.

    grpmpk commented Jul 31, 2014

    Thanks for the workaround, I can confirm that the workaround works for my Surface Pro 1, hooray!

    However, and sorry to continue being the bearer of bad news, but if I use DOUBLE monitors, the workaround only works for the Surface Pro 1 screen, and not the other monitor (even with the workaround).

    I imagine that this is a separate, but related, use case?

    Aldaviva commented Jul 31, 2014

    I would characterize Windows 8.1’s support for multiple displays with different pixel densities as «infuriating.»

    LordJZ commented Jul 31, 2014

    I couldn’t agree more.

    rog1039 commented Jan 20, 2015

    Thanks, worked for me too!

    sethbc commented Aug 1, 2015

    Issue persists in Windows 10, but would note the fix works as well (I’m running two 4K monitors @ 150% scaling, so haven’t tried different pixel densities).

    Оцените статью