1
0
mirror of https://github.com/mpv-player/mpv synced 2025-03-31 07:51:55 +00:00

core: move X11 specific code to x11_common.c

Nothing changes, because vo_check_events() is called at the same place
anyway.
This commit is contained in:
wm4 2013-03-01 11:17:56 +01:00
parent 9d8bb0fbf6
commit fdc1560a0e
3 changed files with 4 additions and 8 deletions

View File

@ -3245,11 +3245,6 @@ static void run_playloop(struct MPContext *mpctx)
// ================================================================
vo_check_events(vo);
#ifdef CONFIG_X11
if (vo->x11) {
xscreensaver_heartbeat(vo->x11);
}
#endif
if (heartbeat_cmd) {
static unsigned last_heartbeat;
unsigned now = GetTimerMS();

View File

@ -128,6 +128,7 @@ typedef struct
static void vo_x11_update_geometry(struct vo *vo, bool update_pos);
static int vo_x11_get_fs_type(struct vo *vo);
static void xscreensaver_heartbeat(struct vo_x11_state *x11);
static void saver_on(struct vo_x11_state *x11);
static void saver_off(struct vo_x11_state *x11);
static void vo_x11_selectinput_witherr(Display *display, Window w,
@ -689,6 +690,8 @@ int vo_x11_check_events(struct vo *vo)
x11->mouse_waiting_hide = 0;
}
xscreensaver_heartbeat(vo->x11);
if (WinID > 0)
ret |= check_resize(vo);
while (XPending(display)) {
@ -1359,7 +1362,7 @@ void vo_x11_border(struct vo *vo)
vo_x11_decoration(vo, vo_border && !vo_fs);
}
void xscreensaver_heartbeat(struct vo_x11_state *x11)
static void xscreensaver_heartbeat(struct vo_x11_state *x11)
{
unsigned int time = GetTimerMS();

View File

@ -134,6 +134,4 @@ void vo_x11_update_screeninfo(struct vo *vo);
double vo_x11_vm_get_fps(struct vo *vo);
void xscreensaver_heartbeat(struct vo_x11_state *x11);
#endif /* MPLAYER_X11_COMMON_H */