Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support setting the window dragging region with CSS #7408

Closed
paulrouget opened this issue Aug 27, 2015 · 5 comments
Closed

Support setting the window dragging region with CSS #7408

paulrouget opened this issue Aug 27, 2015 · 5 comments
Labels
A-content/css Interacting with CSS from web content (parsing, serializing, introspection) A-platform/utils

Comments

@paulrouget
Copy link
Contributor

Glutin allows decoration-less windows. We can paint where the titlebar is supposed to be displayed by the OS, and then build our own titlebar (thinking of browser.html here).

But we need to be able to tell the OS what region of the UI is draggable.

The equivalent of -webkit-app-region: drag and -moz-window-dragging: drag;. See gecko implementation.

@jdm jdm added A-content/css Interacting with CSS from web content (parsing, serializing, introspection) A-platform/utils labels Aug 27, 2015
@SimonSapin
Copy link
Member

Such CSS properties should be prefixed with -servo- (to avoid name collisions with possible future standard properties) and not exposed to content, possibly by checking style::parser::ParserContext::stylesheet_origin in the parsing code. Or perhaps we need another mechanism for "internal" properties.

@paulrouget
Copy link
Contributor Author

Relevant gecko patches (haven't landed in m-c): https://bugzilla.mozilla.org/show_bug.cgi?id=1070710

@paulrouget
Copy link
Contributor Author

This is what I tried to do:

  • window.setMovableByWindowBackground_(YES)
  • add NSViews where the window is not draggable
  • these views are subclasses of NSView where mouseDownCanMoveWindow returns NO

But mouseDownCanMoveWindow is never called. I don't know why.

@paulrouget
Copy link
Contributor Author

Failing code: paulrouget/glutin@5b922d1

@paulrouget
Copy link
Contributor Author

This is not standard and not necessary anymore. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-content/css Interacting with CSS from web content (parsing, serializing, introspection) A-platform/utils
Projects
None yet
Development

No branches or pull requests

3 participants