HerMajestyDrMona / Windows11DragAndDropToTaskbarFix

"Windows 11 Drag & Drop to the Taskbar (Fix)" fixes the missing "Drag & Drop to the Taskbar" support in Windows 11. It works with the new Windows 11 taskbar and does not require nasty changes like UndockingDisabled or restoration of the classic taskbar.
GNU General Public License v3.0
1.46k stars 170 forks source link

Doesn't seem to work when task bar at top #70

Closed jonathanmc closed 2 years ago

jonathanmc commented 2 years ago

I know this isn't supported by Windows, but if you move your Windows taskbar to the top of the screen through hack, this drag and drop program does not work, sadly. Otherwise, great program and thank you.

Drag and drop is required, really, and Windows made an error not implementing it, so thank you! (Edit: To be clear, this was meant to be a criticism of Windows, not your program! My original comment made it seem I was criticizing this utility. Nope!)

You can work around by ALT-TAB'g while holding the file, but of course that is more cumbersome.

HerMajestyDrMona commented 2 years ago

I'm not sure if there's much sense in adding support for the custom windows modifications in this program, when the next Windows 11 release will have the drag-and-drop support with it. Of course I understand that some people need these features working right now, but still...

Maybe it would be easier, if people who need to get custom modifications working, modified the code of the program, and then compiled it themselves?

As example: https://github.com/HerMajestyDrMona/Windows11DragAndDropToTaskbarFix/blob/ebbfa24749320431d05e1c2c710167dbd24e26d8/Windows11DragAndDropToTaskbarFix/Windows11DragAndDropToTaskbarFix.cpp#L2955-L2958

Here's the code that detects if the mouse is in the taskbar area. However, changing only this wouldn't make much difference, since there's "pixel detection", "thumbnail window" detection and dozen of other functions that depend on the taskbar position. So changing everything to work for the both taskbar positions could be a bit time consuming and require a lot of thinking.

I'm not saying "no", but I'm not very motivated at the moment to focus on such things myself, especially because I don't use it in this position. It would be perfect if somebody who's able to code in C++ and uses the taskbar on top would make such modification, then I would integrate it with the main program in the update.

Anyway, when I have some time I'll be looking at it, but I don't promise anything.

jonathanmc commented 2 years ago

Appreciate the comments. Just waned to note the issue, and didn't realize drag and drop was to be implemented in Windows updates. In that case, easiest really is to just wait.

Oh, my comment about the feature required referred to Windows, not your program! Cheers and thanks for providing this to fill in their error/missing feature.

HerMajestyDrMona commented 2 years ago

Oh, no worries, I understood how the drag-and-drop is needed, for many, many users. I wish I could make it compatible with the other modifications, but sometimes we just need to know if something is worth it.

I am recently a bit stressed about the war in Europe, so it's hard to focus on coding.

jonathanmc commented 2 years ago

I understand! Do what lowers stress right now. Be very well.

jonathanmc commented 2 years ago

See my comment here: https://github.com/Naamloos/TopCenterStart11/issues/8#issuecomment-1061122402

If you install this utility, plus that one, drag and drop works to taskbar (when at top).

Thank you to both of you!

Naamloos commented 2 years ago

🙏

HerMajestyDrMona commented 2 years ago

Oh wow, that's great!

I now realized, that the "error" icon (when dragging to the taskbar) is still displayed above the mouse pointer, so it will work when the mouse pointer is in the middle of the taskbar icon, but not when the mouse pointer is too much on the top. To fix this, you can use the following configuration line:

DetectKnownPixelColorsToPreventAccidentalEvents=0

(it shouldn't be needed that much when the taskbar is on top, because it's useful when selecting text in the opened documents only)

Another problem i detected, is that when AutoOpenFirstWindowInBestMethodEver is set to 1 (to automatically open the first active window, when multiple windows are open under the same icon) it doesn't open it. But that shouldn't be a problem at all, especially when it's not a default option.

It's really cool that it works without any further modifications needed in Windows11DragAndDropToTaskbarFix. I think the main issue was that the preview window was displayed above the screen when the taskbar was on top, therefore function IsWindowVisible was returning FALSE, and the program thought that the icon has no active window.

Even dragging to the "show desktop" button works! I thought it was all depended on screen coordinates / taskbar position, but seems like I made it work in a smarter way :)