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

Choppy/slow window opacity updates in v1.10 #8580

Closed
fennerm opened this issue Feb 18, 2025 · 1 comment · Fixed by #8581
Closed

Choppy/slow window opacity updates in v1.10 #8580

fennerm opened this issue Feb 18, 2025 · 1 comment · Fixed by #8581
Labels
bug Not working as intended

Comments

@fennerm
Copy link

fennerm commented Feb 18, 2025

Please read the following before submitting:

  • Please do NOT submit bug reports for questions. Ask questions on IRC at #sway on Libera Chat.
  • Proprietary graphics drivers, including nvidia, are not supported. Please use the open source equivalents, such as nouveau, if you would like to use Sway.
  • Please do NOT submit issues for information from the github wiki. The github wiki is community maintained and therefore may contain outdated information, scripts that don't work or obsolete workarounds.
    If you fix a script or find outdated information, don't hesitate to adjust the wiki page.

Please fill out the following:

default_border none
  • Stack Trace:
    NA

  • Description:
    I maintain a program which indicates the focused window by updating the window opacity temporarily - https://github.com/fennerm/flashfocus. In sway 1.10.1 the performance of updating window opacity seems to have degraded a lot. This seems to only happen when default_border=none, or at least its much more evident.

Expected behavior from v1.9.5:
https://github.com/user-attachments/assets/b6186925-eefa-4003-9d9a-d3f2701ad975

Actual behavior in v1.10.1:
https://github.com/user-attachments/assets/ccfa9f49-468a-4cdd-8e79-e26693700d93

You can reproduce this using this script:

#!/usr/bin/env bash

for OP in 0.905 0.82 0.745 0.68 0.625 0.58 0.545 0.52 0.505 0.5 0.505 0.52 0.545 0.58 0.625 0.68 0.745 0.82 0.905 1
do
        swaymsg opacity $OP
        sleep .05
done

And updating your window navigation keys as follows:

bindsym $mod+h exec swaymsg focus left && <path-to-script>
bindsym $mod+l exec swaymsg focus right && <path-to-script>
bindsym $mod+j exec swaymsg focus down && <path-to-script>
bindsym $mod+k exec swaymsg focus up && <path-to-script>
@fennerm fennerm added the bug Not working as intended label Feb 18, 2025
Nefsen402 added a commit to Nefsen402/sway that referenced this issue Feb 18, 2025
Calling container_update() wasn't enough: If there is no visible window
decorations (title bar, borders) container_update would basically no-op
and the scene wouldn't repaint with the update alpha. By also calling
output_configure_scene() we force a call to
wlr_scene_buffer_set_opacity() thus ensuring we update the scene.

Closes: swaywm#8580
Nefsen402 added a commit to Nefsen402/sway that referenced this issue Feb 18, 2025
Calling container_update() wasn't enough: If there is no visible window
decorations (title bar, borders) container_update would basically no-op
and the scene wouldn't repaint with the update alpha. By also calling
output_configure_scene() we force a call to
wlr_scene_buffer_set_opacity() thus ensuring we update the scene.

Closes: swaywm#8580
@fennerm
Copy link
Author

fennerm commented Feb 25, 2025

Thanks for the quick fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Not working as intended
Development

Successfully merging a pull request may close this issue.

1 participant