Mouse bindings with context.
I might be missing something, so forgive me if I did.
It would be nice to set mouse binding in context. For example:
- double click left border to resize to 50% (context left border)
- middle click titlebar to close window (context titlebar). Maybe the same for the task in the tasklist on the panel (context panel)
- Right click on desktop (root) to show menu (context root). Etc
Most of these examples don't sound like the compositor's job tbh:
double click left border to resize to 50%
Could be done as a plugin, but it would need to detect "borders" — I guess first couple pixels of the input_region is a good enough approximation? — but not every surface even has a border.
(But why would you want such an awkward gesture that requires precise cursor positioning? We have snapping to left 50% and right 50% of the screen in move…)
middle click titlebar to close window
Could be done as an option here for SSDs; belongs in the clients (/toolkits) for CSDs.
Maybe the same for the task in the tasklist on the panel
This is purely client-side. Whatever panel you're using is responsible for this. You might want to raise an issue in wf-shell if it's what you use.
Right click on desktop (root) to show menu (context root)
This is client-side too. A "root window" layer-shell surface can have a context menu (layer-shell can create xdg-popups).
Makes sense to me. The borders was just an example of a borders context sorry for lame use case example.
The real use case I am interested in is the middle click to close.