aboutsummaryrefslogtreecommitdiffhomepage
path: root/video/out/wayland_common.c
Commit message (Collapse)AuthorAge
...
* Revert "vo_wayland: define opaque region"Gravatar Ricardo Vieira2015-10-20
| | | | | | This reverts commit c10fb4ce9fcd3dbbf69741eb8499c4cfabbf5412. This is already done in vo_wayland.c:resize,324 doing it here makes the window bigger before the video resizes showing a black area while dragging the border.
* vo_opengl: wayland: switch to new internal APIGravatar wm42015-10-01
|
* input: add append argument to file drop eventGravatar Kevin Mitchell2015-08-30
| | | | | | This puts in place the machinery to merely append dropped file to the playlist instead of replacing the existing playlist. In this commit, all front-ends set this to false preserving the existing behaviour.
* vo_wayland: Wait for frame callbacksGravatar Jari Vetoniemi2015-08-21
| | | | | | | Privdes small api for vo_wayland where one can request frame callback and then wait for it. This will make vo_wayland play video smoothly.
* vo_wayland: define opaque regionGravatar Jari Vetoniemi2015-03-23
| | | | | This allows compositor to optimize rendering, as it will know mpv is not transparent.
* vo_wayland: share frame callbacks.Gravatar Jari Vetoniemi2015-03-23
| | | | | | | | Define frame callback logic in wayland_common.c As this should be used by opengl renderer as well. Preferably drawing should be skipped entierly when no frame callbacks are received. However, for now only swap buffers is skipped.
* buid: readd -WparenthesesGravatar wm42015-03-02
| | | | | | | | | This warning wasn't overly helpful in the past, and warned against perfectly fine code. But at least with recent gcc versions, this is the warning that complains about assignments in if expressions (why???), so we want to enable it. Also change all the code this warning complains about for no reason.
* input: add MOUSE_ENTER keybinding.Gravatar torque2015-02-18
| | | | Signed-off-by: wm4 <wm4@nowhere>
* command: unify handling of fullscreen and other VO flagsGravatar wm42015-01-16
| | | | | | | | The "ontop" and "border" properties already used a common mp_property_vo_flag() function, and the corresponding VOCTRLs used the same conventions. "fullscreen" is pretty similar, but was handled slightly similar. Change how VOCTRL_FULLSCREEN behaves, and use the same helper function for "fullscreen" as the other flags.
* wayland: implement key modifiersGravatar wm42015-01-12
| | | | Includes shift, ctrl, alt, meta.
* wayland: don't compute absurd window sizeGravatar wm42015-01-12
| | | | | | | | | For some reason, schedule_resize() can be called with everything set to 0. The code couldn't handle wl->window.aspect set to 0, converting NaNs to integers. Just work this around. (I have no idea what I'm doing. This is probably a corner case caused by my broken-ish wayland setup.)
* vo_wayland: Add "multimedia" keyboard key bindings.Gravatar Sergey Kvachonok2014-11-29
| | | | | | | | libxkbcommon keysyms are the same as X11 keysyms (sans prefix), so I simply copied the missing subsection from x11_common.c. Signed-off-by: Sergey Kvachonok <ravenexp@gmail.com> Signed-off-by: wm4 <wm4@nowhere>
* wayland: use reported rete and delayGravatar Alexander Preisinger2014-09-19
| | | | | If native-keyrepeat is true then we set the rate and delay reported by the compositor.
* wayland_common: fix changing videos when fullscreenGravatar Alexander Preisinger2014-09-10
| | | | I broke it again.
* video: rename VOCTRL_GET_WINDOW_SIZEGravatar wm42014-09-05
| | | | Make it clear that this accesses the un-fullscreened window size.
* wayland: print some useful outptu infoGravatar Alexander Preisinger2014-09-03
| | | | | Prints output informations, useful for finding out if we detect the right mode and for debugging.
* wayland: only save current mode of outputsGravatar Alexander Preisinger2014-09-03
| | | | Other ones are not needed.
* Move compat/ and bstr/ directory contents somewhere elseGravatar wm42014-08-29
| | | | | | | | | bstr.c doesn't really deserve its own directory, and compat had just a few files, most of which may as well be in osdep. There isn't really any justification for these extra directories, so get rid of them. The compat/libav.h was empty - just delete it. We changed our approach to API compatibility, and will likely not need it anymore.
* wayland: replace deprecated xkbcommon functionsGravatar Alexander Preisinger2014-08-20
| | | | Available and stable since forever (xkbcommon 0.2).
* wayland: dynamically report display fpsGravatar Alexander Preisinger2014-08-18
| | | | | | | | Only reports the most recently entered output if the window is displayed on 2 or more outputs. Should be changed to the lowest fps of all outputs the window is visible. Until no one complains this will have to wait. Look for the VO framedropping for more information on this topic.
* wayland: pointer interface is created after themeGravatar Alexander Preisinger2014-08-13
| | | | | | | | Just always load the theme. It gets freed properly and dosn't bother anyone. Fixes #1012. CC: @mpv-player/stable
* wayland: remove redundant lineGravatar Alexander Preisinger2014-08-06
|
* wayland: changes for nested compositorsGravatar Alexander Preisinger2014-08-06
| | | | | Adds necessary checks for nested compositors which only have limited interfaces. Might also be useful for other minimal compositors.
* vo: remove vo_mouse_movement() wrapperGravatar wm42014-07-27
| | | | So that VO backends don't have to access the VO just for that.
* wayland: move subsurfaces to wayland voGravatar Alexander Preisinger2014-06-15
| | | | | | | Subsurfaces are only used by the wayland vo. Thats why it makes sense to move all osd and subsurface specific parts to the vo_wayland.c Also destroy the subsurfaces and subcompositor properly.
* wayland: attach NULL surface on osd creationGravatar Alexander Preisinger2014-06-15
| | | | | | | When using the EGL output the subsurfaces have no buffer attached and the size seems to be infinite. Fix this by attaching a NULL buffer. Fixes #846
* Add more constGravatar wm42014-06-11
| | | | | | | While I'm not very fond of "const", it's important for declarations (it decides whether a symbol is emitted in a read-only or read/write section). Fix all these cases, so we have writeable global data only when we really need.
* wayland: remove stub for unimplemented functionGravatar wm42014-06-02
|
* wayland: fix typoGravatar Alexander Preisinger2014-05-14
| | | | So long in the code without me noticing. Embarassing!
* wayland: fix unchecked malloc usageGravatar wm42014-05-11
| | | | | | | Found by cppcheck. Actually untested. (This is the file drag&drop code, I don't even know which wayland clients support this.)
* wayland: don't use VOCTRL_UPDATE_SCREENINFOGravatar wm42014-05-06
| | | | Not very tested. Appears to work.
* Revert "wayland: print waylands display erros"Gravatar Alexander Preisinger2014-04-26
| | | | | | | | | | | | This reverts commit 6e34b0ec1f50612cb2767da3dbc27be0be63041d. There has always been an error message "proxy already has a listener" and I couldn't reproduce where it is comming from until now. The display interface already has a listener and we can't overwrite it. Now remove the code and avoid this error message. Conflicts: video/out/wayland_common.c
* Fix some libav* include statementsGravatar wm42014-04-19
| | | | | | | | | | | | | Fix all include statements of the form: #include "libav.../..." These come from MPlayer times, when FFmpeg was somehow part of the MPlayer build tree, and this form was needed to prefer the local files over system FFmpeg. In some cases, the include statement wasn't needed or could be replaced with mpv defined symbols.
* wayland: unset input regions for osdGravatar Alexander Preisinger2014-04-16
| | | | | Set a zero sized input region for the osd surfaces in order to avoid getting input for the subsurfaces which might dissapear any time.
* wayland/shm: Use subsurfaces for OSDGravatar Alexander Preisinger2014-04-16
|
* wayland: don't schedule resize if going fullscreenGravatar Ricardo Vieira2014-04-13
| | | | mpv was resizing to the same size before it went to fullscreen, we don't need to schedule a resize because the compositor will send a configure event with the new dimensions and thats when we should do it.
* video/out: simplify monitor aspect handlingGravatar wm42014-01-11
| | | | | | | | For some reason, this made all VO backends both set the screen resolution in opts->screenwidth/height, and call aspect_save_screenres(). Remove the latter. Move the code to calculate the PAR-corrected window size from aspect.c to vo.c, and make it so that the monitor PAR is recalculated when it makes sense.
* wayland: properly empty output listGravatar Alexander Preisinger2014-01-08
|
* wayland: fix crash when initialization failsGravatar wm42014-01-08
| | | | | | On X11, if no wayland compositor is running, wl_list_init() will never be called. This will cause destroy_display() to segfault when trying to iterate over the list.
* wayland: fix memory leaksGravatar Alexander Preisinger2014-01-08
| | | | | There are still some leaks from wayland-cursor stuff, but there is no way to free the memory as user of the cursor library.
* wayland: cleanup registry_handle_globalGravatar Alexander Preisinger2014-01-08
| | | | | The wl_registry object is already passed as a parameter. No need to create a temporary variable.
* wayland: remove set_user_data from seat_listenerGravatar Alexander Preisinger2014-01-08
| | | | | | | | | The user_data is passed on add_listener and can later be changed with set_user_data. But because we don't want to change it later and because it is the same object remove the set_user_data call. This might be a copy&paste leftover from the initial draft for the wayland backend.
* wayland: use static consistentlyGravatar Alexander Preisinger2014-01-08
| | | | Declare everything that is only needed inside wayland_common.c as static.
* wayland: fix fullscreen & resizing for goodGravatar Alexander Preisinger2014-01-07
| | | | | | | I added enough logic to never set ontop or fullscreen twitce. This commit keeps also the size of the video if multiple videos are played. If the ratio differs the width will be kept at the same size and only the height changes.
* wayland: silence annoying libwayland-client messageGravatar wm42014-01-07
| | | | | | | | | | | | | | | | | libwayland-client contains the following code [1]: runtime_dir = getenv("XDG_RUNTIME_DIR"); if (!runtime_dir) { fprintf(stderr, "error: XDG_RUNTIME_DIR not set in the environment.\n"); This means this message will unconditionally and unavoidably be printed if XDG_RUNTIME_DIR is not set. Since mpv is a terminal program, and we want to avoid unnecessary output, work it around by not attempting to use wayland if this environment variable is not set. [1] http://cgit.freedesktop.org/wayland/wayland/tree/src/wayland-client.c#n636 (cd0dccd01e16fa404e03974d30ded3aebdb1c4bc)
* wayland: fix some memory leaks on initialization failureGravatar wm42014-01-07
| | | | | | | | | | | This commonly happens when initializing vo_opengl on a X11-only system. Unfortunately, most wl_*_destroy() functions appear not to accept NULL pointers, making partial deinitialization a pain: you have to add your own NULL checks everywhere to avoid crashes. xkb.context is uninitialized separately, because you can initialize it just fine, even if the rest of input initialization fails.
* wayland: remove workaroundGravatar Alexander Preisinger2014-01-04
| | | | | | | | The changes in the vo_wayland_ontop function have no effect on the workaround. Somehow the problem just disappeared. I guess it is because of the new control function in gl_wayland.c where the resize happens immediatly after the event dispatch/flush.
* wayland: fix obvious bug in dnd codeGravatar Alexander Preisinger2014-01-04
| | | | I still don't think this is the right approach.
* video/out: remove some code duplication between X11 and waylandGravatar wm42014-01-04
| | | | | | Both X11 and Wayland support the same format for drag & drop operations (text/uri-list), and the code for that was copied from x11_common.c to wayland_common.c. Factor it out.
* input: move files drag and drop to a new event.c fileGravatar Stefano Pigozzi2014-01-04
| | | | | event.c will be used to feed the input queue with 'global' events that don't mesh well with the usual check_events path in mpv.