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 ...@@ -33,7 +33,6 @@ struct vlc_inhibit
{ {
VLC_COMMON_MEMBERS VLC_COMMON_MEMBERS
uint32_t window_id;
vlc_inhibit_sys_t *p_sys; vlc_inhibit_sys_t *p_sys;
void (*inhibit) (vlc_inhibit_t *, bool); void (*inhibit) (vlc_inhibit_t *, bool);
}; };
......
...@@ -34,14 +34,13 @@ typedef struct ...@@ -34,14 +34,13 @@ typedef struct
module_t *module; module_t *module;
} inhibit_t; } 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" ); inhibit_t *priv = vlc_custom_create (parent, sizeof (*priv), "inhibit" );
if (priv == NULL) if (priv == NULL)
return NULL; return NULL;
vlc_inhibit_t *ih = &priv->ih; vlc_inhibit_t *ih = &priv->ih;
ih->window_id = wid;
ih->p_sys = NULL; ih->p_sys = NULL;
ih->inhibit = NULL; ih->inhibit = NULL;
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
# include <vlc_inhibit.h> # 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 *); void vlc_inhibit_Destroy (vlc_inhibit_t *);
static inline void vlc_inhibit_Set (vlc_inhibit_t *ih, bool suspend) 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, ...@@ -95,8 +95,7 @@ vout_window_t *vout_window_New(vlc_object_t *obj,
/* Hook for screensaver inhibition */ /* Hook for screensaver inhibition */
if (var_InheritBool(obj, "disable-screensaver") && if (var_InheritBool(obj, "disable-screensaver") &&
cfg->type == VOUT_WINDOW_TYPE_XID) { cfg->type == VOUT_WINDOW_TYPE_XID) {
w->inhibit = vlc_inhibit_Create(VLC_OBJECT (window), w->inhibit = vlc_inhibit_Create(VLC_OBJECT (window));
window->handle.xid);
if (w->inhibit != NULL) if (w->inhibit != NULL)
vlc_inhibit_Set(w->inhibit, true); vlc_inhibit_Set(w->inhibit, true);
/* FIXME: ^ wait for vout activation, pause */ /* 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