Operating system: Darwin-18.7.0-x86_64-i386-64bit 64 Bits
Graphics card: Intel HD Graphics 5000 OpenGL Engine Intel Inc. 4.1 INTEL-12.10.12
Broken: version: 2.82 (sub 1), branch: master (modified), commit date: 2019-10-31 23:45, hash: rBc11d3c1b9208
Short description of error
In an app-level timer, trying to set the workspace on a window doesn't work. It looks like the call to WM_event_add_notifier in rna_Window_workspace_update always dispatches events to the context's current window rather than the Window object whose workspace attribute is being changed.
Exact steps for others to reproduce the error
Run this script in the Scripting workspace:
import bpy def tick(): bpy.context.window_manager.windows.workspace = bpy.data.workspaces['Shading'] return 0 bpy.app.timers.register(tick)
Running the script does not switch workspaces to the Shading workspace. Calling the tick() function directly switches workspaces as expected.