summaryrefslogtreecommitdiffstats
path: root/video/out/cocoa
Commit message (Collapse)AuthorAgeFilesLines
* cocoa: support the "window-minimized" propertyJaime Marquínez Ferrándiz2015-03-081-0/+10
| | | | Signed-off-by: Stefano Pigozzi <stefano.pigozzi@gmail.com>
* cocoa: fix autohide in fullscreenStefano Pigozzi2015-03-083-4/+5
|
* cocoa: fix mouse hiding with launchpad and dock foldersStefano Pigozzi2015-03-082-0/+11
| | | | | | | | | | | | 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: clamp mouse position to window.torque2015-03-071-0/+2
| | | | | Prevents out-of-window coordinates being reported for mouse coordinates. Previously they could be out-of-window coordinates on init or on resize.
* cocoa: update mouse coordinates when window is initialized.torque2015-03-072-1/+1
| | | | | | Make MpvEventsView -signalMousePosition a public method so it can be called without a compiler warning. Previously, the mouse position would be reported as (0,0) until the cursor was moved.
* input: add MOUSE_ENTER keybinding.torque2015-02-181-0/+3
| | | | Signed-off-by: wm4 <wm4@nowhere>
* cocoa: fix build on 10.9Stefano Pigozzi2015-01-021-1/+1
| | | | Use -isInFullScreenMode instead of the property introduced with the 10.10 SDK.
* cocoa: fix NSMapGet errorStefano Pigozzi2015-01-021-2/+4
| | | | regression from 64b6b2ea45
* cocoa: fix uninitialization while in fullscreenStefano Pigozzi2015-01-012-0/+13
| | | | | | | | This is only needed for switching video track with `_`, since Cocoa automatically handles cleaning up the application's presentation options when quitting the process. Fixes #1399
* cocoa: allow to black out other display when going fsStefano Pigozzi2014-12-012-1/+2
| | | fixes #1302
* cocoa: reintroduce async resizeStefano Pigozzi2014-10-182-2/+7
| | | | | | | 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-172-14/+101
| | | | | Previously we didn't report events to the core, but still prevented the events to travel on the responder chain.
* libmpv/cocoa: allow clients to use mpv event systemStefano Pigozzi2014-10-121-0/+1
| | | | | | | | | | This allows mpv's view to take key and send events to mpv's core. To set key status correctly, clients must call -[NSWindow selectNextKeyView:] during reconfig on the main thread. All is 'documented' in the cocoabasic example. If someone knows a better way to handle giving key to the embedded view, let me know!
* cocoa: remove usage of Objective-C categoriesStefano Pigozzi2014-10-124-88/+37
| | | | | Objective-C categories need special linker flags from the user when statically linking (-ObjC LDFLAG), so make everyone's life simpler and remove them.
* cocoa: post keydown and keyup events without event monitorStefano Pigozzi2014-10-092-0/+9
| | | | | 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: allow to embed into an arbitrary NSViewStefano Pigozzi2014-10-084-6/+6
| | | | | Basically add if guards on all the problematic features. I'm still thinking about a better way to handle this, but for the time being, this will do.
* cocoa: fix mouse autohideStefano Pigozzi2014-10-051-1/+1
| | | | broken in 547b62f
* cocoa: remove a debug commentoStefano Pigozzi2014-10-051-1/+1
| | | | fixup previous commit
* cocoa: separate video view and events viewStefano Pigozzi2014-10-055-11/+74
|
* cocoa: remove --fs-missioncontrolStefano Pigozzi2014-10-052-44/+2
| | | | | | | This is the first of a series of commits that will change the Cocoa way in a way that is easily embeddable inside parent views. To reach that point common code must avoid referencing the parent NSWindow since that could be the host application's window.
* cocoa/libmpv: allow to embed mpv GL view in another windowStefano Pigozzi2014-10-052-5/+14
| | | | | | | | | | | | | | | | | | | This is just temporary code but is a good base for future work (and baby steps are required for these changes). The 'final destination' is embedding the video view into any NSView but that requires some more work (the mechanism will be the same: pass the view's pointer casted to int64_t through -wid). For instance we will need to remove as much usage of the window instance as possible, and use nil guards where not possible. For this reason I will remove stuff like the mission control fullscreen feature (it's a cute feature but annoying to support and quite limited, go make your GUIs), and a way to lookup the current screen directly from the NSView absolute coordinates (this is needed for ICC detection mostly, and reporting back the screen to mpv's core). Moreover the current view.m will need to be separated into 2 views: the actual video view that will be embedded, and a parent view that will not be embedded and will be responsibile for tracking events.
* cocoa: only call resize for view changing frameStefano Pigozzi2014-10-042-5/+2
|
* cocoa: remove pointless drawRectStefano Pigozzi2014-10-041-7/+0
| | | | | | Apparently it causes deadlocks, and at the moment it does nothing. Fixes #778
* cocoa: move to a simpler threading modelStefano Pigozzi2014-10-042-2/+4
| | | | | | | | | | | | | | 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
* cocoa: macosx_application needs cocoa-applicationFRAU KOUJIRO2014-08-061-1/+0
|
* cocoa: use mainScreen as a fallback for window constrainingStefano Pigozzi2014-04-281-1/+1
|
* cocoa: disallow the titlebar to exit the visibleFrame on the bottom edgeStefano Pigozzi2014-04-281-6/+7
|
* cocoa: add constraints to prevent the window to exit the screenStefano Pigozzi2014-04-281-9/+21
| | | | | | | | Previously the window could be made to completly exit the screen with a combination or moving it close to an edge and halving it's size (via cmd+0). This commit address the problem in the most simple way possibile by constraining the window to the closest edge in these edge cases.
* cocoa: fix native fullscreenRyan Goulden2014-04-282-57/+68
| | | | | | | | | | | | | | | | | | | | | | | This fixes a couple of issues with the Cocoa `--native-fs` mode, primarily: - A ghost titlebar at the top of the screen in full screen: This was caused by the window constraining code kicking in during fullscreen. Simply returning the unconstrained rect from the constraining method fixes the problem. - Incorrect behavior when using the titlebar buttons to enter/exit fullscreen, as opposed to the OSD button. This was caused by mpv's internal fullscreen state going out of sync with the NSWindow's one. This was the case because `toggleFullScreen:` completely bypassed the normal event flow that mpv expects. Signed-off-by: Ryan Goulden <percontation@gmail.com> Change style for mpv, simplify and refactor some of the constraining code. Signed-off-by: Stefano Pigozzi <stefano.pigozzi@gmail.com>
* vo_opengl, cocoa: allow to autoselect a color profileStefano Pigozzi2014-03-312-1/+8
| | | | | | | | | | | | | 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: allow to drag and drop URLsNyx0uf2014-01-101-5/+19
| | | | | | | This commit also improves the visual feedback to the user by showing a plus icon in the mouse cursor when dragging supported types. Fixes #469
* cocoa: handle files drag and drop on the player video viewStefano Pigozzi2014-01-043-1/+23
|
* Fix OSX build; remove all remaining mpvcore references11rcombs2013-12-172-3/+3
|
* cocoa: use window-scale to support video scaling functionalityStefano Pigozzi2013-11-222-6/+3
| | | | | 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: apply the more invasive constraining only with cmd+1/2/3Stefano Pigozzi2013-10-281-2/+10
| | | | | Regression from bc49957 Fixes #321
* cocoa: constraint the window position a little moreStefano Pigozzi2013-10-251-1/+6
| | | | | The intention of this is to not make the window go outside the screen when changing dimensions from 2x to .5x.
* cocoa: refactor precise scrolling to a separate methodStefano Pigozzi2013-10-121-4/+7
|
* cocoa: fix mouse wheel scrollingMad Fish2013-10-121-1/+1
|
* cocoa_common: check if the screen has a menubar in a more generic wayStefano Pigozzi2013-10-091-1/+3
| | | | Fixes #274
* cocoa_common: add OS X 10.7 compatibility hacks includesStefano Pigozzi2013-10-051-0/+1
| | | | | I forgot these when I split the code. They will hopefully fix compilation on 10.7.
* cocoa_common: report pixels instead of points during mouse movementStefano Pigozzi2013-09-281-5/+15
| | | | | | | This fixes the position reporting on retina displays. Doesn't make any difference on normal displays where 1px = 1pt. Fixes: #260
* cocoa_common: split the code, refactoring and cleanupsStefano Pigozzi2013-09-287-0/+548
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.