Commit 273641ac authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

inhibit: remove the window ID

This seemed like a good idea to support xdg-screensaver. But it really
goes in the way.
parent 778460dc
......@@ -33,7 +33,6 @@ struct vlc_inhibit
{
VLC_COMMON_MEMBERS
uint32_t window_id;
vlc_inhibit_sys_t *p_sys;
void (*inhibit) (vlc_inhibit_t *, bool);
};
......
......@@ -34,14 +34,13 @@ typedef struct
module_t *module;
} inhibit_t;
vlc_inhibit_t *vlc_inhibit_Create (vlc_object_t *parent, int_fast32_t wid)
vlc_inhibit_t *vlc_inhibit_Create (vlc_object_t *parent)
{
inhibit_t *priv = vlc_custom_create (parent, sizeof (*priv), "inhibit" );
if (priv == NULL)
return NULL;
vlc_inhibit_t *ih = &priv->ih;
ih->window_id = wid;
ih->p_sys = NULL;
ih->inhibit = NULL;
......
......@@ -23,7 +23,7 @@
# include <vlc_inhibit.h>
vlc_inhibit_t *vlc_inhibit_Create (vlc_object_t *, int_fast32_t);
vlc_inhibit_t *vlc_inhibit_Create (vlc_object_t *);
void vlc_inhibit_Destroy (vlc_inhibit_t *);
static inline void vlc_inhibit_Set (vlc_inhibit_t *ih, bool suspend)
......
......@@ -95,8 +95,7 @@ vout_window_t *vout_window_New(vlc_object_t *obj,
/* Hook for screensaver inhibition */
if (var_InheritBool(obj, "disable-screensaver") &&
cfg->type == VOUT_WINDOW_TYPE_XID) {
w->inhibit = vlc_inhibit_Create(VLC_OBJECT (window),
window->handle.xid);
w->inhibit = vlc_inhibit_Create(VLC_OBJECT (window));
if (w->inhibit != NULL)
vlc_inhibit_Set(w->inhibit, true);
/* FIXME: ^ wait for vout activation, pause */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment