Giter Club home page Giter Club logo

Comments (44)

HerMajestyDrMona avatar HerMajestyDrMona commented on May 18, 2024 1

Ok. I know what the problem is.

To reproduce it, I need to resume from the sleep mode using the fingerprint sensor in my laptop, so it logins instantly after the login screen with Windows Hello is shown.

When resuming from the Sleep mode, window with class name: "MSTaskSwWClass" gets incorrect size:

Screenshot 2021-10-27 182747

This window is supposed to have a width of all app icons, not more. So another Windows 11 bug makes that Windows11DragAndDropToTaskbarFix.exe receives the incorrect "MSTaskSwWClass" RECT (and works weirdly). The after-sleep-login bug seem to disappear when a new window appears on the taskbar.

I need to think about the best solution for it. Maybe detecting if thread slept for longer than X, and if the taskbar width increased by 50%, then restart the program... or create an empty CMD window that auto-disappears on the taskbar.

from windows11draganddroptotaskbarfix.

HerMajestyDrMona avatar HerMajestyDrMona commented on May 18, 2024 1

@alexdelprete Please check version 1.5.1 I added a fix for this issue :)

Also, I got a reply from Windows Defender team, that they removed detection for 1.5.0. However, now ver. 1.5.1 gets the same detection -.- So I submitted the form again.

from windows11draganddroptotaskbarfix.

HerMajestyDrMona avatar HerMajestyDrMona commented on May 18, 2024 1

@alexdelprete MS Defender didn't cry this time, because I submitted another false-positive form in the morning, right after release :)

Screenshot_20211028-181122_Chrome

I guess we can close this issue now, but please feel free to comment back while it's closed.

from windows11draganddroptotaskbarfix.

HerMajestyDrMona avatar HerMajestyDrMona commented on May 18, 2024 1

@alexdelprete Thanks for the nice words :)

from windows11draganddroptotaskbarfix.

HerMajestyDrMona avatar HerMajestyDrMona commented on May 18, 2024

Ver. 1.4 triggers too. I had the same message after downloading 1.4 today... I'll submit the false positive form later today.

from windows11draganddroptotaskbarfix.

alexdelprete avatar alexdelprete commented on May 18, 2024

I just scanned v1.4 and it doesn't trigger it. I downloaded and installed it yesterday. No issues.

I'll mark v1.5 safe, I trust Mona Lisa. :)

from windows11draganddroptotaskbarfix.

HerMajestyDrMona avatar HerMajestyDrMona commented on May 18, 2024

You could always compile yourself. Installation of Visual Studio Core isn't that hard :)

All these false positives prove how useless these antivirus engines are. The program literally doesn't connect to the Internet. I intentionally didn't add updates checking function, not make it "suspicious". And at the end defender claims that the program "executes remote commands from an attacker". I wonder how, by electricity commands from the powerhouse?

from windows11draganddroptotaskbarfix.

alexdelprete avatar alexdelprete commented on May 18, 2024

Compiling doesn't mean something is safe. Inspecting the source code first is better. A user could compile an opensource trojan if he doesn't know how the code works. :)

I agree with what you say, but the weirdest thing is that v1.4 didn't trigger any warning, v1.5 did, and I didn't see massive modifications of the code. Too many false positives, because of those "intelligent" algos, predictive stuff, AI, etc.

BTW: v1.5 is active and working, but I can't find it in the process list of Task Manager, how should it pop up? I was looking for "Windows 11" in the name of the process...

from windows11draganddroptotaskbarfix.

HerMajestyDrMona avatar HerMajestyDrMona commented on May 18, 2024

Ver. 1.4 triggered for me around 2 hours ago. It was the same message as the one on your screenshot. It's quite random how Defender works. I think newly downloaded files are treated differently.

from windows11draganddroptotaskbarfix.

alexdelprete avatar alexdelprete commented on May 18, 2024

Anyway, marking it safe works. And many thanks for your great work.

from windows11draganddroptotaskbarfix.

HerMajestyDrMona avatar HerMajestyDrMona commented on May 18, 2024

Glad that you like it :)

I couldn't get ver. 1.5 to trigger Defender... So I submitted the detection name from your screenshot.
For me it was something else:
ver1 4-detection

from windows11draganddroptotaskbarfix.

alexdelprete avatar alexdelprete commented on May 18, 2024

Nice idea! :)

I like the tool a lot. The only thing that doesn't really work perfectly is that when I drag and drop onto an open app, it always picks up the one that's on the left (I see the white box around the target), I always have to point to the extreme right to have it pick up the one I want. Can I do some optimization in the config file?

from windows11draganddroptotaskbarfix.

HerMajestyDrMona avatar HerMajestyDrMona commented on May 18, 2024

