britzl / monarch

Monarch is a Defold screen manager with transition support and a straight forward API
MIT License
163 stars 23 forks source link

show(nostack=true) + hide = bad behaviour #78

Closed Morgerion closed 3 years ago

Morgerion commented 3 years ago

Here is a screenshot of the situation: image_2021-07-14_16-23-09

There is a window hint_info. It opens with show(nostack=true). It closes with hide().

Details of the problem:

  1. hint_info window has a checkbox to keep the focus for the parent window. But when hint_info is opened, parent window loses focus permanently.
  2. hint_info window has a popup type, but the parent window is still removed from the stack and there is no return to it after hide().

On version 3.3.0 there were no such problems - this code worked correctly.

britzl commented 3 years ago

It opens with show(nostack=true).

  1. hint_info window has a checkbox to keep the focus for the parent window

Hmm, but if it is not added to the stack it shouldn't have a parent window at all. Why is it shown with nostack=true if you want it to interact with windows in the stack?

britzl commented 3 years ago

@Morgerion any update?

Morgerion commented 3 years ago

I apologise, perhaps I didn't describe the problem well.

So. Yes, we have a window with no-stack. Problem №1: when we open it, the parent window loses its input/focus, even though the no-stack window has checkbox "others keep input focus when below...". Problem №2: closing a window with a non-stack removes the parent window from the stack! O_O

This seems to me to be a strange behavior for a no-stack window. As a reminder, everything worked fine before.

We solved this problem simply by getting rid of the no-stack window.

britzl commented 3 years ago

Sorry for the late reply. Thank you for clarifying the problem.

Morgerion commented 3 years ago

One window (parent) is a normal full-screen in-stack window. The second window (popup) is an no-stack popup.

Unfortunately I can't reproduce this problem now either, because we solved it a long time ago by doing away with no-stack windows. You can try to reproduce the same settings I have shown in the screenshot above.

britzl commented 3 years ago

Thanks. I'll see if I can repro the problem. But I think it is better to be careful with no_stack windows and use them mainly for static things such as backgrounds

britzl commented 3 years ago

Thanks. I'll see if I can repro the problem

I'm unable to reproduce the problem. Closing this issue for now.