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

Comments

@paulrouget
Copy link
Contributor

@paulrouget paulrouget commented Aug 27, 2015

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.

@SimonSapin
Copy link
Member

@SimonSapin SimonSapin commented Aug 29, 2015

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

@paulrouget paulrouget commented Sep 21, 2015

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

@paulrouget
Copy link
Contributor Author

@paulrouget paulrouget commented Sep 22, 2015

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

@paulrouget paulrouget commented Sep 22, 2015

@paulrouget
Copy link
Contributor Author

@paulrouget paulrouget commented Jun 6, 2018

This is not standard and not necessary anymore. Closing.

@paulrouget paulrouget closed this Jun 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.