get_work_area_for_monitor() returns incorrect size during startup in X11
In an extension (desktop-icons and desktop-icons-ng), calling
get_work_area_for_monitor(); during startup under X11 returns an incorrect workarea size: it should be 0,27;1920,1053, but it returns 0,61;1920,1019 (for a 1920x1080 monitor). Called under Wayland it returns the correct value. Waiting one second before getting the data also returns the correct value.
Relaunching the desktop with Alt+F2 -> r doesn't "fix" it: still receive the incorrect value.
Of course, in the
enable() method I connect it to the 'startup-complete' signal to wait until the desktop has ended the startup process.
The piece of code used to get the working area is:
let ws = global.workspace_manager.get_workspace_by_index(0); let area = ws.get_work_area_for_monitor(0);