-
|
I assume that this has to be accessible externally somehow because the switcher plugin is able to access it, but I'm not fluent enough in c++ to really understand how it does that, or if I could do that over IPC. Thank you for any help! I've been stuck on this for a minute and I will really appreciate any guidance |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
Hi, there is no magic way to compute workspaces for views. Workspaces are arranged in a grid and views can freely move between them, overlapping multiple workspaces, which is why there isn't really a single "workspace" assigned to a view. Most of the time, we use a heuristic. Compute the center point of a view, and divide it by the output resolution. As view geometry is relative to the current workspace, this would give you a rough idea on which workspace the view is, relative to the current one. Small example:
Hope this makes sense. |
Beta Was this translation helpful? Give feedback.
-
|
Hi, This works only for the focused (output) wset-index, for multi output you need to improve to catch all wsets you can also use utils.get_views_from_active_workspace() to get views from active workspace |
Beta Was this translation helpful? Give feedback.
Hi, there is no magic way to compute workspaces for views. Workspaces are arranged in a grid and views can freely move between them, overlapping multiple workspaces, which is why there isn't really a single "workspace" assigned to a view. Most of the time, we use a heuristic. Compute the center point of a view, and divide it by the output resolution. As view geometry is relative to the current workspace, this would give you a rough idea on which workspace the view is, relative to the current one. Small example: