wm_state_ck = intern_string (conn, "_NET_WM_STATE");
wm_state_above_ck = intern_string (conn, "_NET_WM_STATE_ABOVE");
- wm_state_below_ck = intern_string (conn, "_NET_WM_STATE_ABOVE");
+ wm_state_below_ck = intern_string (conn, "_NET_WM_STATE_BELOW");
wm_state_fs_ck = intern_string (conn, "_NET_WM_STATE_FULLSCREEN");
#ifdef MATCHBOX_HACK
xcb_intern_atom_cookie_t mb_current_app_window;
xcb_window_t window = xcb_generate_id (conn);
ck = xcb_create_window_checked (conn, scr->root_depth, window, scr->root,
- 0, 0, wnd->cfg->width, wnd->cfg->height, 0,
+ wnd->cfg->x, wnd->cfg->y,
+ wnd->cfg->width, wnd->cfg->height, 0,
XCB_WINDOW_CLASS_INPUT_OUTPUT,
scr->root_visual, mask, values);
err = xcb_request_check (conn, ck);
goto error;
}
- wnd->xid = window;
- wnd->x11_display = display;
+ wnd->handle.xid = window;
+ wnd->display.x11 = display;
wnd->control = Control;
wnd->sys = p_sys;
/* ICCCM
* No cut&paste nor drag&drop, only Window Manager communication. */
- /* Plain ASCII localization of VLC for ICCCM window name */
+ /* xgettext:
+ Plain ASCII of "VLC media player" for the ICCCM window name.
+ This must be ASCII. The limitation is partially with ICCCM
+ and partially with VLC.
+ For Latin script languages, you may need to strip accents.
+ For other scripts, you will need to transliterate into Latin. */
set_ascii_prop (conn, window, XA_WM_NAME,
vlc_pgettext ("ASCII", "VLC media player"));
+ /* xgettext:
+ Plain ASCII of "VLC" for the ICCCM window name. */
set_ascii_prop (conn, window, XA_WM_ICON_NAME,
vlc_pgettext ("ASCII", "VLC"));
set_wm_hints (conn, window);
/* Make the window visible */
xcb_map_window (conn, window);
+ if (var_CreateGetBool (obj, "video-wallpaper"))
+ {
+ vout_window_SetState (wnd, VOUT_WINDOW_STATE_BELOW);
+ vout_window_SetFullScreen (wnd, true);
+ }
+
/* Create the event thread. It will dequeue all events, so any checked
* request from this thread must be completed at this point. */
if ((p_sys->keys != NULL)
#ifdef MATCHBOX_HACK
if (p_sys->mb_current_app_window)
xcb_set_input_focus (p_sys->conn, XCB_INPUT_FOCUS_POINTER_ROOT,
- wnd->xid, XCB_CURRENT_TIME);
+ wnd->handle.xid, XCB_CURRENT_TIME);
#endif
xcb_flush (conn); /* Make sure map_window is sent (should be useless) */
return VLC_SUCCESS;
DestroyKeyHandler (p_sys->keys);
}
xcb_disconnect (conn);
- free (wnd->x11_display);
+ free (wnd->display.x11);
free (p_sys);
}
xcb_get_property (conn, 0, pne->window, pne->atom,
XA_WINDOW, 0, 4), NULL);
if (r != NULL
- && !memcmp (xcb_get_property_value (r), &wnd->xid,
+ && !memcmp (xcb_get_property_value (r), &wnd->handle.xid,
4))
{
msg_Dbg (wnd, "asking Matchbox for input focus");
xcb_set_input_focus (conn,
XCB_INPUT_FOCUS_POINTER_ROOT,
- wnd->xid, pne->time);
+ wnd->handle.xid, pne->time);
xcb_flush (conn);
}
free (r);
xcb_client_message_event_t ev = {
.response_type = XCB_CLIENT_MESSAGE,
.format = 32,
- .window = wnd->xid,
+ .window = wnd->handle.xid,
.type = sys->wm_state,
};
unsigned height = va_arg (ap, unsigned);
const uint32_t values[] = { width, height, };
- xcb_configure_window (conn, wnd->xid,
+ xcb_configure_window (conn, wnd->handle.xid,
XCB_CONFIG_WINDOW_WIDTH |
XCB_CONFIG_WINDOW_HEIGHT, values);
break;
}
case VOUT_WINDOW_SET_FULLSCREEN:
- set_wm_state (wnd, va_arg (ap, int), p_sys->wm_state_fullscreen);
+ {
+ bool fs = va_arg (ap, int);
+ if (!fs && var_GetBool (wnd, "video-wallpaper"))
+ return VLC_EGENERIC;
+ set_wm_state (wnd, fs, p_sys->wm_state_fullscreen);
break;
+ }
default:
msg_Err (wnd, "request %d not implemented", cmd);
if (p_sys == NULL || xcb_connection_has_error (conn))
goto error;
- wnd->xid = window;
+ wnd->handle.xid = window;
wnd->control = Control;
wnd->sys = p_sys;
static void EmClose (vlc_object_t *obj)
{
vout_window_t *wnd = (vout_window_t *)obj;
- xcb_window_t window = wnd->xid;
+ xcb_window_t window = wnd->handle.xid;
Close (obj);
ReleaseDrawable (obj, window);