Giter Site home page Giter Site logo

Comments (14)

HerMajestyDrMona avatar HerMajestyDrMona commented on May 21, 2024

Hmmm. The problem is that Windows displays a different error icon (perhaps cursor change) instead of the default one when a file is being dragged from a program that is run as administrator.

For now, if you often use Total Commander, you can disable error icon pixels detection in this program:
DetectKnownPixelColorsToPreventAccidentalEvents=0

from windows11draganddroptotaskbarfix.

mnaoumov avatar mnaoumov commented on May 21, 2024

@HerMajestyDrMona Thanks for the quick reply. Yes, your workaround worked!

from windows11draganddroptotaskbarfix.

HerMajestyDrMona avatar HerMajestyDrMona commented on May 21, 2024

@mnaoumov Thanks for the info. I prepared a fix for this issue in ver. 2.2 (it will be released some day), however, Windows11DragAndDropToTaskbarPartialFix needs to be started as administrator in order to make it work. For some reasons it won't detect clicks done in the "run as administrator" apps. I believe it's some Windows security thing.

from windows11draganddroptotaskbarfix.

mnaoumov avatar mnaoumov commented on May 21, 2024

@HerMajestyDrMona I think this case is quite important so you should make it very explicit in the documentation. And maybe even consider to run your app as administrator by default, or at least make it configurable

from windows11draganddroptotaskbarfix.

HerMajestyDrMona avatar HerMajestyDrMona commented on May 21, 2024

@mnaoumov No need to put it to the documentation because it will be fixed soon. The program for sure won't run as administrator by default (it always looks suspicious for ordinary users). Having an option to run as administrator is a good idea, but the same thing can be done by users in file properties -> compatibility tab, so I'm not sure if bloating this program even more is worth it.

from windows11draganddroptotaskbarfix.

mnaoumov avatar mnaoumov commented on May 21, 2024

@HerMajestyDrMona I assume your target audience of the app is not advanced users that might not even know how to use Compatibility tab

from windows11draganddroptotaskbarfix.

HerMajestyDrMona avatar HerMajestyDrMona commented on May 21, 2024

Yes, but they might also have a problem understanding the "Configure..." option in this program. So either way it would need to be described in some "tutorial". The same ordinary users don't run the different file managers with administrative permissions.

I'm not sure how it would behave after computer restart if it was set to run as administrator. I would find it annoying to click "YES" in the UAC prompt every time computer restarts.

from windows11draganddroptotaskbarfix.

mnaoumov avatar mnaoumov commented on May 21, 2024

@HerMajestyDrMona I think if you run the app via Task Scheduler you can run it with elevated permissions without annoying UAC screen https://www.digitalcitizen.life/use-task-scheduler-launch-programs-without-uac-prompts/

from windows11draganddroptotaskbarfix.

HerMajestyDrMona avatar HerMajestyDrMona commented on May 21, 2024

I just tested, and the default Autostart option simply won't work when the file compatibility is set to "always run as administrator".
So the program itself would need to check if is running as admin and then ask to restart itself.

Task Scheduler is a good thing, but not for "ordinary" users. The program itself shouldn't create Task Scheduler entries. We have already suffered from false positives in previous versions of the program, so adding such things wouldn't help.

What I think could be a good solution for now, is adding a new option to the tray icon: "Restart as administrator". This way the program would autostart with the default method, and whenever somebody experience problems could simply click on that button.

The problem could also be resolved in it's "roots". I now realized that the mouse click events are not detected inside of the program that is running as administrator. However, when it leaves the "administrator" window, it should be able to detect clicks normally. The problem is, that it won't because the mouse button was already pressed. So there could be an additional check for the current mouse button state. It might cause dozens of other problems (like the lack of the button up signal when the program returns to the administrator window), but still it's worth to give a try.

from windows11draganddroptotaskbarfix.

mnaoumov avatar mnaoumov commented on May 21, 2024

I don't see any automated testing in the source code. Wouldn't it be useful to write some tests to cover all those scenarios such as:

  1. Dragging from regular app to regular app
  2. Dragging from regular app to admin app
  3. Dragging from admin app to regular app
  4. Dragging from admin app to admin app

from windows11draganddroptotaskbarfix.

HerMajestyDrMona avatar HerMajestyDrMona commented on May 21, 2024

How do you want to automate events that can only be done by users? If the program "simulated" the mouse events for tests it still would be inaccurate, because it would be done with the permissions that the actual instance of the program has, not the real user's scenario.

The other thing is, we're not developing some OpenSSL library, but a "simple" fix that is supposed not to be needed in a few months (Windows 11 22H2 release). So polishing it to the highest possible standards in my opinion is kind of waste of time.

from windows11draganddroptotaskbarfix.

HerMajestyDrMona avatar HerMajestyDrMona commented on May 21, 2024

@mnaoumov I added some new options in ver. 2.2.0.0.
Please revert to:
DetectKnownPixelColorsToPreventAccidentalEvents=1
and let me know how it works :)

from windows11draganddroptotaskbarfix.

mnaoumov avatar mnaoumov commented on May 21, 2024

Works perfectly, thanks!

from windows11draganddroptotaskbarfix.

HerMajestyDrMona avatar HerMajestyDrMona commented on May 21, 2024

Thanks for checking!

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.