Skip to content

[Mac OS X] imgui issues after closing laptop #248

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

Closed
knausj85 opened this issue Feb 20, 2021 · 5 comments
Closed

[Mac OS X] imgui issues after closing laptop #248

knausj85 opened this issue Feb 20, 2021 · 5 comments
Milestone

Comments

@knausj85
Copy link

knausj85 commented Feb 20, 2021

I typically unlock my laptop with touch ID, and then close the laptop to use my external screen.

enabling command history consistently results in the below error if talon was already running:

2021-02-19 21:24:42 ERROR     8:   talon/scripting/talon_script.py:518| 
    7:   talon/scripting/talon_script.py:264| 
    6:   talon/scripting/talon_script.py:485| 
    5:        talon/scripting/actions.py:74 | 
    4:          talon/scripting/types.py:360| 
    3: user/knausj_talon/code/history.py:59 | gui.show()
    2:                    talon/imgui.py:801| 
    1:                   talon/screen.py:241| 
ValueError: screen not found containing point 960.0, 0.0

[The below error was raised while handling the above exception(s)]
2021-02-19 21:24:42 ERROR cb error topic="phrase" cb=<bound method SpeechSystem.engine_event of <talon.scripting.speech_system.SpeechSystem object at 0x11055dea0>>
   29:       lib/python3.9/threading.py:912* # cron thread
   28:       lib/python3.9/threading.py:954* 
   27:       lib/python3.9/threading.py:892* 
   26:                    talon/cron.py:123| 
   25:                    talon/cron.py:80 | 
   24:          talon/scripting/rctx.py:225| # 'cron' talon_plugins.engines.dragon:<lambda>()
   23:      talon/scripting/dispatch.py:97 | 
   22:      talon/scripting/dispatch.py:103| 
   21:      talon/scripting/dispatch.py:138| 
   20:      talon/scripting/dispatch.py:129| 
   19:          talon/scripting/rctx.py:225| # 'phrase' main:_redispatch()
   18: talon/scripting/speech_system.py:52 | 
   17:      talon/scripting/dispatch.py:103| 
   16:      talon/scripting/dispatch.py:138| 
   15:      talon/scripting/dispatch.py:129| 
   14: ------------------------------------# cron thread
   13:          talon/scripting/rctx.py:225| # 'phrase' main:engine_event()
   12: talon/scripting/speech_system.py:353| 
   11:       talon/scripting/actions.py:74 | 
   10:         talon/scripting/types.py:360| 
    9:          talon/scripting/core.py:108| 
    8:       talon/scripting/actions.py:74 | 
    7:         talon/scripting/types.py:360| 
    6:          talon/scripting/core.py:138| 
    5:       talon/scripting/actions.py:74 | 
    4:         talon/scripting/types.py:360| 
    3:          talon/scripting/core.py:143| 
    2:  talon/scripting/talon_script.py:615| 
    1:  talon/scripting/talon_script.py:522| 
talon.scripting.talon_script.TalonScriptError: 
 in script at /Users/jeffknaus/.talon/user/knausj_talon/modes/modes.talon:7:
   user.mouse_wake()
   user.history_enable()
 > user.talon_mode()
ValueError: screen not found containing point 960.0, 0.0

only restarting talon resolves the issue

@lunixbochs lunixbochs added this to the v0.2.0 milestone Feb 20, 2021
@nriley
Copy link

nriley commented Apr 1, 2021

I ran into something similar I think. It seems like Talon (and maybe macOS, since I was adjusting my screen configuration a small amount to work around a bug in which no windows were visible on my main screen) thinks that one of my screens has zero size.

>>> ui.screen.screens()
[Screen(x=0.0, y=1440.0, size=(0.0, 0.0), mm=(599.2995301699309, 340.24185535519626)), Screen(x=711.0, y=1440.0, size=(1112.0, 834.0), mm=(392.2888829973009, 294.2166622479757))]

Restarting Talon fixed my issue as well. After restarting, I get:

>>> ui.screen.screens()
[Screen(x=0.0, y=0.0, size=(2560.0, 1440.0), mm=(599.2995301699309, 340.24185535519626)), Screen(x=736.0, y=1440.0, size=(1112.0, 834.0), mm=(392.2888829973009, 294.2166622479757))]

@Qubasa
Copy link

Qubasa commented Jun 26, 2021

Also happens on gnome linux under x11 with 3 displays one of which is the disabled laptop display

>>> ui.screen.screens()
[Screen(x=0.0, y=107.0, size=(2560.0, 1440.0), mm=(598.0, 336.0)), Screen(x=2560.0, y=0.0, size=(2560.0, 1440.0), mm=(597.0, 336.0))]

@xsuchy
Copy link

xsuchy commented Jul 1, 2021

Happens to me on Linux (even without closing the laptop) with laptop display + 4k monitor (rotated by 90 degrees)

>>> ui.screen.screens()
[Screen(x=0.0, y=2445.0, size=(1920.0, 1080.0), mm=(344.0, 194.0)), Screen(x=1920.0, y=0.0, size=(2160.0, 3840.0), mm=(296.0, 527.0))]

@nriley
Copy link

nriley commented Jul 11, 2021

Potentially related: my screen_change callback doesn't get called when I change my display arrangement in Displays System Preferences. I did verify that the NSApplication notification NSApplicationDidChangeScreenParametersNotification is triggered when I do this, so this might be one potential path forward. Luckily I don't actually rearrange my displays much, but I sometimes need to in order to work around a Sidecar bug (as discussed in my comment above).

@lunixbochs lunixbochs mentioned this issue Sep 17, 2021
11 tasks
@lunixbochs
Copy link

this should be fixed in beta 0.2.0-85, please test and report any issues to the beta channel or #382

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

5 participants