Skip to content

Erratic resizing of lv-tool window under GNOME Shell #161

Closed

Description

@kaixiong

When I try to resize the lv-tool visualization window on my GNOME Wayland desktop, the window jumps around erratically and resizes itself like it's suffering from a seizure.

Activity

  1. added this to the 0.5.0 milestone on Jan 12, 2023
  2. hartwork commented on Jan 12, 2023

    @hartwork
    Member

    @kaixiong is this with original SDL 1.2.x or with sdl12-compat? If I can trust my eyes, I get it (with X11!) on master with sdl12-compat (1.2.60) but not with plain SDL 1 (1.2.15_p20221201). You?

  3. hartwork commented on Jan 12, 2023

    @hartwork
    Member

    @kaixiong update: Even my SDL 1 toy at https://github.com/hartwork/sdl_video_demo shows this behavior with sdl12-compat 1.2.60. Are you okay with me taking this to sdl12-compat upstream for feedback? We could try sdl12-compat Git master before that, though. What do you think?

  4. kaixiong commented on Jan 12, 2023

    @kaixiong
    MemberAuthor

    @hartwork I am on SDL 1.2.15, which comes with Pop_OS! 22.04.

    Here's all the SDL packages on my system.

    ii  libsdl-image1.2:amd64      1.2.12-13build1              amd64        Image loading library for Simple DirectMedia Layer 1.2, libraries
    ii  libsdl1.2-dev              1.2.15+dfsg2-6               amd64        Simple DirectMedia Layer development files
    ii  libsdl1.2debian:amd64      1.2.15+dfsg2-6               amd64        Simple DirectMedia Layer
    ii  libsdl2-2.0-0:amd64        2.0.20+dfsg-2ubuntu1.22.04.1 amd64        Simple DirectMedia Layer
    ii  libsdl2-dev:amd64          2.0.20+dfsg-2ubuntu1.22.04.1 amd64        Simple DirectMedia Layer development files
    ii  libsdl2-image-2.0-0:amd64  2.0.5+dfsg1-3build1          amd64        Image loading library for Simple DirectMedia Layer 2, libraries
    ii  libsdl2-image-dev:amd64    2.0.5+dfsg1-3build1          amd64        Image loading library for Simple DirectMedia Layer 2, development files
    ii  libsdl2-mixer-2.0-0:amd64  2.0.4+dfsg1-4build1          amd64        Mixer library for Simple DirectMedia Layer 2, libraries
    ii  libsdl2-mixer-dev:amd64    2.0.4+dfsg1-4build1          amd64        Mixer library for Simple DirectMedia Layer 2, development files
    
  5. hartwork commented on Jan 12, 2023

    @hartwork
    Member

    @kaixiong interesting. Does my demo show the same behavior for you? If it does, we can e.g. rule out any problems from the way lv-tool is draining all events in one go.

  6. hartwork commented on Jan 12, 2023

    @hartwork
    Member

    @kaixiong PS: I should note that (unlike SDL 2) SDL 1 does not yet have explicit support for Wayland. Maybe use of Wayland is an important part of this.

  7. kaixiong commented on Jan 12, 2023

    @kaixiong
    MemberAuthor

    @hartwork so I tested lv-tool and your demo under GNOME/Wayland, GNOME/X.Org and Sway.

    The issue only appears with SDL 1.2. Using GNOME/X.Org did not make much difference.

    Under Sway, which is Wayland based, I did notice that the SDL 1.2 window auto-centers itself at the end of each resize drag. It is somewhat well behaved.

    The same is probably happening on GNOME but much less consistently or gracefully.

  8. changed the title [-]Erratic resizing of lv-tool window under GNOME Shell Wayland[/-] [+]Erratic resizing of lv-tool window under GNOME Shell[/+] on Jan 15, 2023
  9. hartwork commented on Feb 3, 2023

    @hartwork
    Member

    @kaixiong I believe I have a fix at hartwork/sdl_video_demo#8 . What do you think?

  10. kaixiong commented on Feb 3, 2023

    @kaixiong
    MemberAuthor

    @hartwork Thanks, I have replied there. But just to keep the main discussion here, I'll repeat the basic points:

    • It works, although content resizes still happen frequently. Slow content resize causes rather heavy flickering.
    • Debouncing based on time may be better. When a resize event is received, a short time window follows where subsequent resize events are 'absorbed'. Once the window expires, the content resize happens based on the latest dimensions. A subsequent resize event restarts the process.
  11. hartwork commented on Feb 3, 2023

    @hartwork
    Member

    For the record @kaixiong and I agreed on debouncing at hartwork/sdl_video_demo#8 (comment) now.

  12. hartwork commented on Feb 7, 2023

    @hartwork
    Member

    Should be fixed on both master and 0.4.x, closing as fixed. Please re-open as needed.

  13. added a commit that references this issue on Feb 10, 2023
    ba7da6d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions