summaryrefslogtreecommitdiffstats
path: root/video/out/x11_common.h
diff options
context:
space:
mode:
Diffstat (limited to 'video/out/x11_common.h')
-rw-r--r--video/out/x11_common.h35
1 files changed, 25 insertions, 10 deletions
diff --git a/video/out/x11_common.h b/video/out/x11_common.h
index 774a76afbe..b8ebfe0328 100644
--- a/video/out/x11_common.h
+++ b/video/out/x11_common.h
@@ -18,13 +18,14 @@
#ifndef MPLAYER_X11_COMMON_H
#define MPLAYER_X11_COMMON_H
-#include <stdint.h>
+#include <stdatomic.h>
#include <stdbool.h>
+#include <stdint.h>
+
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include "common/common.h"
-#include "osdep/atomic.h"
#include "config.h"
#if !HAVE_GPL
@@ -41,7 +42,8 @@ struct xrandr_display {
double fps;
char *name;
bool overlaps;
- int atom_id;
+ int atom_id; // offset by location of primary
+ int screen;
};
struct vo_x11_state {
@@ -59,20 +61,26 @@ struct vo_x11_state {
int display_is_local;
int ws_width;
int ws_height;
- int dpi_scale;
+ double dpi_scale;
struct mp_rect screenrc;
char *window_title;
struct xrandr_display displays[MAX_DISPLAYS];
int num_displays;
- int current_icc_screen;
+ int current_screen;
int xrandr_event;
+ bool has_mesa;
+ bool has_nvidia;
bool screensaver_enabled;
bool dpms_touched;
double screensaver_time_last;
+ struct mp_present *present;
+ bool use_present;
+ int present_code;
+
XIM xim;
XIC xic;
bool no_autorepeat;
@@ -80,6 +88,7 @@ struct vo_x11_state {
Colormap colormap;
int wm_type;
+ bool hidden; // _NET_WM_STATE_HIDDEN
bool window_hidden; // the window was mapped at least once
bool pseudo_mapped; // not necessarily mapped, but known window size
int fs; // whether we assume the window is in fullscreen mode
@@ -105,12 +114,16 @@ struct vo_x11_state {
* stays the same (even if that size is different from the current
* window size after the user modified the latter). */
int old_dw, old_dh;
+ int old_x, old_y;
/* Video size changed during fullscreen when we couldn't tell the new
* size to the window manager. Must set window size when turning
* fullscreen off. */
bool size_changed_during_fs;
bool pos_changed_during_fs;
+ /* One of the autofit/geometry options changed at runtime. */
+ bool geometry_change;
+
XComposeStatus compose_status;
/* XShm stuff */
@@ -125,22 +138,24 @@ struct vo_x11_state {
Atom dnd_requested_action;
Window dnd_src_window;
- /* dragging the window */
- bool win_drag_button1_down;
-
Atom icc_profile_property;
+
+ XEvent last_button_event;
};
-int vo_x11_init(struct vo *vo);
+bool vo_x11_init(struct vo *vo);
void vo_x11_uninit(struct vo *vo);
void vo_x11_check_events(struct vo *vo);
bool vo_x11_screen_is_composited(struct vo *vo);
bool vo_x11_create_vo_window(struct vo *vo, XVisualInfo *vis,
const char *classname);
void vo_x11_config_vo_window(struct vo *vo);
+bool vo_x11_check_visible(struct vo *vo);
int vo_x11_control(struct vo *vo, int *events, int request, void *arg);
+void vo_x11_present(struct vo *vo);
+void vo_x11_sync_swap(struct vo *vo);
void vo_x11_wakeup(struct vo *vo);
-void vo_x11_wait_events(struct vo *vo, int64_t until_time_us);
+void vo_x11_wait_events(struct vo *vo, int64_t until_time_ns);
void vo_x11_silence_xlib(int dir);