#include "efence.h"
+#include "dcompmgr.h"
#include "render.h"
#include "screen.h"
#include "window.h"
static int plugin_id;
+#define WINDOW_TYPE_FADE(t) (t != DC_WINDOW_TYPE_DESKTOP)
+
typedef struct {
void (*window_show)(d_window_t *w);
void (*window_hide)(d_window_t *w);
sc->window_hide = fade_window_hide;
d->fades = list_new();
- d->fade_step_time = 5000; /* 5 milliseconds */
+ d->fade_step_time = 15000; /* 15 milliseconds */
d->fade_total_time = 180000; /* 0.18 seconds */
}
d->window_show(w);
- if (!window_is_input_only(w))
- start_fade(w, 0x2000, 0xffff, TRUE);
+ if (!window_is_input_only(w) && dcompmgr_running()) {
+ d_window_type_t type = window_get_type(w);
+ if (WINDOW_TYPE_FADE(type))
+ start_fade(w, 0x2000, 0xffff, TRUE);
+ }
}
static void
{
data_t *d;
- if (!window_is_input_only(w))
- start_fade(w, 0xffff, 0x0002, FALSE);
+ if (!window_is_input_only(w) && dcompmgr_running()) {
+ d_window_type_t type = window_get_type(w);
+ if (WINDOW_TYPE_FADE(type))
+ start_fade(w, 0xffff, 0x0002, FALSE);
+ }
d = screen_find_plugin_data(w->sc, plugin_id);
d->window_hide(w);