klayveR / xenontrade

Path of Exile trading app for price checking and trade whisper management
MIT License
117 stars 23 forks source link

Xenontrade can lose focus so that buttons aren't clickable #16

Closed BlueManiac closed 6 years ago

BlueManiac commented 6 years ago

Quite hard to reproduce reliably. Easier without having auto-close on. This seems to happen because of a hidden area under the title is focusable for a short while sometimes. This triggers this.window.setIgnoreMouseEvents(true, {forward: true}) in gui._initializeWindowsTransparency without resetting the focus on reenter. Hovering over the title restores the focus.

removing:

el.addEventListener("mouseenter", () => {
  // If entries div is empty
  if (!$.trim($(".entries").html())) {
    this.window.setIgnoreMouseEvents(true, {forward: true})
  }
});

Seems to fix the problem, but i'm not sure if this have any other side effects.

klayveR commented 6 years ago

I can see how that causes this exact problem. The window has transparency on Windows, which adds some additional empty transparent space below the app for some reason and you can't click through that. This code fixes that when only the menu bar is showing.

I'll remove this part in the next release, as it's a sloppy and not even fully-working fix and try to fix it properly later. Thanks for looking into this!

klayveR commented 6 years ago

The code mentioned above was temporarily removed in v0.3.5. I'll close this issue, as the issue about the blocking non-clickthrough part is a separate problem. Feel free to reopen this issue if this specific problem wasn't fixed for you.

Thanks for the help again!