Commit Graph

10 Commits

Author SHA1 Message Date
Alexander Preisinger 405182af46 wayland: use VOCTRL_SET_CURSOR_VISIBILITY 2013-05-26 16:44:19 +02:00
Alexander Preisinger bb9b6501fd wayland: introduce vo_wayland_config
This removes the need for exposing vo_wayland_fullscreen and other functions
also this will be usefull for other vos in the future.
2013-05-26 16:44:19 +02:00
wm4 bf10a4fdfa video/out: introduce vo_control for gl_common based VOs
Instead of having separate callbacks for each backend-handled feature
(like MPGLContext.fullscreen, MPGLContext.border, etc.), pass the
VOCTRL responsible for this directly to the backend. This allows
removing a bunch of callbacks, that currently must be set even for
optional/lesser features (like VOCTRL_BORDER).

This requires changes to all VOs using gl_common, as well as all
backends that support gl_common.

Also introduce VOCTRL_CHECK_EVENTS. vo.check_events is now optional.
VO backends can use VOCTRL_CHECK_EVENTS instead to implementing
check_events. This has the advantage that the event handling code in
VOs doesn't have to be duplicated if vo_control() is used.
2013-05-26 16:44:18 +02:00
Alexander Preisinger 2c6c842719 wayland: reworked resizing
This fixes 2 bugs:
 * Resizing very fast breaks the aspect of the window and the width and height
   don't match with the video anymore
 * Pressing 'f' for fullscreen very fast can overwrite the backup variables for
   the previous width and height.

Also includes a better aspect calculation with fluid resizing.
2013-05-07 21:21:37 +02:00
Alexander Preisinger 57e0a84715 wayland: remove unused stuff 2013-05-02 21:01:19 +02:00
Alexander Preisinger 3899e594ea wayland: remove input modifier variable
This variable was never used anywhere.
2013-05-01 15:46:01 +02:00
Alexander Preisinger db0c3d79f8 wayland: use GetTimerMS for hiding mouse cursor
This commit remove a lot of linux specific code, like epoll. It also reduces
the complexity of the code. Instead of epoll we use poll which makes the
wayland backend more portable to other platforms.
2013-05-01 15:41:33 +02:00
Alexander Preisinger 048c68e5c2 wayland: use mpv internal key auto-repeat handling
This removes a good chunk of code trying to recreate key repeat.
Because the wayland protocol and xkbcommon don't have an interface for
auto-repeating pressed keys.
2013-05-01 13:41:07 +02:00
wm4 1b09f46338 x11_common: use private variables for window state
Store the window state (position and size) in vo_x11_state, instead of
in vo->dx/dy/dwidth/dheight. The VO variables are overwritten by vo.c on
every vo_config() call, which is extremely not helpful.

Now vo->dx/dy are mostly unused (except for passing the position forced
by the --geometry option), and vo->dwidth/dheight are set for the VO,
and otherwise read for resize detection only.

In the long term, the way vo_config() handles the --geometry option
should be changed, and vo->dx/dy should be removed.

Remove some useless stuff: VO_EVENT_MOVE and VO_EVENT_KEYPRESS were
generated, but unused. Wayland changes by Alexander Preisinger.
2013-03-03 14:19:57 +01:00
Alexander Preisinger bf9b9c3bd0 wayland: add wayland support
All wayland only specific routines are placed in wayland_common.
This makes it easier to write other video outputs.

The EGL specific parts, as well as opengl context creation, are in gl_common.

This backend works for:
    * opengl-old
    * opengl
    * opengl-hq

To use it just specify the opengl backend
    --vo=opengl:backend=wayland
or disable the x11 build.

Don't forget to set EGL_PLATFORM to wayland.

Co-Author: Scott Moreau
(Sorry I lost the old commit history due to the file structure changes)
2013-02-28 20:01:33 +01:00