w3c / window-management

Window Management API
https://www.w3.org/TR/window-management/
Other
96 stars 25 forks source link

Are moveTo and resizeTo meant to be clamped to individual screens #94

Closed jpambrun closed 2 years ago

jpambrun commented 2 years ago

Reading the draft I can see "that placement requests may be denied or clamped to the current screen" when some requirement are not met. I interpret that as should not be clamped if requirements are met, but it's not quite as specific.

However, using the chrome implementation, moveTo and resizeTo are always clamped to a screen. I can move to another screen, but it's impossible to have parts of a windows on different screens. Is this expected?

In addition, moveTo(0,0) in chrome leaves a ~10px gap (moveTo(-10,0) doesn't help). Is this behavior outside the scope of the spec and up to implementers?

michaelwasserman commented 2 years ago

This spec follows existing standards, which allow individual implementations to deny or adjust moveTo|By resizeTo|By requests: https://www.w3.org/TR/cssom-view-1/#dom-window-moveto

Chrome intentionally clamps window bounds requests within an individual screen's work area for now. I recommend filing a new.crbug.com and commenting on #74 with use cases for permitting screen-spanning placements with the window-placement permission.

Chrome's moveTo() ~10px gap sounds like a bug and should be reported at new.crbug.com

Thanks!