summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-05-23 20:22:00 +0200
committerwm4 <wm4@nowhere>2014-05-23 20:59:06 +0200
commit8033b4b4bafeb89d9803cefe87b65c544f36f0b3 (patch)
treea41d00ddbf494d38556d311c99563ee2e7de4b9c
parent990888f96813d8a50947cc4b865f7ed23ec6bb63 (diff)
downloadmpv-8033b4b4bafeb89d9803cefe87b65c544f36f0b3.tar.bz2
mpv-8033b4b4bafeb89d9803cefe87b65c544f36f0b3.tar.xz
x11: rename identifiers using reserved namespace
You can't use identifiers starting with "_" and an uppercase letter in application programs. They are reserved by the C standard. Unrelated change: drop unused/misleading vo_wm_NETWM define.
-rw-r--r--video/out/x11_common.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/video/out/x11_common.c b/video/out/x11_common.c
index 6f60bf5c55..eed1277e9e 100644
--- a/video/out/x11_common.c
+++ b/video/out/x11_common.c
@@ -79,14 +79,12 @@
#define vo_wm_STAYS_ON_TOP 4
#define vo_wm_ABOVE 8
#define vo_wm_BELOW 16
-#define vo_wm_NETWM (vo_wm_FULLSCREEN | vo_wm_STAYS_ON_TOP | vo_wm_ABOVE | \
- vo_wm_BELOW)
/* EWMH state actions, see
http://freedesktop.org/Standards/wm-spec/index.html#id2768769 */
-#define _NET_WM_STATE_REMOVE 0 /* remove/unset property */
-#define _NET_WM_STATE_ADD 1 /* add/set property */
-#define _NET_WM_STATE_TOGGLE 2 /* toggle property */
+#define NET_WM_STATE_REMOVE 0 /* remove/unset property */
+#define NET_WM_STATE_ADD 1 /* add/set property */
+#define NET_WM_STATE_TOGGLE 2 /* toggle property */
#define WIN_LAYER_ONBOTTOM 2
#define WIN_LAYER_NORMAL 4
@@ -210,7 +208,7 @@ static void x11_send_ewmh_msg(struct vo_x11_state *x11, char *message_type,
static void x11_set_ewmh_state(struct vo_x11_state *x11, char *state, bool set)
{
long params[5] = {
- set ? _NET_WM_STATE_ADD : _NET_WM_STATE_REMOVE,
+ set ? NET_WM_STATE_ADD : NET_WM_STATE_REMOVE,
XInternAtom(x11->display, state, False),
};
x11_send_ewmh_msg(x11, "_NET_WM_STATE", params);
@@ -1631,6 +1629,6 @@ bool vo_x11_screen_is_composited(struct vo *vo)
struct vo_x11_state *x11 = vo->x11;
char buf[50];
sprintf(buf, "_NET_WM_CM_S%d", x11->screen);
- Atom _NET_WM_CM = XInternAtom(x11->display, buf, False);
- return XGetSelectionOwner(x11->display, _NET_WM_CM) != None;
+ Atom NET_WM_CM = XInternAtom(x11->display, buf, False);
+ return XGetSelectionOwner(x11->display, NET_WM_CM) != None;
}