Skip to content
This repository has been archived by the owner on Jul 10, 2023. It is now read-only.

macos: Map our user generated event to Event::Awakened #122

Closed
wants to merge 368 commits into from

Conversation

jrmuizel
Copy link

@jrmuizel jrmuizel commented Mar 29, 2017

This change is Reviewable

FredrikNoren and others added 30 commits January 8, 2016 00:34
According to https://msdn.microsoft.com/en-us/library/windows/desktop/dd318284(v=vs.85).aspx if double buffer is unavailable then a single buffer will be returned
Prefer double buffer on wgl if unspecified
Fixes rust-windowing#697

It seems that `XSync` doesn't really makes the window viewable.

This feels hacky, other option to do it could be using `XIfEvent` or
similar to listen to `MapNotify` events, but we'll have a loop still.

In practice, this lasts between two and thre iterations on my machine,
which is something not noticeable.
x11: Poll the window until it is really visible
This includes rust-windowing#706, which should
allow the landing of the glutin update.
Also implements platform_window() for cocoa.
Adding os::macos for accessing the underlying NSWindow
based on this freerdp patch
FreeRDP/FreeRDP@9767f7f

thanks to emiliocobos on irc
…instead of low-level X11 calls that don't work with utf8
Merge from glutin upstream

This will allow servo/servo#8641 to finally merge in.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/glutin/64)
<!-- Reviewable:end -->
tomaka and others added 29 commits October 6, 2016 20:36
…teWindow

Properly create a wide string for use in the call to CreateWindowExW
…, r=emilio

Update from upstream

r? @metajack @emilio

Do we normal do these updates as a `git merge tomaka/glutin` and then open the PR with a merge commit? Or do we rebase our branch on top of it and then do a yolo-force-push onto the servo branch? /me is confused...

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/glutin/107)
<!-- Reviewable:end -->
…strom

linux: Disable Wayland backend because it's unusable for Servo.

r? @larsbergstrom or @glennw or @pcwalton

Funny how that comment was there but was completely ignored.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/glutin/108)
<!-- Reviewable:end -->
Update image to 0.12

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/glutin/110)
<!-- Reviewable:end -->
Update core-graphics to 0.5; update minor version.

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/glutin/111)
<!-- Reviewable:end -->
Check for libEGL.dll

This would allow rendering through Angle, then capturing and analyzing the WR results on Windows using powerful tools (like RenderDoc, GPU PerfStudio, PIX, NSight, etc).

Upstream PR: rust-windowing#846

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/glutin/112)
<!-- Reviewable:end -->
Update cocoa dependency.

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/glutin/113)
<!-- Reviewable:end -->
…eel_events, r=pcwalton

return coordinates in MouseWheel events

Glutin side of servo/servo#14808 to fix servo/servo#14290, it's a follow up from servo#97

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/glutin/109)
<!-- Reviewable:end -->
Update cocoa to 0.7

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/glutin/114)
<!-- Reviewable:end -->
Remove wayland support and dependencies

Our glutin fork has diverged significantly from upstream, and it will take significant work to merge them, or to move to some new windowing API built on top of glutin, winit, or otherwise.

In the meantime we are building very old Wayland libraries but never using them (rust-windowing#108).  As a short-term patch to improve Servo build times by not building a bunch of unused dependencies, this patch just rips out the unused wayland support from our fork.  (This code is already gone from upstream glutin, moved into `winit` and using newer, rewritten wayland crates.)

r? @glennw

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/glutin/115)
<!-- Reviewable:end -->
Update core-graphics to 0.7

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/glutin/116)
<!-- Reviewable:end -->
…=fabricedesre,larsbergstrom

Android life cycle improvements

- Handle Activity Life Cycle: EGLContext is lost when the app goes to background and needs to be restored when the activity goes to foreground. Stop animation loop when the Activity stopped.
- Handle event loop awake for Servo Animation loop
- Handle screen resize events
- Handle orientation changed events

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/glutin/117)
<!-- Reviewable:end -->
Update cgl to v0.2 and README

This fixes rust-windowing#118.
README.md is also updated as to assume gleam v0.3.0, since cgl v0.2 uses it.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/glutin/120)
<!-- Reviewable:end -->
This fixes propagation of Event::Awakend from wakeup_event_loop() when
using poll_event() on macOS.

Currently wait_event() translates all unknown events into
Event::Awakened so doesn't need the explicit translation.

This comes from 3b1fdc0 in winit
@jrmuizel jrmuizel closed this Mar 29, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet