summaryrefslogtreecommitdiffstats
path: root/video/out/cocoa/mpvadapter.h
Commit message (Collapse)AuthorAgeFilesLines
* cocoa: fix segfault in certain circumstancesAkemi2017-02-271-0/+1
| | | | | | | | | | | | | | i falsely assumed that the windowDidChangeScreen was meant to report ‘physical’ screen changes but was wondering why it triggers on other events too. it actually is a event that informs us when anything referenced by our current NSScreen is changed. even when something referenced in the NSScreen changed the old and new NSScreen are still equal if the physical screen didn’t change. with that my previous optimisation broke some cases where the physical screen didn’t change but things it referenced did, leading to a segfault when theses were accessed. to keep the optimisation we will always update our internal NSScreen reference but the rest only when the physical screen was changed.
* cocoa: refactor mouse events and cursor visibilityAkemi2017-02-161-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | we reported some unnecessary mouse movements and not all mouse enter and leave events. that lead to wrongly reported activity on hover areas like on the OSC or comparable lua scripts. sometimes menu items were shown that shouldn't be shown or they didn't vanish because of the missing mouse leave event. this incorporates @torque's fix for mouse leave events that weren't triggered during a transition, like going to fullscreen. the tracking area was updated but the mouse never left that area because it was never over it. besides some known cursor visibility bugs the aforementioned changes also revealed some other bugs that weren't reproducible before because of the missbehavior. known issues, in some cases the cursor doesn't show or hide properly. for example when switching spaces, switching Apps via CMD+Tab or a system notification. former two could be fixed while keeping our current blank cursor approach. though the notification case couldn't. there is no event or similar to detect a notification and the cursor visibility couldn't be recovered in any way. new issues, i noticed that our event view isn't initialised yet when the first VOCTRL_SET_CURSOR_VISIBILITY event gets dispatched, which depends on the event view to be initialised. so the mouse cursor couldn't be hidden when mpv was opened and the cursor was within the window bounds. this wasn't noticeable before because of various bugs and unwanted behavior that have been fixed with this. now, in case the event view isn't ready yet, we set the visibility at a later point when the event view is ready and a helper flag is set. Fixes #1817 #3856 #4147
* cocoa: fullscreen refactoringAkemi2016-12-151-3/+3
| | | | | | | | | | this replaces the old fullscreen with the native macOS fullscreen. additional the --fs-black-out-screens was removed since the new API doesn't support it in a way the old one did. it can possibly be re-added if done manually. Fixes #2857 #3272 #1352 #2062 #3864
* cocoa: fix autohide in fullscreenStefano Pigozzi2015-03-081-1/+1
|
* cocoa: fix mouse hiding with launchpad and dock foldersStefano Pigozzi2015-03-081-0/+1
| | | | | | | | | | | | Some UI elements in OS X – like Launchpad and Dock folders – are implemented using borderless windows in background demonized applications. When we use these elements, mpv doesn't stop to be the active application, but the mpv window leaves keyWindow state while we use the OS controls. This commit just keeps track of window state to update the cursor visibility accordingly. Fixes #513
* cocoa: allow to black out other display when going fsStefano Pigozzi2014-12-011-0/+1
| | | fixes #1302
* cocoa: reintroduce async resizeStefano Pigozzi2014-10-181-2/+1
| | | | | | | After removing synchronous libdispatch calls, this looks like it doesn't deadlock anymore. I also experimented with pthread_mutex_trylock liek wm4 suggested, but it leads to some annoying black flickering. I will fallback to that only if some new deadlocks are discovered.
* cocoa: allow mouse events to bubble up with no-input-cursorStefano Pigozzi2014-10-171-0/+2
| | | | | Previously we didn't report events to the core, but still prevented the events to travel on the responder chain.
* cocoa: post keydown and keyup events without event monitorStefano Pigozzi2014-10-091-0/+1
| | | | | Our code worked under the assumption that the event monitor is always active and we did remove the keydown and keyup overrides from our cocoa view.
* cocoa: move to a simpler threading modelStefano Pigozzi2014-10-041-1/+2
| | | | | | | | | | | | | | Unfortunately using dispatch_sync for synchronization turned out to be really bad for us. It caused a wide array of race conditions, deadlocks, etc. Moving to a very simple mutex. It's not clear to me how to do liveresizing with this, for now it just flickers with is unacceptable (maybe I'll draw black instead). This should fix all the threading cocoa bugs. Reopen if it's not the case! Fixes #751 Fixes #1129
* vo_opengl, cocoa: allow to autoselect a color profileStefano Pigozzi2014-03-311-0/+1
| | | | | | | | | | | | | This commit adds support for automatic selection of color profiles based on the display where mpv is initialized, and automatically changes the color profile when display is changed or the profile itself is changed from System Preferences. @UliZappe was responsible with the testing and implementation of a lot of this commit, including the original implementation of `cocoa_get_icc_profile_path` (See #594). Fixes #594
* cocoa: remove dead codeStefano Pigozzi2014-01-211-1/+0
| | | | This became dead code in commit 3f594c2e.
* cocoa: handle files drag and drop on the player video viewStefano Pigozzi2014-01-041-0/+1
|
* cocoa: use window-scale to support video scaling functionalityStefano Pigozzi2013-11-221-0/+1
| | | | | In the cocoa backend you can use cmd+0/1/2 to scale the window. This commit makes it use the new window-scale functionality.
* cocoa_common: split the code, refactoring and cleanupsStefano Pigozzi2013-09-281-0/+32
Split the code to several files. The GUI elements now each have they own files and private state. The original code was a mess to respect the retarded mplayer convention of having everything in a single file. This commit also seems to fix the long running bug of artifacts showing randomly when going fullscreen using nVidia GPUs.