Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 302308 | Differences between
and this patch

Collapse All | Expand All

(-)a/plugins/obs.c (-6 / +27 lines)
Lines 88-93 typedef struct _ObsWindow Link Here
88
{
88
{
89
    int customFactor[MODIFIER_COUNT];
89
    int customFactor[MODIFIER_COUNT];
90
    int matchFactor[MODIFIER_COUNT];
90
    int matchFactor[MODIFIER_COUNT];
91
92
    CompTimeoutHandle updateHandle;
91
} ObsWindow;
93
} ObsWindow;
92
94
93
#define GET_OBS_DISPLAY(d) \
95
#define GET_OBS_DISPLAY(d) \
Lines 323-328 obsMatchPropertyChanged (CompDisplay *d, Link Here
323
    WRAP (od, d, matchPropertyChanged, obsMatchPropertyChanged);
325
    WRAP (od, d, matchPropertyChanged, obsMatchPropertyChanged);
324
}
326
}
325
327
328
static Bool
329
obsUpdateWindow (void *closure)
330
{
331
    CompWindow *w = (CompWindow *) closure;
332
    int        i;
333
334
    OBS_WINDOW (w);
335
336
    for (i = 0; i < MODIFIER_COUNT; i++)
337
	updatePaintModifier (w, i);
338
339
    ow->updateHandle = 0;
340
341
    return FALSE;
342
}
343
326
static CompOption *
344
static CompOption *
327
obsGetDisplayOptions (CompPlugin  *p,
345
obsGetDisplayOptions (CompPlugin  *p,
328
		      CompDisplay *display,
346
		      CompDisplay *display,
Lines 628-635 static CompBool Link Here
628
obsInitWindow (CompPlugin *p,
646
obsInitWindow (CompPlugin *p,
629
	       CompWindow *w)
647
	       CompWindow *w)
630
{
648
{
631
    ObsWindow    *ow;
649
    ObsWindow *ow;
632
    int          i;
650
    int       i;
633
651
634
    OBS_SCREEN (w->screen);
652
    OBS_SCREEN (w->screen);
635
653
Lines 643-652 obsInitWindow (CompPlugin *p, Link Here
643
	ow->matchFactor[i]  = 100;
661
	ow->matchFactor[i]  = 100;
644
    }
662
    }
645
663
646
    w->base.privates[os->windowPrivateIndex].ptr = ow;
664
    /* defer initializing the factors from window matches as match evalution
665
       means wrapped function calls */
666
    ow->updateHandle = compAddTimeout (0, 0, obsUpdateWindow, w);
647
667
648
    for (i = 0; i < MODIFIER_COUNT; i++)
668
    w->base.privates[os->windowPrivateIndex].ptr = ow;
649
	updatePaintModifier (w, i);
650
669
651
    return TRUE;
670
    return TRUE;
652
}
671
}
Lines 657-662 obsFiniWindow (CompPlugin *p, Link Here
657
{
676
{
658
    OBS_WINDOW (w);
677
    OBS_WINDOW (w);
659
678
679
    if (ow->updateHandle)
680
	compRemoveTimeout (ow->updateHandle);
681
660
    free (ow);
682
    free (ow);
661
}
683
}
662
684
663
- 

Return to bug 302308