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

Fix X11 and Wayland - Images opened in unfocussed Tmux window overlaid on top of active window/session #215

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

twidxuga
Copy link
Contributor

@twidxuga twidxuga commented Aug 7, 2024

Fixes issue 213, on both Wayland and X11.

Note that for X11, a small change to add_image in x11.cpp was still required, to ensure no flickering (even if just for an instant) in the active session/window when initializing a new image in an unfocussed session/window. I tested in Wayland, and no change of that module was required in that case.

  • Fix starting ueberzugpp in an unfocussed window or session results in image being generated on top of the focussed window and session, instead of hidden in the correct ones, and also in the wrong position.

Additionally:

  • Removes unused include of the utilities library, introduced in PR #212

Copy link

sonarcloud bot commented Aug 9, 2024

@twidxuga
Copy link
Contributor Author

I found that you are also working on ueberzugpp-new, likely a refactor of this branch.Since tmux integration is likely to also be relevant in the new project, my two cents are to make the initial image visibility state independent of the image display method (wayland, X11, etc.). In other words, don't let equivalent to X11 or Wayland modules show or hide images after initialization. Simply delegate showing/hiding the image state to the app, so that it can decide when to show or hide images independently.

@jstkdng
Copy link
Owner

jstkdng commented Aug 12, 2024

yeah, it's a refactor of the whole project, a lot of technical debt here.

Simply delegate showing/hiding the image state to the app, so that it can decide when to show or hide images independently.

Most applications that use u++ just send either add or remove commands, they just want auto preview managing. I do wonder why old ueberzug doesn't have this issues.

@jstkdng
Copy link
Owner

jstkdng commented Aug 17, 2024

I just tried this changes and it broke another functionality that works with regular ueberzug. When you have two tmux clients connected to the same session and you open ueberzugpp no window shows up.

@twidxuga
Copy link
Contributor Author

Thanks for checking. I can have a look, but likely only next week, since I'm travelling atm.

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

Successfully merging this pull request may close these issues.

Images opened in an unfocussed Tmux window (via script) are overlaid on top of the active window
2 participants