jparnell8839 / AlwaysOnTop

Make a Windows application always run on top
GNU General Public License v3.0
205 stars 40 forks source link

version 0.6.1 is not working correctly on Win 10 #14

Open sergeykosik opened 7 years ago

sergeykosik commented 7 years ago

I have found the issue with 0.6.1 version (installed on Win 10). When I pin the browser window with Always on Top, then my keyboard is not working with other windows. There is no problem with 0.5.1 version though.

sranger commented 7 years ago

I have the same issue (haven't tried 0.5.1 though) where keyboard stops responding in other windows.

jparnell8839 commented 7 years ago

I apologize for not seeing this sooner, my phone doesn't always notify emails like it should (blame the Outlook.com app). My dev PC has crashed, so I have not been able to view the source code in visual studio. I have ordered the parts for a new PC and will be building it as they arrive (should be in by Thursday).

Once it is assembled and I've reinstalled everything, I will crack down and take a look at the diffs between 0.6.1 and 0.5.1, though I don't believe anything in the globalKeyboardHook class was changed between those two releases, so it could be a lot simpler to point out.

Sent via Nexus 6P

From: Stephen Sent: Sunday, February 12, 11:51 AM Subject: Re: [jparnell8839/AlwaysOnTop] version 0.6.1 is not working correctly on Win 10 (#14) To: jparnell8839/AlwaysOnTop Cc: Subscribed

I have the same issue (haven't tried 0.5.1 though) where keyboard stops responding in other windows.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/jparnell8839/AlwaysOnTop/issues/14#issuecomment-279231200, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AEyIiZZDzuBmDYwymYRMDCL2IOWYw3i5ks5rbzh8gaJpZM4L7-W-.

rfjakob commented 7 years ago

I am seeing the same issue with v0.6.1 on Windows 10. The keyboard completely stops working.

Additionally, it seems to have changed my mouse cursor (!?) to a tiny one (I'm on a 4k HiDPI screen).

v0.5.1 seems to work fine.

jparnell8839 commented 7 years ago

OK, I have a dev environment set back up, I am installing virtual machines to test the builds now (as I said before, I don't think the GKH class was changed, so obviously something between 0.5.1 and 0.6.1 is the cause) I will hopefully have an answer for you guys before too much longer.

maxwell-gregory commented 7 years ago

Just to add to the fire. Same issue here. Seems to be centric around modifier keys most of the time. Some keys just stop working others don't

momostein commented 7 years ago

this happens to me too.

kofifus commented 7 years ago

Any news on this ?

wnipper commented 7 years ago

+1. Windows 10. I'm busy with the 4th this weekend, but based on jparnell's comment above, I'll run a diff between 0.5.1 and 0.6.1 next week and see if I can figure out the issue.

Temporary workaround is:

wnipper commented 7 years ago

The problem is in AlwaysOnTop.cs, line 170 thru 173. The hook is being created with no keys set if there are no declared hotkeys. That's causing the hook listener to swallow every keystroke. Commenting those lines out doesn't seem to affect anything, though I haven't run hotkeys.

There are two possible workarounds

  1. if you guys have VS, use nuget to install octokit, comment out those lines, build and publish to install the latest version. Again, I'm not sure if this will break setting new hotkeys. I don't use them and it hasn't been tested (yet)

  2. in your current version, go to Settings -> Use Hotkey. Set it to true. Don't bother trying to set a hotkey yet; the app is still swallowing inputs. When AlwaysOnTop restarts, an error will be thrown because it expects a hotkey to be set. Don't worry about it--it's not a hard crash. The app will now work as intended.

@jparnell8839 if you want to give me contributor permissions I'll test this fix more thoroughly and create a pull request.

wnipper commented 7 years ago

This was driving me nuts on my day off yesterday so I took an hour this morning to really dig into it. The actual problem is in the globalKeyboardHook.cs class. Not sure who contributed this, but it's broken.

Long story short, hookProc was getting garbage collected and an error was being swallowed. Make hookProc into a class delegate that gets instantiated in the constructor and everything works as expected.

I've fixed this, cleaned up some of the code, and corrected a problem where an error was thrown if Use Hotkeys was checked but no hotkey was set. It could use quite a bit more cleanup but I'm not gonna bother if I can't commit the changes.

@jparnell8839, again, dude...you wanna hook me up with push? Otherwise I'm going to assume this repo is dead and start up a new one.

kofifus commented 7 years ago

great @wnipper +1

Can you make a PR or a fork ?

wnipper commented 7 years ago

I was googling how to revive a dead repo (not new to git, but this is the first time I've collaborated on a public project) and found out about forking. I forked and I'll update it over the course of the week. I've also got some ideas for new features I'd like to work on, like an easier way to turn AoT off for specific windows.

kofifus commented 7 years ago

I think the best is if you submit a PR to this repo with your changes, then anyone can use that PR or fork it as well thx

wnipper commented 7 years ago

@kofifus I'll submit a PR from my fork when I'm done with bug fixes.

I'm gonna go ahead and check in the changes I've made so far to my fork. It's no longer fundamentally broken, but there are still quite a few fixes that need to be made (hotkeys, for example, don't work at all).

medic17 commented 4 years ago

can confirm issue is still there on windows 10 1903 as of Jan 2020