Hmm... So you would rather want to auto-open the window that is the newest one (last on the list) instead of the first one?
Generally it's impossible to determine how many windows are open for the app. It's mostly about hotkeys simulation. What I think could work for you is adding extra ~20 or more Arrow Right clicks on the preview window, before simulating the ENTER key. This way it would move to the newest opened window. But it's a bit dirty method if we can't determine the real number of windows.

In Windows 10, when there are multiple windows open for an icon, then it doesn't auto-open any window. It was this way in ver. 1.2 I think, but people on Reddit found it slower than in ver 1.0-1.1.

from windows11draganddroptotaskbarfix.

alexdelprete avatar alexdelprete commented on May 18, 2024

No, that's not what I meant to say.

I'll try to explain: when I drag the file to the taskbar, and on the taskbar I have 4-5 apps, and I want to drop it to app #4 that is almost to the far right, the white box that tells you the target app is always #3, even if my mouse is clearly on app #4. So I have to move the mouse on app #5 to have your app pick #4. It's like when you have a sniper rifle with a bad scope. :)

from windows11draganddroptotaskbarfix.

HerMajestyDrMona avatar HerMajestyDrMona commented on May 18, 2024

Oh, how often does it happen? I thought it's a very rare situation. Are you able to reproduce it every time, or this problem is only occuring from time to time?

from windows11draganddroptotaskbarfix.

alexdelprete avatar alexdelprete commented on May 18, 2024

Every time...but maybe I did something wrong: I copied the config file and used it without any modification. I didn't really check all the options, maybe it's some config item?

from windows11draganddroptotaskbarfix.

HerMajestyDrMona avatar HerMajestyDrMona commented on May 18, 2024

I will need to test it with less apps present on the taskbar. Possibly there's some "needed clicks" calculation bug in the code.

You could try these values at first:

//Sleep time (in milliseconds) between simulating different keys in the new "BestMethodEver"
HowLongSleepBetweenDifferentKeysPressMilliseconds=10

//Sleep time (in milliseconds) between simulating the same keys in the new "BestMethodEver" 
HowLongSleepBetweenTheSameKeysPressMilliseconds=0

Please try to change it to like 50 / 1, and see if it works better or the same.

from windows11draganddroptotaskbarfix.

HerMajestyDrMona avatar HerMajestyDrMona commented on May 18, 2024

I just noticed that it works "pretty bad" after laptop resumes from the Sleep mode. That's very interesting... Could you please confirm it?

from windows11draganddroptotaskbarfix.

alexdelprete avatar alexdelprete commented on May 18, 2024

It's weird because now I can't reproduce it...but effectively, I always turn on the laptop from sleep, and I notice the issue...

Need to do proper testing...

from windows11draganddroptotaskbarfix.

HerMajestyDrMona avatar HerMajestyDrMona commented on May 18, 2024

Now I can't reproduce it too. I only could reproduce it when I was on the battery power, lol.

This is getting ridiculous.

Maybe I'll just set-up auto program restarts if the time between the previous and the current step differs by (Default Sleep Time * 10) milliseconds...

from windows11draganddroptotaskbarfix.

alexdelprete avatar alexdelprete commented on May 18, 2024

@alexdelprete Please check version 1.5.1 I added a fix for this issue :)

Also, I got a reply from Windows Defender team, that they removed detection for 1.5.0. However, now ver. 1.5.1 gets the same detection -.- So I submitted the form again.

I'll install it and let you know.

Regarding the false positive: what is the process to "whitelist" it officially? digital signature?

from windows11draganddroptotaskbarfix.

alexdelprete avatar alexdelprete commented on May 18, 2024

I need to think about the best solution for it. Maybe detecting if thread slept for longer than X, and if the taskbar width increased by 50%, then restart the program... or create an empty CMD window that auto-disappears on the taskbar.

I don't know how you fixed it, but I was thinking: on resume from sleep, don't the open apps receive a resume event that can be used to trigger an action?

from windows11draganddroptotaskbarfix.

HerMajestyDrMona avatar HerMajestyDrMona commented on May 18, 2024

@alexdelprete I use a self-signed certificate. Not going to pay to code signing companies as my opinion about them is negative. I simply submitted the file in the windows defender form and they manually checked it and removed from detections.

Regarding the fix, it now opens an empty cmd.exe window that disappears after 1 second. It only happens if the bug is detected (incorrect taskbar icons area height). This way windows refreshes the taskbar and returns correct RECT of this window. I think this cmd.exe window even disappears before user logins after the Sleep Mode, so this solution is quite good in my opinion.

from windows11draganddroptotaskbarfix.

alexdelprete avatar alexdelprete commented on May 18, 2024

