talonvoice / beta

Issue tracker for the private Talon Beta
10 stars 0 forks source link

Imgui renders distortedly after calling show and freeze subsequently #78

Closed ma-anwar closed 3 years ago

ma-anwar commented 4 years ago

Imgui will sometimes render with its width distorted after repeatedly showing and hiding it. The issue can be fixed by removing the call to gui.freeze().

OS: Ubuntu 18.04, GPU: Integrated Intel HD Graphics 520 on Intel I5

Can be reproduced with the following scripts after calling show and hide repeatedly.

from talon import Module, Context, actions, ui, imgui
ctx = Context()
mod = Module()
@mod.action_class
class Actions:
    def show():
        """Shows"""
        gui.show()
        gui.freeze()

    def hide():
        """Hides"""
        gui.hide()
@imgui.open(software=False)
def gui(gui: imgui.GUI):
    gui.text("Testing")
test show: user.show()
test hide: user.hide()
fidgetingbits commented 3 years ago

I'm seeing distorted windows with a freeze() call that was just added to the programming stuff. toggle library which just shows a list of library names you can insert into your editor. I don't seem to typically get this problem any but I think it's because most things don't use freeze() these days? The problem goes away if I highlight a different window, as it seems to refresh the window. Also replacing with show() causes no problems.

OS: Arch Linux GPU: NVIDIA Corporation GM206GLM [Quadro M2200 Mobile]

Relevant gui causing issues. https://github.com/knausj85/knausj_talon/blob/0e8a52013ad37c9c02a2a896feef028c13561ef4/code/code.py#L464

Are not sure that this is the same distortion that was originally mentioned above, but I'm just lumping it in here for now. Examples of distorted and normal: screenshot-20201002151049 screenshot-20201002151034

lunixbochs commented 3 years ago

you're not supposed to call both show and freeze, they're mutually exclusive, that might be the reason?

lunixbochs commented 3 years ago

freeze will be a noop in the next release