diff options
author | Akemi <der.richter@gmx.de> | 2017-01-28 16:29:22 +0100 |
---|---|---|
committer | Akemi <der.richter@gmx.de> | 2017-02-02 16:22:27 +0100 |
commit | 6da224b1ddc6f28fe38900b6146f739d3acfb648 (patch) | |
tree | b863684f6076b5be50b30c4e1b22249c2a5e1417 /waftools | |
parent | f39a1cb1b0214ee3fb0640e11c1eeea6b3af47eb (diff) | |
download | mpv-6da224b1ddc6f28fe38900b6146f739d3acfb648.tar.bz2 mpv-6da224b1ddc6f28fe38900b6146f739d3acfb648.tar.xz |
cocoa: optimise screen event handling
this optimises two things and fix a minor bug.
1. we always updated the display refresh rate on any mode change whether
it was the current screen or not. now we only update the refresh rate
when the mode changed happened on the current screen.
2. the windowDidChangeScreen event doesn't exclusively trigger on screen
changes so we updated the display refresh rate in cases where it wasn't
needed at all. since we manually keep track of the current screen, we
can easily test if the screen really changed.
3. weirdly on initWithContentRect accessing the screen of the window
always returned the main screen instead of the screen the window is
created on. since we already use the window init method with the screen
as argument, overwrite that method instead and use the screen argument.
Diffstat (limited to 'waftools')
0 files changed, 0 insertions, 0 deletions