v1.6 is working fine, I didn't see any window opening/closing quickly. MS Defender didn't trigger when I downloaded it and copied it in its folder.

Great job. Thank you.

from windows11draganddroptotaskbarfix.

HerMajestyDrMona avatar HerMajestyDrMona commented on May 18, 2024

@alexdelprete Hi. Did you experience similar problems again? I recently noticed that the bug randomly appears, for example when disconnecting the secondary screen, or when plugging the battery charger. I'll be releasing a fix for these issues too in next days, but just wanted to ask if you're still experiencing these issues?

from windows11draganddroptotaskbarfix.

alexdelprete avatar alexdelprete commented on May 18, 2024

Hi. No but I noticed a small issue when there are two windows of the same app: my mail client, when I open a mail, it opens two windows and they stay in the same icon on the taskbar, when you drop something into the icon, it opens the two subicons, but it's very very hard to pick the second subicon. I was dropping a file in an email.

Regarding what you noticed: I don't have a second monitor and my laptop is always plugged in, so I didn't notice the issue.

from windows11draganddroptotaskbarfix.

HerMajestyDrMona avatar HerMajestyDrMona commented on May 18, 2024

@alexdelprete Thanks for the reply. Do you have this problem with other apps that use multiple windows under 1 icon, for example multiple windows of Windows Explorer?

from windows11draganddroptotaskbarfix.

alexdelprete avatar alexdelprete commented on May 18, 2024

Yes, same problem with WE. It's difficult to pick the subwindow. You have 0.5s to pick it, if you miss that time window, it gets difficult. I think you can easily reproduce it.

from windows11draganddroptotaskbarfix.

HerMajestyDrMona avatar HerMajestyDrMona commented on May 18, 2024

@alexdelprete I can't reproduce it. It is supposed to first auto-open the first window, and then show the list of windows again. Did you modify the configuration (something else than Autostart or Hide Console Window?

from windows11draganddroptotaskbarfix.

alexdelprete avatar alexdelprete commented on May 18, 2024

Nope, I used the default config file but didn't modify any value.

from windows11draganddroptotaskbarfix.

HerMajestyDrMona avatar HerMajestyDrMona commented on May 18, 2024

@alexdelprete Ok, so just to confirm: You can never get the preview of windows under a single icon? It just opens the first window from the group and doesn't return to show others?

To fix your problem, please use:

AutoOpenFirstWindowInBestMethodEver=0

for now. And I'll try to reproduce it. But might be hard to do so as it works as expected for me :(

EDIT:

Or please also try this:

AutoOpenFirstWindowInBestMethodEver=1
HowLongSleepAfterAutoOpenFirstWindowMilliseconds=500

This way we will know if it's the timing problem or something else :)

from windows11draganddroptotaskbarfix.

alexdelprete avatar alexdelprete commented on May 18, 2024

You can never get the preview of windows under a single icon? It just opens the first window from the group and doesn't return to show others?

No, the windows both open, but I have a hard time picking the second window, it's a timing issue.

This way we will know if it's the timing problem or something else

Exactly, it's a timing issue. I'll try your suggested values and report back. :)

from windows11draganddroptotaskbarfix.

HerMajestyDrMona avatar HerMajestyDrMona commented on May 18, 2024

No, the windows both open, but I have a hard time picking the second window, it's a timing issue.

It should work the following way:

  • Display all windows under the app icon.
  • After X milliseconds open the first window.
  • Again display all windows under the app icon.

I think it fails for you at step 3. Adding a longer HowLongSleepAfterAutoOpenFirstWindowMilliseconds might fix it. So let's see. If it works, please try to find the lowest value where it works fine for you, and I'll change it in default configuration (+50 ms of course).

I'm finally adding the tray icon for this program, so should be easier to manage / restart / quit.

from windows11draganddroptotaskbarfix.

alexdelprete avatar alexdelprete commented on May 18, 2024
  • After X milliseconds open the first window.

That was my problem, solved it with: AutoOpenFirstWindowInBestMethodEver=0

I don't want it to auto-open any window unless I drop the file in the window I choose. Thanks a lot for the explanation, it put me on the right track. :)

I'm finally adding the tray icon for this program, so should be easier to manage / restart / quit.

This is awesome. Next release? :)

from windows11draganddroptotaskbarfix.

HerMajestyDrMona avatar HerMajestyDrMona commented on May 18, 2024

@alexdelprete Could you please revert AutoOpenFirstWindowInBestMethodEver=1 and try HowLongSleepAfterAutoOpenFirstWindowMilliseconds=500 to see if after the first window auto-opens it starts displaying thumbnails of all windows under the icon again? Because from what I understood it wasn't working for you. It's just for the test purposes, you can disable the auto-open later :)

from windows11draganddroptotaskbarfix.

alexdelprete avatar alexdelprete commented on May 18, 2024

It works also with HowLongSleepAfterAutoOpenFirstWindowMilliseconds=100. The problem was the confusion that the auto-open created. Actually, it's better with 100 because I see the thumbnails immediately.

I just don't want it to auto-open. Actually, I'd like to auto-open if there's only 1 item (you can't choose), but if >1, then don't auto-open. But maybe I'm asking too much. :)

from windows11draganddroptotaskbarfix.

HerMajestyDrMona avatar HerMajestyDrMona commented on May 18, 2024

Oh yes. I wasn't a fan of auto-opening, but people on reddit wanted it.

Yes, I was planning to add a separate option to make it work only when 1 window is present. However, it will require some calculations that terrify me. Generally I'll need to get the width and the position of the window that displays thumbnails, then somehow determine if it's a greater size than 1 window (and make sure it's shown above the certain icon). I'm not sure if the size of this window is the same on all DPI scaling settings, etc. Anyway I was going to try it :)

from windows11draganddroptotaskbarfix.

alexdelprete avatar alexdelprete commented on May 18, 2024

There's no function that tells you how many items are there? wow...:(

Anyway, I'm good like this, don't want you to get crazy for that functionality. Unless you like it too. :)

from windows11draganddroptotaskbarfix.

HerMajestyDrMona avatar HerMajestyDrMona commented on May 18, 2024

There's no function that tells you how many items are there? wow...:(

The program in 95% is "guessing" things. But at the current stage it seem to do it pretty well. I'm scared to start rewriting the code to "beauty" it a little.

And yes, I wanted that limited-auto-open option myself.

from windows11draganddroptotaskbarfix.

alexdelprete avatar alexdelprete commented on May 18, 2024

The program in 95% is "guessing" things. But at the current stage it seem to do it pretty well. I'm scared to start rewriting the code to "beauty" it a little.

Let me tell you that you're an experienced "guesser", because it's working great. :)

And yes, I wanted that limited-auto-open option myself.

Great. I was thinking about the value of AutoOpenFirstWindowInBestMethodEver, 0 is disabled, 1 is enabled, and 2 could be limitedly-enabled. :)

from windows11draganddroptotaskbarfix.

HerMajestyDrMona avatar HerMajestyDrMona commented on May 18, 2024

@alexdelprete Please check version 1.7.0.0. There's a tray icon and the program by default won't auto-open if there are 2 or more windows under the same icon: AutoOpenFirstWindowInBestMethodEver=2 (you don't need to keep this option in your config file, as it's default). Please also let me know if Windows Defender is crying again. For me it didn't :)

Also thank you so much for discussion and providing information. I very appreciate help in making the program better. Hopefully soon we won't have any issues to discuss about :)

from windows11draganddroptotaskbarfix.

alexdelprete avatar alexdelprete commented on May 18, 2024

Thanks, it's working fine. Since I had the config file, I changed it to 2 anyways before running it. :)

Thank you for the discussion, I appreciate your kindness and open-mindness, not many devs listen to users suggestions and feedback.

Will let you know if some other ideas come up or I catch some glitches. :)

from windows11draganddroptotaskbarfix.

HerMajestyDrMona avatar HerMajestyDrMona commented on May 18, 2024

No problem. I'm not a professional programmer, just in hobby I code something (I never went to the IT school or anything like this). So maybe this is the reason why I sound a bit differently.

The fix was mostly created for myself, because I wouldn't be able to suffer without this feature, and I didn't want to go back to Windows 10 either. I thought that it will be a simple thing (and it was), but once this software got so popular (over 200 stars now!) I decided to improve it a bit more :) I also didn't expect that there will be YouTube tutorial videos made by people about this program. These things are really motivating.

Thanks again for your feedback.

from windows11draganddroptotaskbarfix.

alexdelprete avatar alexdelprete commented on May 18, 2024

Well, I recognized that, I'm in the IT industry since I was born, have done every role in IT, also Project Manager with teams of developers, and let me tell you that the most creative and skillful devs I found didn't study IT at all, they came from math, physics and even arts studies. I think their advantage is not being indoctrinated in UNIs by the usual stuff, so they were far more efficient in solving problems. And I can see that aspect in you...:)

I took a look at the source code, and it's not a "fix" as you call it, it's a nice piece of creative software. And to do that you surely had to know Windows APIs and stuff, so don't push down what you've accomplished. I, like many other users, am really grateful for what you did, and the support you give.

Keep up the great job, I just installed v1.8.0. :)

from windows11draganddroptotaskbarfix.

Related Issues (20)

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.