Skip to content
This repository has been archived by the owner on Mar 19, 2021. It is now read-only.

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

Closed
BlueManiac opened this issue Sep 16, 2018 · 2 comments
Closed

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

BlueManiac opened this issue Sep 16, 2018 · 2 comments

Comments

@BlueManiac
Copy link

BlueManiac commented Sep 16, 2018

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
Copy link
Owner

klayveR commented Sep 16, 2018

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
Copy link
Owner

klayveR commented Sep 17, 2018

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!

@klayveR klayveR closed this as completed Sep 17, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants