C1rdec / Poe-Lurker

Ease your trading experience in Path of Exile.
MIT License
565 stars 53 forks source link

Focus stealing and PoE become top most on event #178

Closed nomis51 closed 4 years ago

nomis51 commented 4 years ago

Describe the bug My previous issue #170 is fixed, but there's a bigger problem now... Everytime the app update the overlay

It steals the focus from any window that is not the Path of Exile window and put Path of Exile top most.

To Reproduce Steps to reproduce the behavior:

  1. Open Poe-Lurker
  2. Open PoE
  3. Send a trade request
  4. Alt-Tab to another window (e.g. Google Chrome)
  5. Wait until the timer is done
  6. Steals the focus to show up the game

  1. Open Poe-Lurker
  2. Open PoE
  3. Alt-Tab to another window (e.g. Google Chrome)
  4. Wait for an incomingf trade request
  5. Steals the focus to show up the game

Expected behavior Should not steal the focus and put the game top most. It should just play the new notification sounds and that's it.

Please complete the following information:

Additional context Does not always happen, but it happened several times today while I was browsing trades on the PoE Trade website, so it should easy to reproduce. The overlay doesn't get the focus for itself, it just put the game top most, which result in stealing the focus to any other windows.

C1rdec commented 4 years ago

I just dont understand...

What is the issue? When you receive an offer Poe is set on top of other applications?

nomis51 commented 4 years ago

Dashboard, I mean image

New incoming request square, I mean image

And yeah, the app puts PoE top most, when something happens with the overlay.

Edit: Wasn't doing that with the 1.6.2 version Seems to happen more often when the "Outgoing trade timer ends"

C1rdec commented 4 years ago

yeah there's a bug when the timer runs out but regarding the new incoming offers everything's fine on my side.

C1rdec commented 4 years ago

Fixed in 1.6.4.

nomis51 commented 4 years ago

Well, I don't want to be annoying, but with version 1.6.5 (wasn't online for the 1.6.4 release, so can't tell for that one), I've experienced the bug that makes PoE top most when the timer runs out for outgoing offers again... Got the bug 3 times in the last 20mins.

Except for a weird launch freeze then crash after the 1.6.5 update (can't really tell what happened, but since then it's fine). That's the logs I've

[2020/06/30 21: 02: 54.554] Error [1] The available quota is insufficient to process this order System.ComponentModel.Win32Exception (0x80004005): There is not enough quota available to process this command to MS.Win32.UnsafeNativeMethods.PostMessage (HandleRef hwnd, WindowMessage msg, IntPtr wparam, IntPtr lparam) at System.Windows.Interop.HwndTarget.UpdateWindowSettings (Boolean enableRenderTarget, Nullable1 channelSet) at System.Windows.Interop.HwndTarget.UpdateWindowPos (IntPtr lParam) at System.Windows.Interop.HwndTarget.HandleMessage (WindowMessage msg, IntPtr wparam, IntPtr lparam) at System.Windows.Interop.HwndSource.HwndTargetFilterMessage (IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean & handled) to MS.Win32.HwndWrapper.WndProc (IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean & handled) to MS.Win32.HwndSubclass.DispatcherCallbackOperation (Object o) at System.Windows.Threading.ExceptionWrapper.InternalRealCall (Delegate callback, Object args, Int32 numArgs) at System.Windows.Threading.ExceptionWrapper.TryCatchWhen (Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler) at System.Windows.Threading.Dispatcher.LegacyInvokeImpl (DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs) to MS.Win32.HwndSubclass.SubclassWndProc (IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam) (Lurker.UI.AppBootstrapper) [2020/06/30 21: 02: 54.679] Error [1] The available quota is insufficient to process this order System.ComponentModel.Win32Exception (0x80004005): There is not enough quota available to process this command to MS.Win32.UnsafeNativeMethods.PostMessage (HandleRef hwnd, WindowMessage msg, IntPtr wparam, IntPtr lparam) at System.Windows.Interop.HwndTarget.UpdateWindowSettings (Boolean enableRenderTarget, Nullable1 channelSet) at System.Windows.Interop.HwndTarget.UpdateWindowPos (IntPtr lParam) at System.Windows.Interop.HwndTarget.HandleMessage (WindowMessage msg, IntPtr wparam, IntPtr lparam) at System.Windows.Interop.HwndSource.HwndTargetFilterMessage (IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean & handled) to MS.Win32.HwndWrapper.WndProc (IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean & handled) to MS.Win32.HwndSubclass.DispatcherCallbackOperation (Object o) at System.Windows.Threading.ExceptionWrapper.InternalRealCall (Delegate callback, Object args, Int32 numArgs) at System.Windows.Threading.ExceptionWrapper.TryCatchWhen (Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler) at System.Windows.Threading.Dispatcher.LegacyInvokeImpl (DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs) to MS.Win32.HwndSubclass.SubclassWndProc (IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam) (Lurker.UI.AppBootstrapper)