-
-
Notifications
You must be signed in to change notification settings - Fork 472
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
Resize events not working on OSX #445
Comments
Confirmed. Overriding glutin_window and printing out other events works, but not resize events. |
Just posting this here for tracking PistonDevelopers/gfx_graphics#208 |
This boils down to whether or not window resizes should be "live" (sent immediately), only used through the callback function, or lastly, deferred until resize is over (only one resize event per window resize). cc @tomaka |
I hate this callback, but apparently resize events are shitty on os/x if you don't use a callback. |
Personally I prefer deferred resize event to a callback. Maybe this is related to #245, as resizing blocks the run loop? |
Servo needs live resize support. I don't like the callback either, but I'm not aware of any way to do live resizing on mac without it. I'm no mac expert though - if there's a way to do live resize without the callback that would be great. |
If this involves moving the window and application code into separate threads I'd say it would be out of scope for glutin. I'm assuming servo will eventually write its own window backend for each platform, since just a OpenGL context wont cut it in the long run. For now I think the callback function will do, but what should be done with the |
Perhaps we could check the size in the event iterators and generate a |
This is still an issue -- but just checking the current e.g. let cur_win_size = e.draw_size();
let (cur_win_w, cur_win_h) = (cur_win_size.width, cur_win_size.height);
if cur_win_w != win_w || cur_win_h != win_h {
view_info = compute_view(pixel_scale, cur_win_w, cur_win_h, target_w, target_h);
win_w = cur_win_w;
win_h = cur_win_h;
} |
Just came across this, definitely a pity to have to use the callback. Some more related issues and further reading for anyone interested:
|
@bvssvni @gankro Even if we can generate our own There's a comment here that describes how this might be possible by subclassing
This comment describes how to redraw upon resize, however it seems like we might be able to do something similar to avoid blocking our event iterator and continue emitting events. For example, we could catch mouse presses that occur over the resizable edges and rather than having the NSApplication enter its own |
Closing for rust-windowing/winit#39 |
OSX 10.9.5
It seems resize events are not received.
https://github.com/PistonDevelopers/glutin_window/blob/master/src/lib.rs#L89
The glutin_window back-end should map this correctly, but it is not receiving any events for resize.
The text was updated successfully, but these errors were encountered: