Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dialogs are rendered behind apps sometimes #4805

Open
2 tasks done
nazar-pc opened this issue May 5, 2024 · 16 comments
Open
2 tasks done

Dialogs are rendered behind apps sometimes #4805

nazar-pc opened this issue May 5, 2024 · 16 comments

Comments

@nazar-pc
Copy link
Contributor

nazar-pc commented May 5, 2024

Issue description

Reproduction:

  1. Open one project in IDE (IntelliJ)
  2. Open another project in IDE in a separate window
  3. Open search dialog in a second window

Expected:
Search dialog window opens above other windows

Actual:
Search dialog opens above second window, but behind the first window somehow. Clicking or re-focusing on it fixes the issue for that particular instance.

This wasn't the case in older verison of Qtile (0.21 at least). This also happens with other apps like Geany for example. In some cases the dialog is completely hidden, which is hard to work with.

Version

0.25.0

Backend

X11 (default)

Config

No response

Logs

No response

Required

  • I have searched past issues to see if this bug has already been reported, and it hasn't been.
  • I understand that people give their precious time for free, and thus I've done my very best to make this problem as easy as possible to investigate.
@elParaguayo
Copy link
Member

Can you see if #4583 fixes this?

@nazar-pc
Copy link
Contributor Author

nazar-pc commented May 5, 2024

Could you rebase it on latest master, please?

@elParaguayo
Copy link
Member

Done.

@nazar-pc
Copy link
Contributor Author

nazar-pc commented May 5, 2024

I'm getting some errors unfortunately:

2024-05-05 14:40:38,469 ERROR libqtile core.py:_xpoll():L372 Got an exception in poll loop
Traceback (most recent call last):
  File "/home/nazar-pc/.local/share/pipx/venvs/qtile/lib/python3.12/site-packages/libqtile/backend/x11/core.py", line 347, in _xpoll
    self.handle_event(event)
  File "/home/nazar-pc/.local/share/pipx/venvs/qtile/lib/python3.12/site-packages/libqtile/backend/x11/core.py", line 314, in handle_event
    ret = target(event)
          ^^^^^^^^^^^^^
  File "/home/nazar-pc/.local/share/pipx/venvs/qtile/lib/python3.12/site-packages/libqtile/backend/x11/core.py", line 781, in handle_DestroyNotify
    if self.qtile.current_window is None:
       ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nazar-pc/.local/share/pipx/venvs/qtile/lib/python3.12/site-packages/libqtile/command/base.py", line 281, in __getattr__
    raise AttributeError(f"{self.__class__} has no attribute {name}")
AttributeError: <class 'libqtile.core.manager.Qtile'> has no attribute current_window

I then tried main and my config failed to load:

2024-05-05 15:13:16,615 ERROR libqtile manager.py:reload_config():L290 Configuration error:
Traceback (most recent call last):
  File "/home/nazar-pc/.local/share/pipx/venvs/qtile/lib/python3.12/site-packages/libqtile/core/manager.py", line 288, in reload_config
    self.config.load()
  File "/home/nazar-pc/.local/share/pipx/venvs/qtile/lib/python3.12/site-packages/libqtile/confreader.py", line 132, in load
    config = importlib.import_module(name)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 995, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/home/nazar-pc/.config/qtile/config.py", line 1, in <module>
    from libqtile.command import lazy
ImportError: cannot import name 'lazy' from 'libqtile.command' (/home/nazar-pc/.local/share/pipx/venvs/qtile/lib/python3.12/site-packages/libqtile/command/__init__.py)

I didn't see anything in changelog saying that from libqtile.command import lazy should break.

UPD: Now I see, libqtile.command.lazy was replaced with libqtile.lazy.lazy in 0.15.0. Didn't notice it back then and didn't notice any warnings in logs until today.

@elParaguayo
Copy link
Member

Are you sure you've loaded that PR? The line number for the current_window error doesn't match the code in PR.

@nazar-pc
Copy link
Contributor Author

nazar-pc commented May 5, 2024

Right, I just placed updated files on top of 0.25.0 and it broke. Now pulled the whole branch and unfortunately it didn't help with this issue.

@elParaguayo
Copy link
Member

Cool. Thanks for testing. Will need to add to the "to do" list...

@elParaguayo
Copy link
Member

Any chance you can take a video of this behaviour. I've just tried it and search dialog appears in the right place but I'm not convinced I'm doing this the same way as you.

@nazar-pc
Copy link
Contributor Author

nazar-pc commented May 5, 2024

Sure: https://youtu.be/n95NR_2lWoY

@nazar-pc
Copy link
Contributor Author

Were you able to reproduce it in the end? Issue is still labeled as unconfirmed.

@elParaguayo
Copy link
Member

No. No luck recreating. I'll try again later but am very busy this weekend.

@nazar-pc
Copy link
Contributor Author

Either #4583 was helping or something has changed between 0.25.0 and 0.26.0 (I also switched from old Plasma layout to upstreamed one). Now I'm sometimes getting dialog windows showing up above current window, but below basically all other windows somehow, which I have not seen before.

@elParaguayo
Copy link
Member

Ok. Can you give me some steps to recreate please?

Have you patched #4583 to 0.26.0 to see if it helps?

@nazar-pc
Copy link
Contributor Author

I have ScreenSplit like this:

|   | b |   |
| a |---| d |
|   | c |   |
|   |   |   |

All 4 are using Plasma and have Windows opened. c only had IDE, then I opened another project in IDE and noticed that search in the first project is now behind all windows on the screen except its parent.

Have you patched #4583 to 0.26.0 to see if it helps?

Not yet, could you rebase it on main so I can just install it from your branch directly?

@elParaguayo
Copy link
Member

Sure. I'll have to do that after work later today though.

@elParaguayo
Copy link
Member

OK - it's rebased.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants